{"name":"napari-yolov5","display_name":"napari-yolov5","visibility":"public","icon":"","categories":[],"schema_version":"0.2.0","on_activate":null,"on_deactivate":null,"contributions":{"commands":[{"id":"napari-yolov5.widget_wrapper","title":"widget_wrapper","python_name":"napari_yolov5._dock_widget:widget_wrapper","short_title":null,"category":null,"icon":null,"enablement":null}],"readers":null,"writers":null,"widgets":[{"command":"napari-yolov5.widget_wrapper","display_name":"widget_wrapper","autogenerate":false}],"sample_data":null,"themes":null,"menus":{},"submenus":null,"keybindings":null,"configuration":[]},"package_metadata":{"metadata_version":"2.1","name":"napari-yolov5","version":"0.2.14","dynamic":null,"platform":null,"supported_platform":null,"summary":"Plugin adapted from Ultralytics to bring YOLOv5 into Napari","description":"# napari-yolov5\n\n[![License](https://img.shields.io/pypi/l/napari-yolov5.svg?color=green)](https://github.com/rdemets/napari-yolov5/raw/main/LICENSE)\n[![PyPI](https://img.shields.io/pypi/v/napari-yolov5.svg?color=green)](https://pypi.org/project/napari-yolov5)\n[![Python Version](https://img.shields.io/pypi/pyversions/napari-yolov5.svg?color=green)](https://python.org)\n[![tests](https://github.com/rdemets/napari-yolov5/workflows/tests/badge.svg)](https://github.com/rdemets/napari-yolov5/actions)\n[![codecov](https://codecov.io/gh/rdemets/napari-yolov5/branch/main/graph/badge.svg)](https://codecov.io/gh/rdemets/napari-yolov5)\n[![napari hub](https://img.shields.io/endpoint?url=https://api.napari-hub.org/shields/napari-yolov5)](https://napari-hub.org/plugins/napari-yolov5)\n\nPlugin adapted from Ultralytics to bring YOLOv5 into Napari. \n\nTraining and detection can be done using the GUI. Training dataset must be prepared prior to using this plugin. Further development will allow users to use Napari to prepare the dataset. Follow instructions stated on [Ultralytics Github](https://github.com/ultralytics/yolov5) to prepare the dataset.\n\nThe plugin includes 3 pre-trained networks that are able to identify mitosis stages or apoptosis on soSPIM images. More details can be found on the [pre-print](https://www.biorxiv.org/content/10.1101/2021.03.26.437121v1.full).\n\n----------------------------------\n\nThis [napari] plugin was generated with [Cookiecutter] using [@napari]'s [cookiecutter-napari-plugin] template.\n\n\n\n## Installation\n\nFirst install conda and create an environment for the plugin\n```\nconda create --prefix env-napari-yolov5 python=3.9\nconda activate env-napari-yolov5\n```\nYou can install `napari-yolov5` and `napari` via [pip]:\n\n pip install napari-yolov5\n pip install napari[all]\n\nFor GPU support :\n```\npip uninstall torch\npip install torchvision==0.10.0+cu111 -f https://download.pytorch.org/whl/torch_stable.html\n```\n\n## Usage\n\nFirst select if you would like to train a new network or detect objects.\n\n![alt text](https://github.com/rdemets/napari-yolov5/blob/main/src/napari_yolov5/resources/Readme/1.jpg?raw=true)\n\n\n***For `Training` :***\n\nData preparation should be done following [Ultralytics'](https://github.com/ultralytics/yolov5) instructions.\n\nSelect the size of the network, the number of epochs, the number of images per batch to load on the GPU, the size of the images (must be a stride of 32), and the name of the network.\n\n![alt text](https://github.com/rdemets/napari-yolov5/blob/main/src/napari_yolov5/resources/Readme/2.jpg?raw=true)\n\nAn example of the YAML config file is provided in `src/napari_yolov5/resources` folder.\n\n![alt text](https://github.com/rdemets/napari-yolov5/blob/main/src/napari_yolov5/resources/Readme/3.jpg?raw=true)\n\n\nProgress can be seen on the Terminal or on the right-hand side of the viewer.\n\n![alt text](https://github.com/rdemets/napari-yolov5/blob/main/src/napari_yolov5/resources/Readme/4.jpg?raw=true)\n\n\n***For `Detection` :***\n\nIt is possible to perform the detection on a single layer chosen in the list, all the layers opened, or by giving a folder path. For folder detection, all the images will be loaded as a single stack.\n\n![alt text](https://github.com/rdemets/napari-yolov5/blob/main/src/napari_yolov5/resources/Readme/5.jpg?raw=true)\n\nNucleus size of the prediction layer has te be filled to resize the image to the training dataset. Nucleus size of the training dataset will be asked in case of a custom network.\n\nConfidence threshold defines the minimum value for a detected object to be considered positive. \niou nms threshold (intersection-over-union non-max-suppression) defines the overlapping area of two boxes as a single object. Only the box with the maximum confidence is kept.\nProgress can be seen on the Terminal.\n\n![alt text](https://github.com/rdemets/napari-yolov5/blob/main/src/napari_yolov5/resources/Readme/6.jpg?raw=true)\n\nFew options allow for modification on how the boxes are being displayed (default : box + class + confidence score ; box + class ; box only) and if the box coordinates and the image overlay will be exported.\nPost-processing option will perform a simple 3D assignment based on 3D connected component analysis. A median filter (1x1x3 XYZ) is applied prior to the assignment. \nThe centroid of each object is then saved into a new point layer as a 3D point with a random color for each class. \n\n![alt text](https://github.com/rdemets/napari-yolov5/blob/main/src/napari_yolov5/resources/Readme/7.jpg?raw=true)\n\nThe localisation of each centroid is saved and the path is shown in the Terminal at the end of the detection. It is also possible now to define the export folder.\n\n![alt text](https://github.com/rdemets/napari-yolov5/blob/main/src/napari_yolov5/resources/Readme/8.jpg?raw=true)\n\n\n## Contributing\n\nContributions are very welcome. Tests can be run with [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 [GNU GPL v3.0] license,\n\"napari-yolov5\" 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":"https://github.com/rdemets/napari-yolov5","download_url":null,"author":"Richard De Mets","author_email":"demets.richard@gmail.com","maintainer":null,"maintainer_email":null,"license":"GPL-3.0-only","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.7","Programming Language :: Python :: 3.8","Programming Language :: Python :: 3.9","Operating System :: OS Independent","License :: OSI Approved :: GNU General Public License v3 (GPLv3)"],"requires_dist":["connected-components-3d >=3.6.0","flask >=2.2.2","imageio-ffmpeg >=0.4.7","matplotlib >=3.2.2","napari-plugin-engine >=0.1.4","napari >=0.4.15","numpy >=1.18.5","opencv-python >=4.1.2","Pillow >=7.1.2","PyYAML >=5.3.1","qtpy >=2.2.1","requests >=2.23.0","scikit-image >=0.19.3","scipy >=1.4.1","tensorboard >=1.15.0","tensorflow >=2.10.0","torch >=1.9.0","torchvision >=0.8.1","tqdm >=4.41.0","seaborn >=0.11.2","wandb >=0.13.4"],"requires_python":">=3.7","requires_external":null,"project_url":null,"provides_extra":null,"provides_dist":null,"obsoletes_dist":null},"npe1_shim":true}