Skip to main content

plugin for cell segmentation

Project description

napari-cellseg3D: a napari plug-in for direct 3D cell segmentation with deep learning

cellseg3d logo

Code style: black License: MIT PyPI Python Version codecov napari hub

A napari plugin for 3D cell segmentation: training, inference, and data review. In particular, this project was developed for analysis of mesoSPIM-acquired (cleared tissue + lightsheet) datasets.


News

June 2022: This is an alpha version, please expect bugs and issues, and help us make the code better by reporting them as an issue!

Installation

Note : we recommend using conda to create a new environment for the plugin.

conda create --name python=3.8 napari-cellseg3d
conda activate napari-cellseg3d

You can install napari-cellseg3d via pip:

pip install napari-cellseg3d

OR directly via napari-hub:

  • Install napari from pip with pip install "napari[all]", then from the “Plugins” menu within the napari application, select “Install/Uninstall Package(s)...”
  • Copy napari-cellseg3d and paste it where it says “Install by name/url…”
  • Click “Install”

Documentation

Available at https://AdaptiveMotorControlLab.github.io/CellSeg3d

You can also generate docs by running make html in the docs folder.

Usage

To use the plugin, please run:

napari

Then go into Plugins > napari-cellseg3d, and choose which tool to use.

  • Review: This module allows you to review your labels, from predictions or manual labeling, and correct them if needed. It then saves the status of each file in a csv, for easier monitoring.
  • Inference: This module allows you to use pre-trained segmentation algorithms on volumes to automatically label cells and compute statistics.
  • Train: This module allows you to train segmentation algorithms from labeled volumes.
  • Utilities: This module allows you to perform several actions like cropping your volumes and labels dynamically, by selecting a fixed size volume and moving it around the image; computing prediction scores from ground truth and predicition labels; or converting labels from instance to segmentation and the opposite.

Requirements

Python >= 3.8 required

Requires pytorch and MONAI. For PyTorch, please see PyTorch's website for installation instructions. A CUDA-capable GPU is not needed but very strongly recommended, especially for training. If you get errors from MONAI regarding missing readers, please see MONAI's optional dependencies page for instructions on getting the readers required by your images.

Issues

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

Testing

To run tests locally:

  • Locally : run pytest in the plugin folder
  • Locally with coverage : In the plugin folder, run coverage run --source=napari_cellseg3d -m pytest then coverage xml to generate a .xml coverage file.
  • With tox : run tox in the plugin folder (will simulate tests with several python and OS configs, requires substantial storage space)

Contributing

Contributions are very welcome.

Please ensure the coverage at least stays the same before you submit a pull request.

For local installation from Github cloning, please run:

pip install -e .

License

Distributed under the terms of the MIT license.

"napari-cellseg3d" is free and open source software.

Acknowledgements

This plugin was developed by Cyril Achard, Maxime Vidal, Mackenzie Mathis. This work was funded, in part, from the Wyss Center to the Mathis Laboratory of Adaptive Motor Control.

Plugin base

This napari plugin was generated with Cookiecutter using @napari's cookiecutter-napari-plugin template.

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

napari_cellseg3d-0.0.2rc6.tar.gz (591.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

napari_cellseg3d-0.0.2rc6-py3-none-any.whl (605.9 kB view details)

Uploaded Python 3

File details

Details for the file napari_cellseg3d-0.0.2rc6.tar.gz.

File metadata

  • Download URL: napari_cellseg3d-0.0.2rc6.tar.gz
  • Upload date:
  • Size: 591.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for napari_cellseg3d-0.0.2rc6.tar.gz
Algorithm Hash digest
SHA256 10cec21568268cdc488a519de72c9222b6c3b2087425b4ea4770a5779cc7336c
MD5 82ec651d42167ca1dd46c15f298e5dda
BLAKE2b-256 cb982484712583687a2928e49fb3aaa517fc1e2144b5dd8d9d2dc0310a09c80f

See more details on using hashes here.

File details

Details for the file napari_cellseg3d-0.0.2rc6-py3-none-any.whl.

File metadata

File hashes

Hashes for napari_cellseg3d-0.0.2rc6-py3-none-any.whl
Algorithm Hash digest
SHA256 923a4d2c5f7a2d0372887ce7a00e6226962f2949c43c131ea40b94d2063d9397
MD5 0216c58e37986c83d482ba139ef1422a
BLAKE2b-256 a555a5768034e57e92ebdfa1a04c3f928e7ae14db4fe338e97cabcd58d3e8132

See more details on using hashes here.

Supported by

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