{"name":"napari-spofi","display_name":"Spot Finder","visibility":"public","icon":"","categories":["Annotation","Segmentation","Visualization"],"schema_version":"0.2.0","on_activate":null,"on_deactivate":null,"contributions":{"commands":[{"id":"napari-spofi.widget","title":"Open Spot Finder widget","python_name":"napari_spofi._widget:SpotFinderWidget","short_title":null,"category":null,"icon":null,"enablement":null}],"readers":null,"writers":null,"widgets":[{"command":"napari-spofi.widget","display_name":"spot finder","autogenerate":false}],"sample_data":null,"themes":null,"menus":{},"submenus":null,"keybindings":null,"configuration":[]},"package_metadata":{"metadata_version":"2.1","name":"napari-spofi","version":"0.0.1","dynamic":null,"platform":null,"supported_platform":null,"summary":"napari plugin to interactively train and test a StarDist model","description":"# napari-spofi\n\n[![License BSD-3](https://img.shields.io/pypi/l/napari-spofi.svg?color=green)](https://github.com/githubuser/napari-spofi/raw/main/LICENSE)\n[![PyPI](https://img.shields.io/pypi/v/napari-spofi.svg?color=green)](https://pypi.org/project/napari-spofi)\n[![Python Version](https://img.shields.io/pypi/pyversions/napari-spofi.svg?color=green)](https://python.org)\n[![tests](https://github.com/githubuser/napari-spofi/workflows/tests/badge.svg)](https://github.com/githubuser/napari-spofi/actions)\n[![codecov](https://codecov.io/gh/githubuser/napari-spofi/branch/main/graph/badge.svg)](https://codecov.io/gh/githubuser/napari-spofi)\n[![napari hub](https://img.shields.io/endpoint?url=https://api.napari-hub.org/shields/napari-spofi)](https://napari-hub.org/plugins/napari-spofi)\n\nnapari plugin to interactively train and test a StarDist model\n\n----------------------------------\n\nThis [napari] plugin was generated with [Cookiecutter] using [@napari]'s [cookiecutter-napari-plugin] template.\n\n\n\n## Description\n\nThis plugin provides tools for annotating spots in a 3D two-channel image (hdf5 type input file),\nsubmitting tiles for StarDist model generation or model re-training, and refining initial annotations\nbased on predictions (kind of human-in-the-loop approach).\n\nThe objects of interest in the image are sphere-like spots with a diameter of just a\nfew pixels and are thus well suited for StarDist instance segmentation. The image \ndimensions are typically 1024x1024 pixels in xy and ≥ 64 sections in z.\n\n\n## Installation\n\nWith python and pip installed (e.g., via miniconda or miniforge),\nit is recommended to create a new environment and install `napari-spofi` using pip.\n\n pip install napari napari-spofi\n\n## Starting `napari-spofi`\n\nStart `napari` and select \"spot finder (napari-spofi)\" from the \"plugin\" menu.\n\n### Annotate image\nGo to the 'annotation' section of the widget and create a new directory for annotations. Add an image\nfolder containing at least one h5 file (foreground and background, e.g., 'ch1' & 'ch2'). Select an image file, foreground and background\nchannels. Load the image file.\n\nInspect the image for distinct regions. To help locate relevant tile positions, make\nthe 'checkerboard' layer visible. While the 'tiles' layer is active, double-click a tile\nto add it to the list of tiles. This list will be used to generate a set of \nimages and masks for training purposes.\n\nSwitch to napari's 2D view. Navigate to the centre section of each spot in the active tile\nand annotate by adding points (one point per spot) using the 'true' points layer. The\nbuilt-in heuristic will automatically annotate pixels that belong to individual spots.\nSome image enhancement step before loading images may be beneficial. \n\nAnnotate tiles in one or a multiple images.\nTo prepare training data, use the 'extract spots' button.\n\n### Train a StarDist model\nGo to the 'training' section of the widget. Adjust the \"number of epochs\". For a first\ncheck, 100 epochs is a good start. The plugin uses a simplified setup for StarDist\nconfigurations (please see [StarDist](https://github.com/stardist/stardist/) for a full discussion).\n\nStart training and watch the 'loss' and 'val_loss' values, which should decrease\nsteadily while their ratio should roughly remain at 1 as training progresses.\n\nThe retrain option allows the selection of an existing model for retraining.\n\n### Predict instances\nGo to the 'prediction' section of the widget to start spot prediction for the\ncurrently loaded image. Select the appropriate model from the given annotation\ndirectory. The 'threshold' value is calculated from the validation data and can be\nadjusted. Start a new prediction and load the predicted spots when the process has\nfinished. (It is possible to load an existing prediction).\n\n### Polish annotation\nPredicted spots will be loaded into two new layers: 'predicted' and 'edited'. The\n'predicted' layer is not editable and gives an overview of the spots found. Check\nyour annotation in the active tiles ('true' layer) and compare it carefully with\nthe spots in the 'edited' layer.\nAdjust the positions of the spots or remove any incorrect spots from the 'edited'\nlayer. Extract the spots and train a new model or retrain the model.\n\n\n\n## Contributing\n\nContributions are very welcome.\n\n## License\n\nDistributed under the terms of the [BSD-3] license,\n\"napari-spofi\" 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\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":"Christian Schulze","author_email":"drchrisch@gmail.com","maintainer":null,"maintainer_email":null,"license":"BSD-3-Clause","classifier":["Development Status :: 2 - Pre-Alpha","Framework :: napari","Intended Audience :: Developers","License :: OSI Approved :: BSD License","Operating System :: OS Independent","Programming Language :: Python","Programming Language :: Python :: 3","Programming Language :: Python :: 3 :: Only","Programming Language :: Python :: 3.8","Programming Language :: Python :: 3.9","Programming Language :: Python :: 3.10","Topic :: Scientific/Engineering :: Image Processing","Topic :: Scientific/Engineering :: Visualization"],"requires_dist":["numpy","pandas","magicgui","qtpy","scikit-image","pyclesperanto","tensorflow","stardist","tox ; extra == 'testing'","napari ; extra == 'testing'","pyqt5 ; extra == 'testing'"],"requires_python":">=3.8","requires_external":null,"project_url":["Bug Tracker, https://github.com/drchrisch/napari-spofi/issues","Documentation, https://github.com/drchrisch/napari-spofi#README.md","Source Code, https://github.com/drchrisch/napari-spofi","User Support, https://github.com/drchrisch/napari-spofi/issues"],"provides_extra":["testing"],"provides_dist":null,"obsoletes_dist":null},"npe1_shim":false}