Skip to content

3D Extension of the Cellpose Algorithm by Stringer et al., 2021.

License

Notifications You must be signed in to change notification settings

stegmaierj/Cellpose3D

Repository files navigation

Cellpose3D

This repository contains code used for the 3D Cellpose approach proposed in a Preprint, which is an extension of the approach proposed by Stringer et al..

Integrations are also available for the open-source applications XPIWIT and MorphographX, which allow an application of the proposed extension from graphical user interfaces without programming knowledge.

If you use this code, please cite:
D. Eschweiler, R. S. Smith, J. Stegmaier, "Robust 3D Cell Segmentation: Extending the View of Cellpose", arXiv:2105.00794, 2021.

@article{eschweiler2021cellpose3d,
  title={Robust 3D Cell Segmentation: Extending the View of Cellpose},
  author={Eschweiler, Dennis and Smith, Richard S. and Stegmaier, Johannes},
  journal={arXiv preprint arXiv:2105.00794},
  year={2021}
}

Data Preparation

The data needs to be in a hdf5 format containing image data for the network input and gradient information as output. The data is assumed to be in a structure similar to the following schematic.

-|data_root
----|experiment1
--------|images_as_tif
--------|masks_as_tif
----|experiment2
--------|images_as_tif
--------|masks_as_tif

To prepare your own data, proceed as explained in the following steps:

  1. Convert the data using utils.h5_converter.prepare_images and utils.h5_converter.prepare_masks to prepare image and mask data, respectively.
  2. Create a .csv filelist using utils.csv_generator.create_csv, while the input is assumed to be a list of tuples containing image-mask pairs ->
    [('experiment1/images_converted/im_1.h5', 'experiment1/masks_converted/mask_1.h5'),
    ...,
    ('experiment2/images_converted/im_n.h5', 'experiment2/masks_converted/mask_n.h5')]

Training and Application

For training and application use the provided scripts and make sure to adjust the data paths in the models.UNet3D_cellpose accordingly. Processing steps include:

  1. [Optional] Training the network using train_network.py.
  2. Apply the network to the image data to predict gradient maps and foreground segmentation using apply_network.py.
  3. Apply the post-processing steps to the network prediction to reconstruct instance segmentations using apply_cellpose.py.

About

3D Extension of the Cellpose Algorithm by Stringer et al., 2021.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages