{"name":"napari-labelprop","display_name":"napari Label Propagation","visibility":"public","icon":"","categories":[],"schema_version":"0.2.0","on_activate":null,"on_deactivate":null,"contributions":{"commands":[{"id":"napari-labelprop.get_reader","title":"Open data with napari Label Propagation","python_name":"napari_labelprop._reader:napari_get_reader","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-labelprop.write_multiple","title":"Save multi-layer data with napari Label Propagation","python_name":"napari_labelprop._writer:write_multiple","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-labelprop.write_single_image","title":"Save image data with napari Label Propagation","python_name":"napari_labelprop._writer:write_single_image","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-labelprop.make_sample_data","title":"Load sample data from napari Label Propagation","python_name":"napari_labelprop._sample_data:make_sample_data","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-labelprop.make_qwidget","title":"Make example QWidget","python_name":"napari_labelprop._label_prop_widget:TrucQWidget","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-labelprop.make_magic_widget","title":"Make example magic widget","python_name":"napari_labelprop._widget:example_magic_widget","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-labelprop.make_func_widget","title":"Make example function widget","python_name":"napari_labelprop._widget:example_function_widget","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-labelprop.inference_widget","title":"Propagate labels from checkpoint","python_name":"napari_labelprop._label_prop_widget:inference","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-labelprop.training_widget","title":"Training model to propagate labels","python_name":"napari_labelprop._label_prop_widget:training","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-labelprop.filter_widget","title":"Filtering label slices","python_name":"napari_labelprop._label_prop_widget:filter_slices","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-labelprop.get_metrics","title":"Show metrics between two label slices","python_name":"napari_labelprop._label_prop_widget:GetMetrics","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-labelprop.remove_small_objects","title":"Remove objects smaller than the specified size.","python_name":"napari_labelprop._label_prop_widget:remove_small_objects","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-labelprop.get_supervoxels","title":"Get supervoxels","python_name":"napari_labelprop._label_prop_widget:get_supervoxels","short_title":null,"category":null,"icon":null,"enablement":null}],"readers":null,"writers":null,"widgets":[{"command":"napari-labelprop.inference_widget","display_name":"Inference","autogenerate":false},{"command":"napari-labelprop.training_widget","display_name":"Training","autogenerate":false}],"sample_data":[{"command":"napari-labelprop.make_sample_data","key":"unique_id.1","display_name":"napari Label Propagation"}],"themes":null,"menus":{},"submenus":null,"keybindings":null,"configuration":[]},"package_metadata":{"metadata_version":"2.1","name":"napari-labelprop","version":"1.0.0","dynamic":null,"platform":null,"supported_platform":null,"summary":"Label propagation through deep registration","description":"# napari-labelprop\n\n[![License](https://img.shields.io/pypi/l/napari-labelprop.svg?color=green)](https://github.com/nathandecaux/napari-labelprop/raw/main/LICENSE)\n[![PyPI](https://img.shields.io/pypi/v/napari-labelprop.svg?color=green)](https://pypi.org/project/napari-labelprop)\n[![Python Version](https://img.shields.io/pypi/pyversions/napari-labelprop.svg?color=green)](https://python.org)\n[![tests](https://github.com/nathandecaux/napari-labelprop/workflows/tests/badge.svg)](https://github.com/nathandecaux/napari-labelprop/actions)\n[![codecov](https://codecov.io/gh/nathandecaux/napari-labelprop/branch/main/graph/badge.svg)](https://codecov.io/gh/nathandecaux/napari-labelprop)\n[![napari hub](https://img.shields.io/endpoint?url=https://api.napari-hub.org/shields/napari-labelprop)](https://napari-hub.org/plugins/napari-labelprop)\n\n\n\n3D semi-automatic segmentation using deep registration-based 2D label propagation\n---------------------------------------------------------------------------------\n---\n\nThis [napari][napari] plugin was generated with [Cookiecutter][Cookiecutter] using [@napari][@napari]'s [cookiecutter-napari-plugin][cookiecutter-napari-plugin] template.\n\n\n\n## About\n\nSee \"Semi-automatic muscle segmentation in MR images using deep registration-based label propagation\" paper : \n\n[[Paper]![Paper](https://www.integrad.nl/assets/uploads/2016/02/cta-elsevier_logo-no_bg.png)](https://www.sciencedirect.com/science/article/pii/S0031320323002297?casa_token=r5FPBVXYXX4AAAAA:mStyUXb0i4lGqBmfF1j5fV1T9FuCMrpYfwh3lwQve2XAnzUBPZviAiFgMtH7lv6hdcWsA7yM) [[PDF]![PDF](https://www.ouvrirlascience.fr/wp-content/uploads/2018/12/HAL-3.png)](https://hal.science/hal-03945559/document)\n

\n \n

\n\n## Installation\n\nTo install this project :\n\n pip install napari['all']\n pip install git+https://github.com/nathandecaux/napari-labelprop.git\n\n## Usage\n\nDownload [pretrained weights](https://raw.githubusercontent.com/nathandecaux/napari-labelprop/main/pretrained.ckpt).\n\nOpen napari from terminal and start using functions from 'napari-labelprop' plugin (Under Plugins scrolling menu).\n\nAvailable functions are :\n\n- Inference : Propagate labels from trained weights (Pytorch checkpoint required)\n- Training : Start training from scratch or from the pretrained weights.\n\nPS : \"Unsupervised pretraining\" is not yet implemented. See CLI option at [LabelProp](https://github.com/nathandecaux/labelprop) repository.\n\nEvery 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.\n\n##### Training\n\nTo train a model, reach the plugin in the menu bar :\n\n Plugins > napari-labelprop > Training\n\nFill the fields with the following information :\n\n- `Image` : Select a loaded napari.layers.Image layer to segment\n- `Labels` : Select a loaded napari.layers.Labels layer with the initial labels\n- `hints` : Select a loaded napari.layers.Labels layer with scribbled pseudo labels\n- `Pretrained checkpoint` : Select a pretrained checkpoint from the server-side checkpoint directory\n- `Slices shape` : Slices are resample to this shape for training and inference, then resampled to original shape. So far, slices must be squares. \n- `Propagation axis` : Set the axis to use for the propagation dimension\n- `Max epochs` : Set the maximum number of epochs to train the model\n- `Checkpoint output directory`\n- `Checkpoint name`\n- `Weighting criteria` : Defines the criteria used to weight each direction of propagation `ncc = normalized cross correlation (slow but smooth), distance = distance to the nearest label (fast but less accurate)`\n- `Reduction` : When using ncc, defines the reduction to apply to the ncc map `mean / local_mean / none`. Default is `none`\n- `Use GPU` : Set if whether to use the GPU or not. Default is `True` (GPU). GPU:0 is used by default. To use another GPU, set the `CUDA_VISIBLE_DEVICES` environment variable before launching napari.\n\n##### Inference\n\nTo run inference on a model, reach the plugin in the menu bar :\n\n Plugins > napari-labelprop-remote > Inference\n\nFill the fields like in the training section. Then, click on the `Run` button.\n\n## Contributing\n\nContributions are very welcome. Tests can be run with [tox][tox], please ensure\nthe coverage at least stays the same before you submit a pull request.\n\n## License\n\nDistributed under the terms of the [BSD-3][BSD-3] license,\n\"napari-labelprop\" is free and open source software\n\n## Issues\n\nIf you encounter any problems, please [file an issue] along with a detailed description.\n\n[napari]: https://github.com/napari/napari\n[Cookiecutter]: https://github.com/audreyr/cookiecutter\n[@napari]: https://github.com/napari\n[MIT]: http://opensource.org/licenses/MIT\n[BSD-3]: http://opensource.org/licenses/BSD-3-Clause\n[GNU GPL v3.0]: http://www.gnu.org/licenses/gpl-3.0.txt\n[GNU LGPL v3.0]: http://www.gnu.org/licenses/lgpl-3.0.txt\n[Apache Software License 2.0]: http://www.apache.org/licenses/LICENSE-2.0\n[Mozilla Public License 2.0]: https://www.mozilla.org/media/MPL/2.0/index.txt\n[cookiecutter-napari-plugin]: https://github.com/napari/cookiecutter-napari-plugin\n[napari]: https://github.com/napari/napari\n[tox]: https://tox.readthedocs.io/en/latest/\n[pip]: https://pypi.org/project/pip/\n[PyPI]: https://pypi.org/\n","description_content_type":"text/markdown","keywords":null,"home_page":null,"download_url":null,"author":"nathandecaux","author_email":"nathan.decaux@imt-atlantique.fr","maintainer":null,"maintainer_email":null,"license":"BSD-3-Clause","classifier":["Development Status :: 2 - Pre-Alpha","Intended Audience :: Developers","Framework :: napari","Topic :: Software Development :: Testing","Programming Language :: Python","Programming Language :: Python :: 3","Programming Language :: Python :: 3.8","Programming Language :: Python :: 3.9","Programming Language :: Python :: 3.10","Operating System :: OS Independent","License :: OSI Approved :: BSD License"],"requires_dist":["deep-labelprop","napari-nifti","numpy","magicgui","qtpy","tox ; extra == 'testing'","pytest ; extra == 'testing'","pytest-cov ; extra == 'testing'","pytest-qt ; extra == 'testing'","napari ; extra == 'testing'","pyqt5 ; extra == 'testing'"],"requires_python":">=3.8","requires_external":null,"project_url":null,"provides_extra":["testing"],"provides_dist":null,"obsoletes_dist":null},"npe1_shim":false}