Skip to content
/ Nucleus Public

Nucleus detects individual nuclei in crowded tissue-like microscopy images

License

Notifications You must be signed in to change notification settings

tiagu/Nucleus

Repository files navigation

Nucleus

Pipeline to detect individual nuclei in crowded immunofluorescence images. Effective in 2D embryo sections and single-z plane images. Additionally, a range of tools are available for estimating 3D nuclei in whole-embryo, organoid, or embryo model confocal microscopy stacks.

portfolio_view

How to

Please find installation notes below. To detect nuclei in your own image of interest I recommend you first following one of the two example notebooks.

2D notebook example: Nucleus_Predict_2D. Example images here and here.

3D notebook example: Nucleus_Predict_3D.

Please note, we mostly tested:

  1. DAPI nuclear stains
  2. Resolutions of 3.5 to 6 pixels/μm (typically with 40-60X objectives on a Leica SP8/ Zeiss LSM710)
  3. The size of the images should be a multiple of 128, e.g. 1024x2084. There is a check in the pipeline for this.

Ideally, a 256x256 pixels crop of your images should look similar to the images the network was trained on. See below some examples.

portfolio_view

Data used

This table shows the main datasets used to train and validate our models. These are available here.

#images #instances size comments
nucleus_train 6 221 256*256 in vitro hESC assay
nucleus_val (validation) 4 141 256*256 in vitro hESC assay
kromp_ 2019 52 1,704 640*512 curated from Kromp et al. (2019)
segm_512 3 566 512*512 in vitro hESC assay
SC_human 4 X 256*256 Spinal Cord sections
SC_mouse 6 X 256*256 Spinal Cord sections
SC_sections (validation) 5 X 256*256 Spinal Cord sections



Distribution of the maximum length of the nuclei in the different datasets.

Instalation

Make sure you have access to GPU. Anaconda and foss installed. This package originally used python 3.7.

Download PyTorch models for Nucleus at https://zenodo.org/records/11388472/files/Nucleus_models.gz?download=1

git clone https://github.com/tiagu/Nucleus

conda env create --name nucleus --file=./Nucleus/environment.yml
conda activate nucleus

python -m pip install detectron2==0.4 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cu101/torch1.8/index.html

pip install --no-cache-dir git+https://github.com/tiagu/Nucleus

For slurm users, please see run_nucleus.sh on utils folder.

References

[1] https://scikit-image.org/

[2]https://github.com/facebookresearch/detectron2

[3]https://opencv.org/

[4]https://pytorch.org/

About

Nucleus detects individual nuclei in crowded tissue-like microscopy images

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published