
# DenoiSeg: Joint Denoising and Segmentation
Tim-Oliver Buchholz<sup>\*,1,2</sup>, Mangal Prakash<sup>\*,1,2,</sup>, Alexander Krull<sup>1,2,3</sup>,
and Florian Jug<sup>1,2,^</sup>
<sup>1</sup> Max Planck Institute of Molecular Cell Biology and Genetics, Dresden, Germany <br />
<sup>2</sup> Center for Systems Biology, Dresden, Germany <br />
<sup>3</sup> Max Planck Institute for Physics of Complex Systems, Dresden, Germany <br />
<sup>^</sup> <code>florian.jug@fht.org</code> <br />
<sup>*</sup> Equal contribution (alphabetical order).
Microscopy image analysis often requires the segmentation of objects,
but training data for this task is typically scarce and hard to obtain.
Here we propose DenoiSeg, a new method that can be trained end-to-end
on only a few annotated ground truth segmentations.
We achieve this by extending [Noise2Void](https://github.com/juglab/n2v),
a self-supervised denoising scheme that can be trained on noisy images alone,
to also predict dense 3-class segmentations. The reason for the success
of our method is that segmentation can profit from denoising, especially
when performed jointly within the same network. The network becomes a
denoising expert by seeing all available raw data, while co-learning to
segment, even if only a few segmentation labels are available. This
hypothesis is additionally fueled by our observation that the best
segmentation results on high quality (very low noise) raw data are obtained
when moderate amounts of synthetic noise are added. This renders the
denoising-task non-trivial and unleashes the desired co-learning effect.
We believe that DenoiSeg offers a viable way to circumvent the tremendous
hunger for high quality training data and effectively enables few-shot learning
of dense segmentations.
Paper: [https://arxiv.org/abs/2005.02987](https://arxiv.org/abs/2005.02987)
## Installation
#### If you start from scratch...
We recommend using [miniconda](https://docs.conda.io/en/latest/miniconda.html).
If you do not yet have a strong opinion, just use it too!
After installing Miniconda, create a conda environment:
```
conda create -n 'denoiseg' python=3.9
conda activate denoiseg
```
#### Install TensorFlow
The best way to install TensorFLow is to follow the [Tensorflow guidelines](https://www.tensorflow.org/install/pip).
Note that, after installing TensorFlow, running the following commands in your environment will allow you to use the GPU without having to each
time run an `export` command (refer to the [Tensorflow step by step](https://www.tensorflow.org/install/pip#linux_1)):
```bash
mkdir -p $CONDA_PREFIX/etc/conda/activate.d
echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CONDA_PREFIX/lib/' > $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh
```
#### Option 1: PIP (current stable release)
```
$ pip install denoiseg
```
#### Option 2: Git-Clone and install from sources (current master-branch version)
This option is ideal if you want to edit the code. Clone the repository:
```
$ git clone https://github.com/juglab/denoiseg.git
```
Change into its directory and install it:
```
$ cd denoiseg
$ pip install -e .
```
You are now ready to run DenoiSeg.
## How to use it?
Have a look at our jupyter notebook:
* [Example: DSB2018](https://github.com/juglab/DenoiSeg/tree/master/examples/DenoiSeg_2D/DSB2018_DenoiSeg_Example.ipynb)
* [Example: Fly Wing](https://github.com/juglab/DenoiSeg/tree/master/examples/DenoiSeg_2D/FlyWing_DenoiSeg_Example.ipynb)
* [Example: Mouse Nuclei](https://github.com/juglab/DenoiSeg/tree/master/examples/DenoiSeg_2D/MouseNuclei_DenoiSeg_Example.ipynb)
## How to cite:
```
@inproceedings{BuchholzPrakash2020DenoiSeg,
title={DenoiSeg: Joint Denoising and Segmentation},
author={Tim-Oliver Buchholz and Mangal Prakash and Alexander Krull and Florian Jug},
year={2020}
}
```
## Reproducibility
The current release and master is a refactored version of the code used for the paper.
This refactored version produces the same number as reported in the paper, but if you
wish to use the exact code used in the paper, please continue [here](scripts/reproducibility/README.md).
Further results (qualitative and quantitative) can be found on the [wiki](https://github.com/juglab/DenoiSeg/wiki).
Raw data
{
"_id": null,
"home_page": "https://github.com/juglab/DenoiSeg/",
"name": "denoiseg",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "Tim-Oliver Buchholz, Mangal Prakash, Alexander Krull, Florian Jug",
"author_email": "tim-oliver.buchholz@fmi.ch, prakash@mpi-cbg.de, a.f.f.krull@bham.ac.uk, florian.jug@fht.org",
"download_url": "https://files.pythonhosted.org/packages/17/3e/bc3d0ece1c61efa471f3c6c6e1e8a55c28f1e5130f5209f22bb8867374b8/denoiseg-0.3.1.tar.gz",
"platform": null,
"description": "\n# DenoiSeg: Joint Denoising and Segmentation\nTim-Oliver Buchholz<sup>\\*,1,2</sup>, Mangal Prakash<sup>\\*,1,2,</sup>, Alexander Krull<sup>1,2,3</sup>,\nand Florian Jug<sup>1,2,^</sup>\n\n<sup>1</sup> Max Planck Institute of Molecular Cell Biology and Genetics, Dresden, Germany <br />\n<sup>2</sup> Center for Systems Biology, Dresden, Germany <br />\n<sup>3</sup> Max Planck Institute for Physics of Complex Systems, Dresden, Germany <br />\n<sup>^</sup> <code>florian.jug@fht.org</code> <br />\n<sup>*</sup> Equal contribution (alphabetical order).\n\nMicroscopy image analysis often requires the segmentation of objects, \nbut training data for this task is typically scarce and hard to obtain.\nHere we propose DenoiSeg, a new method that can be trained end-to-end \non only a few annotated ground truth segmentations. \nWe achieve this by extending [Noise2Void](https://github.com/juglab/n2v), \na self-supervised denoising scheme that can be trained on noisy images alone, \nto also predict dense 3-class segmentations. The reason for the success \nof our method is that segmentation can profit from denoising, especially \nwhen performed jointly within the same network. The network becomes a \ndenoising expert by seeing all available raw data, while co-learning to \nsegment, even if only a few segmentation labels are available. This \nhypothesis is additionally fueled by our observation that the best \nsegmentation results on high quality (very low noise) raw data are obtained \nwhen moderate amounts of synthetic noise are added. This renders the \ndenoising-task non-trivial and unleashes the desired co-learning effect.\nWe believe that DenoiSeg offers a viable way to circumvent the tremendous \nhunger for high quality training data and effectively enables few-shot learning \nof dense segmentations.\n\nPaper: [https://arxiv.org/abs/2005.02987](https://arxiv.org/abs/2005.02987)\n\n## Installation\n\n#### If you start from scratch...\nWe recommend using [miniconda](https://docs.conda.io/en/latest/miniconda.html).\nIf you do not yet have a strong opinion, just use it too!\n\nAfter installing Miniconda, create a conda environment:\n\n```\nconda create -n 'denoiseg' python=3.9\nconda activate denoiseg\n```\n\n#### Install TensorFlow\n\nThe best way to install TensorFLow is to follow the [Tensorflow guidelines](https://www.tensorflow.org/install/pip). \n\nNote that, after installing TensorFlow, running the following commands in your environment will allow you to use the GPU without having to each \ntime run an `export` command (refer to the [Tensorflow step by step](https://www.tensorflow.org/install/pip#linux_1)):\n```bash\nmkdir -p $CONDA_PREFIX/etc/conda/activate.d\necho 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CONDA_PREFIX/lib/' > $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh\n```\n\n#### Option 1: PIP (current stable release)\n```\n$ pip install denoiseg\n```\n\n#### Option 2: Git-Clone and install from sources (current master-branch version)\nThis option is ideal if you want to edit the code. Clone the repository:\n\n```\n$ git clone https://github.com/juglab/denoiseg.git\n```\nChange into its directory and install it:\n\n```\n$ cd denoiseg\n$ pip install -e .\n```\nYou are now ready to run DenoiSeg.\n\n## How to use it?\nHave a look at our jupyter notebook:\n* [Example: DSB2018](https://github.com/juglab/DenoiSeg/tree/master/examples/DenoiSeg_2D/DSB2018_DenoiSeg_Example.ipynb)\n* [Example: Fly Wing](https://github.com/juglab/DenoiSeg/tree/master/examples/DenoiSeg_2D/FlyWing_DenoiSeg_Example.ipynb)\n* [Example: Mouse Nuclei](https://github.com/juglab/DenoiSeg/tree/master/examples/DenoiSeg_2D/MouseNuclei_DenoiSeg_Example.ipynb)\n\n## How to cite:\n```\n@inproceedings{BuchholzPrakash2020DenoiSeg,\n title={DenoiSeg: Joint Denoising and Segmentation},\n author={Tim-Oliver Buchholz and Mangal Prakash and Alexander Krull and Florian Jug},\n year={2020}\n}\n```\n\n## Reproducibility\nThe current release and master is a refactored version of the code used for the paper. \nThis refactored version produces the same number as reported in the paper, but if you\nwish to use the exact code used in the paper, please continue [here](scripts/reproducibility/README.md).\n\nFurther results (qualitative and quantitative) can be found on the [wiki](https://github.com/juglab/DenoiSeg/wiki).\n",
"bugtrack_url": null,
"license": "BSD 3-Clause License",
"summary": "DenoiSeg",
"version": "0.3.1",
"project_urls": {
"Homepage": "https://github.com/juglab/DenoiSeg/",
"Repository": "https://github.com/juglab/DenoiSeg/"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "4f53f23faa85e3c0cd79ca35724f435d99e0de3e3bbed18a9077951261eaff5b",
"md5": "3b991c416d93c1362e81a1ceea901ddb",
"sha256": "2f2b0d2dc694236da3725527a8e33e4c5101d33837fc271a83e184aac0adbdc5"
},
"downloads": -1,
"filename": "denoiseg-0.3.1-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "3b991c416d93c1362e81a1ceea901ddb",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 29699,
"upload_time": "2023-08-29T10:24:06",
"upload_time_iso_8601": "2023-08-29T10:24:06.526894Z",
"url": "https://files.pythonhosted.org/packages/4f/53/f23faa85e3c0cd79ca35724f435d99e0de3e3bbed18a9077951261eaff5b/denoiseg-0.3.1-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "173ebc3d0ece1c61efa471f3c6c6e1e8a55c28f1e5130f5209f22bb8867374b8",
"md5": "749bd25b5582ddb3303163af7d1fa431",
"sha256": "fd720b78910b84ea5d65deda8c193d64e583c78090d9867990b7a39f72ed7ea3"
},
"downloads": -1,
"filename": "denoiseg-0.3.1.tar.gz",
"has_sig": false,
"md5_digest": "749bd25b5582ddb3303163af7d1fa431",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 28458,
"upload_time": "2023-08-29T10:24:07",
"upload_time_iso_8601": "2023-08-29T10:24:07.577309Z",
"url": "https://files.pythonhosted.org/packages/17/3e/bc3d0ece1c61efa471f3c6c6e1e8a55c28f1e5130f5209f22bb8867374b8/denoiseg-0.3.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-08-29 10:24:07",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "juglab",
"github_project": "DenoiSeg",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "denoiseg"
}