A napari plugin for zero-shot image segmentation using DINOv2 vision transformers.
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.
For detailed information about the widget's functionality, UI elements, and usage instructions, please refer to the Plugin Documentation. A simple example notebook demonstrating how to use DINOSim programmatically is also available.
You can install napari-DINOSim
via pip:
pip install napari-dinosim
or from source using 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
To launch napari, run the following command in your terminal:
napari
Within the napari interface, locate and click the DINOSim segmentation
plugin in the Plugins section of the top bar. You can then:
- Drag and drop your image into the napari viewer
- Select points on the objects you want to segment
- The plugin will automatically generate segmentation masks based on your selections
For more detailed instructions and examples, please refer to our Plugin Documentation.
Distributed under the terms of the MIT license, "napari-DINOSim" is free and open source software.
Please note that DINOSim is based on a publication. If you use DINOSim in 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}
}
Contributions are very welcome! Tests can be run with tox. Please ensure the test coverage at least stays the same before submitting a pull request.
If you encounter any problems, please file an issue along with a detailed description.