Skip to main content

EmbedSeg provides automatic detection and segmentation of objects in microscopy images

Project description

License PyPI

Embedding-based Instance Segmentation in Microscopy

Table of Contents

Introduction

This repository hosts the version of the code used for the preprint Embedding-based Instance Segmentation of Microscopy Images.

We refer to the techniques elaborated in the publication, here as EmbedSeg. EmbedSeg is a method to perform instance-segmentation of objects in microscopy images, based on the ideas by Neven et al, 2019.

With EmbedSeg, we obtain state-of-the-art results on multiple real-world microscopy datasets. EmbedSeg has a small enough memory footprint (between 0.7 to about 3 GB) to allow network training on virtually all CUDA enabled hardware, including laptops.

Dependencies

We have tested this implementation using pytorch version 1.1.0 and cudatoolkit version 10.0 on a linux OS machine.

  • One could install EmbedSeg with pip:
conda create -n EmbedSegEnv python==3.7
conda activate EmbedSegEnv
python3 -m pip install EmbedSeg

and then install pytorch:

conda install pytorch==1.1.0 torchvision==0.3.0 cudatoolkit=10.0 -c pytorch
  • Alternately, one could use the environment.yml file (this would also install pytorch, torchvision and cudatoolkit). Create a new environment using :

conda env create -f path/to/environment.yml.

Getting Started

Look in the examples directory, and try out one of the provided notebooks. Please make sure to select Kernel > Change kernel to EmbedSegEnv.

Datasets

3D datasets are available as release assets here. datasets

Training and Inference on your data

*.tif-type images and the corresponding masks should be respectively present under images and masks, under directories train, val and test. (In order to prepare such instance masks, one could use the Fiji plugin Labkit as suggested here). The following would be a desired structure as to how data should be prepared.

$data_dir
└───$project-name
    |───train
        └───images
            └───X0.tif
            └───...
            └───Xn.tif
        └───masks
            └───Y0.tif
            └───...
            └───Yn.tif
    |───val
        └───images
            └───...
        └───masks
            └───...
    |───test
        └───images
            └───...
        └───masks
            └───...

Animated Figures

teaser

Contributing

Contributions are very welcome. Tests can be run with tox.

Issues

If you encounter any problems, please file an issue along with a detailed description.

Citation

If you find our work useful in your research, please consider citing:

@misc{lalit2021embeddingbased,
      title={Embedding-based Instance Segmentation of Microscopy Images}, 
      author={Manan Lalit and Pavel Tomancak and Florian Jug},
      year={2021},
      eprint={2101.10033},
      archivePrefix={arXiv},
      primaryClass={eess.IV}
}

Acknowledgements

The authors would like to thank the Scientific Computing Facility at MPI-CBG, thank Matthias Arzt, Joran Deschamps and Nuno Pimpao Martins for feedback and testing. Alf Honigmann and Anna Goncharova provided the Mouse-Organoid-Cells-CBG data and annotations. Jacqueline Tabler and Diana Afonso provided the Mouse-Skull-Nuclei-CBG dataset and annotations. This work was supported by the German Federal Ministry of Research and Education (BMBF) under the codes 031L0102 (de.NBI) and 01IS18026C (ScaDS2), and the German Research Foundation (DFG) under the code JU3110/1-1(FiSS) and TO563/8-1 (FiSS). P.T. was supported by the European Regional Development Fund in the IT4Innovations national supercomputing center, project number CZ.02.1.01/0.0/0.0/16013/0001791 within the Program Research, Development and Education.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

EmbedSeg-0.2.3.tar.gz (47.5 kB view details)

Uploaded Source

Built Distribution

EmbedSeg-0.2.3-py3-none-any.whl (58.5 kB view details)

Uploaded Python 3

File details

Details for the file EmbedSeg-0.2.3.tar.gz.

File metadata

  • Download URL: EmbedSeg-0.2.3.tar.gz
  • Upload date:
  • Size: 47.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.3.0 pkginfo/1.7.0 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.7.0

File hashes

Hashes for EmbedSeg-0.2.3.tar.gz
Algorithm Hash digest
SHA256 4a968422f1da8c6afbc59121f58382e1b5d776e1f1db637cc4fc68c40b2f25b7
MD5 4b758b8b623b3d9a9f44c56e28d00d05
BLAKE2b-256 28f7d52c031b118cfedf849368b067941aab2c74b9eeead5682e450b87fb4b38

See more details on using hashes here.

File details

Details for the file EmbedSeg-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: EmbedSeg-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 58.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.3.0 pkginfo/1.7.0 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.7.0

File hashes

Hashes for EmbedSeg-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e2a413dbf5f60ec71b4c51a84aaac84e84d7d68a299df1795037d54ba1299bee
MD5 8d213c259cd7c54d415995e886aa27b6
BLAKE2b-256 98f0f961d13f484a8f3d8d2be46e57ac09060454e1ad6f7bc518d4ab12f762a0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page