The napari hub is transitioning to a community-run implementation due to launch in June 2025.
Since October 1, 2024, this version is no longer actively maintained and will not be updated. New plugins and plugin updates will continue to be listed.

DINOSim Segmentation

napari-dinosim

A simple plugin to use DinoSim in napari

Workflow step:
Image annotation
Image segmentation

License MIT biorxiv PyPI Python Version tests codecov napari hub

DINOSim-simple

A napari plugin for zero-shot image segmentation using DINO vision transformers.


Overview

napari-dinoSim allows users to perform zero-shot image segmentation by selecting reference points on an image. The plugin then computes similarity maps based on features extracted by DINOv2 and generates segmentation masks.

For detailed information on the widget's functionality, UI elements, and usage instructions, please refer to the Plugin Documentation. A simple example notebook demonstrating how to use DINOSim via code is also available.

Installation

You can install napari-dinoSim via pip. For GPU support (recommended), ensure you have a compatible PyTorch version installed with CUDA or MPS support.

pip install napari-dinosim

or from source via conda:

# Clone the repository
git clone https://github.com/AAitorG/napari-dinoSim.git
cd napari-dinoSim

# Create and activate the conda environment
conda env create -f environment.yml
conda activate napari-dinosim

Open the Plugin

To launch napari, run the following command in your terminal:

napari

Within the napari interface, locate the DINOSim segmentation plugin in the Plugins section of the top bar.

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 MIT license, "napari-dinoSim" is free and open source software

Citation

Please note that DINOSim is based on a publication. If you use it successfully for your research, please be so kind to cite our work:

@article {Gonzalez-Marfil2025dinosim,
    title = {DINOSim: Zero-Shot Object Detection and Semantic Segmentation on Electron Microscopy Images},
    author = {Gonz{\'a}lez-Marfil, Aitor and G{\'o}mez-de-Mariscal, Estibaliz and Arganda-Carreras, Ignacio},
    journal = {bioRxiv}
    publisher = {Cold Spring Harbor Laboratory},
    url = {https://www.biorxiv.org/content/early/2025/03/13/2025.03.09.642092},
    doi = {10.1101/2025.03.09.642092},
    year = {2025},
}

Issues

If you encounter any problems, please [file an issue] along with a detailed description.

Version:

  • 0.1.0

Last updated:

  • 14 May 2025

First released:

  • 05 March 2025

License:

  • MIT License Copyright (c) 2025 Aitor González-Marfil Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Supported data:

  • Information not submitted

Plugin type:

GitHub activity:

  • Stars: 0
  • Forks: 0
  • Issues + PRs: 0

Python versions supported:

Operating system:

Requirements:

  • numpy
  • magicgui
  • qtpy
  • torch
  • torchvision
  • tqdm
  • pillow
  • matplotlib
  • opencv-python
  • tifffile
  • napari[all]