Commit 82a8fe83 authored by Christoph Sommer's avatar Christoph Sommer

added version, update readme

parent acc3eb43
# care-*less* CARE|n2v
Simple IPython based user interface to [CARE](http://csbdeep.bioimagecomputing.com/) a toolbox for Content-aware Image Restoration and to [Noise2Void](https://github.com/juglab/n2v)
# CARE-*less* care|n2v
Simple IPython based user interface to [CARE](http://csbdeep.bioimagecomputing.com/) a toolbox for Content-aware Image Restoration and to [Noise2Void](https://github.com/juglab/n2v) a self-supervised deep learning based denoising.
# CARE
## How to use:
CARE needs pairs of registered images - low (input) and high (output) quality. It trains a convolutional neural network how to transform low quality images - which might even be of less physical resolution - into high quality images. After training, newly recorded low quality images or movies can be predicted. 2D, 3D and multi-channel images are supported. For each channel a separate network is trained.
#### Vanilla screencast for input selection and training
![bif_care User interface](vid/bif_care_demo_01.mp4)
![CAREless user interface](vid/bif_care_demo_01.mp4)
#### Input selection and patch extraction
0. Clone this repository with `git clone https://....`
1. Copy and rename the IPython notebook template file: `bif_care_templ.ipynb` to `my_care_project.ipynb`
0. Clone this repository with `git clone https://git.ist.ac.at/bioimaging/careless`
1. Copy and rename the IPython notebook template file: `careless_care.ipynb` to `my_care_project.ipynb`
2. Open your renamed `my_care_project.ipynb` file in Jypyter or IPyhton notebook.
3. In order to train CARE, the path to the image pairs needs to be specified. Then, choose images for low and high quality respectively using a wild-card (e.g. `low*.tif` and `high*.tif`). The images will be converted and image patches are extracted. This step is required for efficient GPU execution. Choose patch sizes for your input dimensions `(Z)YX` and set how many patches should be extracted per image pair. After image patches have been extracted, they are saved to the output directory.
......@@ -36,7 +36,7 @@ You can predict new images in the IPython notebook directly using the prediction
0. Add (or enable) [CSBDeep](http://sites.imagej.net/CSBDeep/) to your Fiji update sites
1. Open image you want to predict in Fiji
2. In Fiji choose `Plugins->CSBDeep->Run your network`
3. Select network file `<bif_care-out-folder>/models/CH_X_model/TF_SavedModel.zip` as 'Import model (.zip)' of your trained channel
3. Select network file `<careless-out-folder>/models/CH_X_model/TF_SavedModel.zip` as 'Import model (.zip)' of your trained channel
4. Set additional parameters such as number of tiles (higher number, in case your entire image cannot be loaded on your GPU memory) and press OK
---
......@@ -44,7 +44,7 @@ You can predict new images in the IPython notebook directly using the prediction
# Noise2Void
## How to use:
Noise2void does not require pairs of images.
1. Copy and rename the IPython notebook template file: `bif_n2v_templ.ipynb` to `my_n2v_project.ipynb`
1. Copy and rename the IPython notebook template file: `careless_n2v.ipynb` to `my_n2v_project.ipynb`
2. Open your renamed `my_n2v_project.ipynb` file in Jypyter or IPyhton notebook.
3. Follow steps in the notebook
......@@ -56,22 +56,27 @@ Noise2void does not require pairs of images.
The installation of the CUDA toolkit is straight-forward. To download cuDNN you have to create a Developer account at NVidia. After downloading integrate the folders `bin`, `include` and `lib` into the according folders of your CUDA toolkit installation.
#### Known working versions
1. NVidia CUDA toolkit 9.0 + cuDNN 7.3.0 + tensorflow 12.0
2. NVidia CUDA toolkit 10.0 + cuDNN 7.5.1 + tensorflow 13.1 (recommended)
1. NVidia CUDA toolkit 9.0 + cuDNN 7.3.0 + tensorflow 1.12.0
2. NVidia CUDA toolkit 10.0 + cuDNN 7.5.1 + tensorflow 1.13.1, 1.14.0 (recommended)
**Note:**
* tensorflow versions 2.* will not work.
* Do not use NVidia CUDA toolkit > 10.0
### Python dependencies
We strongly recommend using the [Anaconda Python distribution (64bit)](https://www.anaconda.com/distribution/) with Python == 3.6. Furthermore, we recommend to create a new conda virtual environment for Python 3.6 with:
```
conda create -n py36_bif_care python=3.6 anaconda
conda activate py36_bif_care
conda create -n py36_careless python=3.6 pyqt nodejs
conda activate py36_careless
```
You can install all mayor dependencies, including tensforflow (1.12.1) and csbdepp (0.3.0) by:
Install all mayor dependencies, including CARE and Noise2Void by:
```
cd <this-path>
pip install -r requirements.txt -e .
pip install -e .
```
If you observe problems installing javabridge see troubleshooting below.
......@@ -102,12 +107,12 @@ The authors of [CARE](https://github.com/CSBDeep/CSBDeep/tree/master/examples) p
Unzip, copy and rename (e. g. *_low.tif*, *_high.tif*) the images form `low` and `GT` into a single folder.
### Comparison of CARE with N2V
![bif_care User interface](img/example_result.png "Comparison of CARE with N2V")
![CAREless user interface](img/example_result.png "Comparison of CARE with N2V")
### Troubleshooting and known issues
* tensorflow 1.13.x requires NVidia tookit 10.0 for the latest csbdeep 0.3.0 release.
* Currently NVidia toolkit 10.1 is not supported by the latest tensorflow==13.1 release
* tensorflow>1.12.x requires NVidia tookit 10.0
* Currently NVidia toolkit > 10.0 is not supported by tensorflow==1.* versons
* To install bioformats/ javabridge you need the Microsoft Visual Studio compiler runtime 2015 (14.0) installed, which is included with Microsoft Visual Studio community edition >=2017
* To install bioformats/ javabridge you need Java SDK 8 (1.8) or download [pre-compiled .whl](https://www.lfd.uci.edu/~gohlke/pythonlibs/) packages and install them by:
......
from .version import __version__, __care_version__, __n2v_version__
__version__ = '0.3.0'
__care_version__ = '0.4.1'
__n2v_version__ = '0.1.10'
\ No newline at end of file
......@@ -4,15 +4,36 @@ from setuptools import setup
with open("README.md", "rb") as f:
description = f.read().decode("utf-8")
with open('careless/version.py', "r") as f:
exec(f.read())
setup(
name = "CAREless",
packages = ["careless"],
version = "0.3",
version = __version__,
description = description,
long_description = description,
entry_points = {'console_scripts': ['careless_n2v=careless.n2v.n2v:cmd_line',
long_description_content_type='text/markdown',
url='https://git.ist.ac.at/csommer/careless',
entry_points = {'console_scripts': [
'careless_n2v=careless.n2v.n2v:cmd_line',
'careless_Care=careless.care.core:cmd_line',
]},
author = "Christoph Sommer",
author_email = "christoph.sommer23@gmail.com",
install_requires=[
f"csbdeep=={__care_version__}",
f"n2v=={__n2v_version__}",
"scikit_image>=0.14.2",
"tifffile>=2019.3.18",
"widgetsnbextension>=3.4.2",
"ipywidgets>=7.4.2",
"javabridge>=1.0.18",
"python-bioformats>=1.5.2",
"jupyterlab>=0.35.6",
"tensorflow-gpu==1.14.0,<2.0.0",
"h5py<2.10.0",
"scipy>=1.3.1",
"keras<2.3.0"
]
)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment