napari-labelprop
3D semi-automatic segmentation using deep registration-based 2D label propagation
This napari plugin was generated with Cookiecutter using @napari's cookiecutter-napari-plugin template.
About
See "Semi-automatic muscle segmentation in MR images using deep registration-based label propagation" paper :
Installation
To install this project :
pip install napari['all']
pip install git+https://github.com/nathandecaux/napari-labelprop.git
Usage
Download pretrained weights.
Open napari from terminal and start using functions from 'napari-labelprop' plugin (Under Plugins scrolling menu).
Available functions are :
- Inference : Propagate labels from trained weights (Pytorch checkpoint required)
- Training : Start training from scratch or from the pretrained weights.
PS : "Unsupervised pretraining" is not yet implemented. See CLI option at LabelProp repository.
Every operation is done in the main thread. So, napari is not responsive during training or inference, but you can still follow the progress in the terminal.
Training
To train a model, reach the plugin in the menu bar :
Plugins > napari-labelprop > Training
Fill the fields with the following information :
Image: Select a loaded napari.layers.Image layer to segmentLabels: Select a loaded napari.layers.Labels layer with the initial labelshints: Select a loaded napari.layers.Labels layer with scribbled pseudo labelsPretrained checkpoint: Select a pretrained checkpoint from the server-side checkpoint directorySlices shape: Slices are resample to this shape for training and inference, then resampled to original shape. So far, slices must be squares.Propagation axis: Set the axis to use for the propagation dimensionMax epochs: Set the maximum number of epochs to train the modelCheckpoint output directoryCheckpoint nameWeighting criteria: Defines the criteria used to weight each direction of propagationncc = normalized cross correlation (slow but smooth), distance = distance to the nearest label (fast but less accurate)Reduction: When using ncc, defines the reduction to apply to the ncc mapmean / local_mean / none. Default isnoneUse GPU: Set if whether to use the GPU or not. Default isTrue(GPU). GPU:0 is used by default. To use another GPU, set theCUDA_VISIBLE_DEVICESenvironment variable before launching napari.
Inference
To run inference on a model, reach the plugin in the menu bar :
Plugins > napari-labelprop-remote > Inference
Fill the fields like in the training section. Then, click on the Run button.
Contributing
Contributions are very welcome. Tests can be run with tox, please ensure the coverage at least stays the same before you submit a pull request.
License
Distributed under the terms of the BSD-3 license, "napari-labelprop" is free and open source software
Issues
If you encounter any problems, please [file an issue] along with a detailed description.
Metadata
Release files for napari-labelprop 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| napari-labelprop-1.0.0.tar.gz | 15.4 kB | Without provenance | Details for napari-labelprop-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| napari_labelprop-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for napari_labelprop-1.0.0-py3-none-any.whl |
Total release size: 31.1 kB
Release files / napari-labelprop-1.0.0.tar.gz
| Download URL | napari-labelprop-1.0.0.tar.gz |
|---|---|
| Size | 15.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
88238dec4b171b9d4a76926233a4dbda3a57234f69c0bb099e623afe3a37d129
|
|
BLAKE2b-256 checksum How to use checksums |
0054c5cc7026a3c51b14f6deddd4e29c8f400599423f6f11dd6c8424746d4294
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10
|
Release files / napari_labelprop-1.0.0-py3-none-any.whl
| Download URL | napari_labelprop-1.0.0-py3-none-any.whl |
|---|---|
| Size | 15.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2982345f1fa77f238929ca2357bd65e4791c4926527f9325dcadc90b2958aa4f
|
|
BLAKE2b-256 checksum How to use checksums |
9fdb14fcab7f6cad9ee969facc2df49fc5e95d197c3a4b68e0f78f840ef8857d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10
|
Security for napari-labelprop 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.