Skip to main content

Napari plugin of algorithms for Panoptic Segmentation of organelles in EM

Project description

empanada-napari

[!IMPORTANT] New Version Announcement!

  • New modules
    • Morph labels - applies morphological operations to labels
    • Count labels - counts and lists the label IDs within the dataset
    • Filter labels - removes small pixel/voxel area labels or labels touching the image boundaries
    • Export and import a model - export or import locally saved model files to use within empanada-napari
  • Updated modules
    • Export segmentations - now allows 3D segmentations to be exported as a single .tiff image
    • Pick and save finetune/training patches - now allows paired grayscale and label mask images to create training patches
    • Split label - now allows users to specify new label IDs
  • Updated documentation
    • Check out the updated documentation here!

The paper describing this work is now available on Cell Systems.

Documentation for the plugin, including more detailed installation instructions, can be found here.

empanada is a tool for deep learning-based panoptic segmentation of 2D and 3D electron microscopy images of cells. This plugin allows the running of panoptic segmentation models trained in empanada within napari. For help with this plugin please open an issue, for issues with napari specifically raise an issue here instead.

Implemented Models

  • MitoNet: A generalist mitochondrial instance segmentation model.

Example Datasets

Volume EM datasets for benchmarking mitochondrial instance segmentation are available from EMPIAR-10982.

Installation

New Users

If you've previously installed and used conda, it's recommended (but optional) to create a new virtual environment in order to avoid dependency conflicts.

empanada-napari works with python=3.9 or lower

It's recommended to have installed napari through conda. Then to install this plugin:

pip install empanada-napari==1.1.0

Launch napari:

napari

Look for empanada-napari under the "Plugins" menu.

Returning Users

If you installed napari into a virtual environment as suggested in the original release documentation, be sure to activate it and uninstall the old empanada-napari.

pip uninstall empanada-napari

Then install the newest version:

pip install empanada-napari==1.1.0

empanada

GPU Support

Note: Mac doesn't support NVIDIA GPUS. This section only applies to Windows and Linux systems.

As for any deep learning models, having a GPU installed on your system will significantly increase model throughput (although we ship CPU optimized versions of all models with the plugin).

This plugin relies on torch for running models. If a GPU was found on your system, then you will see that the "Use GPU" checkbox is checked by default in the "2D Inference" and "3D Inference" plugin widgets. Or if when running inference you see a message that says "Using CPU" in the terminal that means a GPU is not being used.

Make sure that GPU drivers are correctly installed. In terminal or command prompt:

nvidia-smi

If this returns "command not found" then you need to install the driver from NVIDIA. Instead, if if the driver is installed correctly, you may need to switch to the GPU enabled version of torch.

First, uninstall the current version of torch:

pip uninstall torch

Then install torch >= 1.10 using conda for your system. This command should work:

conda install pytorch cudatoolkit=11.3 -c pytorch

Citing this work

If you use results generated by this plugin in a publication, please cite:

@article { Conrad2023,
    author = {Conrad, Ryan and Narayan, Kedar},
    title = {Instance segmentation of mitochondria in electron microscopy images with a generalist deep learning model trained on a diverse dataset},
    journal = {Cell Systems},
    year = {2023},
    month = {Jan},
    day = {18},
    publisher = {Elsevier},
    volume = {14},
    number = {1},
    pages = {58-71.e5},
    issn = {2405-4712},
    doi = {10.1016/j.cels.2022.12.006},
    url = {https://doi.org/10.1016/j.cels.2022.12.006}
}

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

empanada-napari-1.1.0.tar.gz (8.6 MB view details)

Uploaded Source

Built Distribution

empanada_napari-1.1.0-py3-none-any.whl (83.3 kB view details)

Uploaded Python 3

File details

Details for the file empanada-napari-1.1.0.tar.gz.

File metadata

  • Download URL: empanada-napari-1.1.0.tar.gz
  • Upload date:
  • Size: 8.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for empanada-napari-1.1.0.tar.gz
Algorithm Hash digest
SHA256 f4890cb6f20689933e28903dd7d43238aeae32afb53fa225bdf41d4bdcfc2c71
MD5 567905b1c405211a298c3b5038dba609
BLAKE2b-256 904ecc85861b100911ba5bd6ed0b1d6b577cdc14a18f653e27aed648b6897be8

See more details on using hashes here.

File details

Details for the file empanada_napari-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for empanada_napari-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2b0ea0b0fc8fae7fb20e9c0f2371bc8ae77b973c2d98013f86e288833f588c51
MD5 74079d31b1cf3e67a7ddb9038e715c7c
BLAKE2b-256 a4ba9a60c709848afe0c959cbf962812c1d3be4194e4307b19f937781de7431d

See more details on using hashes here.

Supported by

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