{"name":"napari-dinosim","display_name":"DINOSim Segmentation","visibility":"public","icon":null,"categories":["Annotation","Segmentation","Acquisition"],"schema_version":"0.3.0","on_activate":null,"on_deactivate":null,"contributions":{"commands":[{"id":"napari-dinosim.make_container_widget","title":"DINOSim Widget","python_name":"napari_dinosim:DINOSim_widget","short_title":null,"category":null,"icon":null,"enablement":null}],"readers":null,"writers":null,"widgets":[{"command":"napari-dinosim.make_container_widget","display_name":"DINOSim Widget","autogenerate":false,"default_dock_area":"right","tabify":false}],"sample_data":null,"themes":null,"menus":{},"submenus":null,"keybindings":null,"configurations":{}},"package_metadata":{"metadata_version":"2.4","name":"napari-dinosim","version":"0.1.7","dynamic":["license-file"],"platform":null,"supported_platform":null,"summary":"A simple plugin to use DINOSim in napari","description":"# DINOSim\n\n[![License: MIT](https://img.shields.io/pypi/l/napari-dinosim.svg?color=blue)](https://github.com/AAitorG/napari-DINOSim/raw/main/LICENSE)\n[![DOI](https://img.shields.io/badge/DOI-10.1002%2Fjemt.70194-bd2635)](https://doi.org/10.1002/jemt.70194)\n[![PyPI](https://img.shields.io/pypi/v/napari-DINOSim.svg?color=green)](https://pypi.org/project/napari-DINOSim)\n[![Python Version](https://img.shields.io/pypi/pyversions/napari-DINOSim.svg?color=green)](https://python.org)\n[![tests](https://github.com/AAitorG/napari-DINOSim/workflows/tests/badge.svg)](https://github.com/AAitorG/napari-DINOSim/actions)\n[![napari hub](https://img.shields.io/endpoint?url=https://api.napari-hub.org/shields/napari-dinosim)](https://napari-hub.org/plugins/napari-dinosim)\n\n![DINOSim-simple](docs/DINOSim-simplest.png)\n\nA [napari] plugin for zero-shot image segmentation using DINOv2 vision transformers.\n\n----------------------------------\n\n## Overview\n\n`napari-DINOSim` enables zero-shot image segmentation by selecting reference points on an image. The plugin leverages DINOv2's powerful feature extraction capabilities to compute similarity maps and generate segmentation masks.\n\nFor detailed information about the widget's functionality, UI elements, and usage instructions, please refer to the [Plugin Documentation](./docs/plugin_documentation.md). A simple [example notebook](./src/DINOSim_example.ipynb) and an [advanced notebook](./src/DINOSim_advanced.ipynb) are also available for programmatic use, showing how to load/save embeddings and references.\n\n## Installation\n\nFor a fresh environment, install `napari-DINOSim` with napari:\n\n```sh\npip install \"napari-dinosim[all]\"\n```\n\nWhen napari is already installed, including through the napari plugin manager, install only the plugin:\n\n```sh\npip install napari-dinosim\n```\n\nTo install from source with [conda]:\n\n```bash\n# Clone the repository\ngit clone https://github.com/AAitorG/napari-DINOSim.git\ncd napari-DINOSim\n\n# Create and activate the conda environment\nconda env create -f environment.yml\nconda activate napari-dinosim\n```\n\n**Note on GPU/CUDA Compatibility:**\nThe runtime will automatically fall back to CPU or Apple MPS if CUDA is unavailable. However, environment installation (e.g., via `conda` or `pip`) may still fail or produce runtime errors on older systems if the installed PyTorch wheel targets an incompatible CUDA version. If you experience GPU-related installation errors, please reinstall PyTorch with a matching CUDA build or opt for the CPU-only version from the [official PyTorch guide](https://pytorch.org/get-started/locally/).\n\n## Usage\n\nTo launch napari, run the following command in your terminal:\n\n```sh\nnapari\n```\n\nWithin the napari interface, go to `Plugins` > `DINOSim Segmentation` > `DINOSim Widget` in the menu bar. You can then:\n1. Drag and drop your image into the napari viewer\n2. Select points on the objects you want to segment\n3. The plugin will automatically generate segmentation masks based on your selections\n\nFor more detailed instructions and examples, please refer to our [Plugin Documentation](./docs/plugin_documentation.md).\n\n## License and contributing\n\nThe code is distributed under the [MIT](https://opensource.org/licenses/MIT) license. Contributions are welcome. Please [open an issue](https://github.com/AAitorG/napari-DINOSim/issues) if you run into a problem.\n\n## Citation\n\nPlease note that DINOSim is based on a [publication](https://doi.org/10.1002/jemt.70194). If you use DINOSim in your research, please be so kind to cite our work:\n\n```bibtex\n@article{Gonzalez-Marfil2026dinosim,\n    author = {González-Marfil, Aitor and Gómez-de-Mariscal, Estibaliz and Arganda-Carreras, Ignacio},\n    title = {DINOSim: Training-Free Semantic Segmentation on Microscopy Images},\n    journal = {Microscopy Research and Technique},\n    year = {2026},\n    doi = {https://doi.org/10.1002/jemt.70194},\n}\n```\n\n[napari]: https://github.com/napari/napari\n[MIT]: http://opensource.org/licenses/MIT\n[pip]: https://pypi.org/project/pip/\n[conda]: https://docs.conda.io/en/latest/miniconda.html\n","description_content_type":"text/markdown","keywords":null,"home_page":null,"download_url":null,"author":"Aitor Gonzalez-Marfil","author_email":"aitorgacad@gmail.com","maintainer":null,"maintainer_email":null,"license":"MIT License\n\nCopyright (c) 2025 Aitor González-Marfil\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","classifier":["Development Status :: 3 - Alpha","Framework :: napari","Intended Audience :: Developers","Intended Audience :: Science/Research","License :: OSI Approved :: MIT License","Operating System :: OS Independent","Programming Language :: Python","Programming Language :: Python :: 3","Programming Language :: Python :: 3 :: Only","Programming Language :: Python :: 3.9","Programming Language :: Python :: 3.10","Programming Language :: Python :: 3.11","Programming Language :: Python :: 3.12","Programming Language :: Python :: 3.13","Topic :: Scientific/Engineering :: Image Processing","Topic :: Scientific/Engineering :: Artificial Intelligence"],"requires_dist":["numpy>=1.21.0","magicgui>=0.5.0","qtpy","torch>=2.0.0","torchvision>=0.15.0","tqdm>=4.62.0","pillow>=9.0.0","matplotlib>=3.5.0","opencv-python","tifffile","napari","napari[all]; extra == \"all\"","tox; extra == \"testing\"","pytest>=8.3.5; extra == \"testing\"","pytest-qt>=4.4.0; extra == \"testing\"","pytest-xvfb>=3.0.0; extra == \"testing\"","pytest-cov>=6.0; extra == \"testing\"","pyqt5>=5.15.11; python_version < \"3.11\" and extra == \"testing\"","PyQt6>=6.7; python_version >= \"3.11\" and extra == \"testing\"","black; extra == \"dev\"","ruff; extra == \"dev\"","mypy; extra == \"dev\"","pre-commit; extra == \"dev\""],"requires_python":"<3.14,>=3.9","requires_external":null,"project_url":["Documentation, https://github.com/AAitorG/napari-DINOSim#readme","Repository, https://github.com/AAitorG/napari-DINOSim","Issues, https://github.com/AAitorG/napari-DINOSim/issues"],"provides_extra":["all","testing","dev"],"provides_dist":null,"obsoletes_dist":null},"npe1_shim":false}