Skip to main content

Label propagation through deep registration

Project description

napari-labelprop

License PyPI Python Version tests codecov napari hub

Label propagation through deep registration.


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

Installation

To install this project :

pip install napari['all']
git clone https://github.com/nathandecaux/napari-labelprop.git
cd napari-labelprop
pip install -e .

Usage

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 a pretrained model
  • Remove annotated slices : (testing purpose) Function to remove every annotations except for declared slices. Kept slices must be declared in the 'slices' field using comma (',') separation (eg. 5,12,43)

PS : "pretraining" option in the Training menu is still under development

Alternatively, napari and plugin widgets can be called directly from python scripts :

import nibabel as ni
import napari

viewer = napari.view_image(ni.load('images.nii.gz').get_fdata())
viewer.add_labels(ni.load('segmentation.nii.gz').get_fdata().astype('uint8'))
dw, my_widget = viewer.window.add_plugin_dock_widget('napari-labelprop', 'Training')
my_widget.checkpoint_output_dir.value='~'
my_widget.checkpoint_name.value='checkpoint_name'
my_widget.z_axis.value=2
my_widget.pretraining.value=False
napari.run()

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.

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-labelprop-0.0.1.tar.gz (13.6 kB view details)

Uploaded Source

Built Distribution

napari_labelprop-0.0.1-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

Details for the file napari-labelprop-0.0.1.tar.gz.

File metadata

  • Download URL: napari-labelprop-0.0.1.tar.gz
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.17

File hashes

Hashes for napari-labelprop-0.0.1.tar.gz
Algorithm Hash digest
SHA256 f208c046192ee56cde610fbd86e79a5e46fd7af57e373c319474d1d43ad0fc92
MD5 1d1b7e2d7d7858ed8d11842b1eda4e50
BLAKE2b-256 33de3c063bc08ab0a6950f2421e37334411f6dc0295f028f7cf2653520864b8c

See more details on using hashes here.

File details

Details for the file napari_labelprop-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for napari_labelprop-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9b4f5073cdb15aeb2906391c1266c97d4b341a972a95e11807ced2a2c0ca297e
MD5 f283d04e1e5650a8d62ed0580a109797
BLAKE2b-256 0df37252870cd5424b735650c1d5c38b8bd57e1d4f6e1cf4802c1011f03bde8f

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