Skip to main content

DINOSim

License: MIT DOI PyPI Python Version tests napari hub

DINOSim-simple

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


Overview

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 and an advanced notebook are also available for programmatic use, showing how to load/save embeddings and references.

Installation

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

Note on GPU/CUDA Compatibility: The 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.

Usage

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

napari

Within the napari interface, go to Plugins > DINOSim Segmentation > DINOSim Widget in the menu bar. You can then:

  1. Drag and drop your image into the napari viewer
  2. Select points on the objects you want to segment
  3. The plugin will automatically generate segmentation masks based on your selections

For more detailed instructions and examples, please refer to our Plugin Documentation.

License and contributing

The code is distributed under the MIT license. Contributions are welcome. Please open an issue if you run into a problem.

Citation

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-Marfil2026dinosim,
    author = {González-Marfil, Aitor and Gómez-de-Mariscal, Estibaliz and Arganda-Carreras, Ignacio},
    title = {DINOSim: Training-Free Semantic Segmentation on Microscopy Images},
    journal = {Microscopy Research and Technique},
    year = {2026},
    doi = {https://doi.org/10.1002/jemt.70194},
}

Metadata

Release files for napari-dinosim 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for napari-dinosim 0.1.6
File Size Uploaded Provenance Actions
napari_dinosim-0.1.6.tar.gz 41.3 kB Without provenance Details for napari_dinosim-0.1.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for napari-dinosim 0.1.6
File Interpreter ABI Platform Actions
napari_dinosim-0.1.6-py3-none-any.whl Python 3 none any Details for napari_dinosim-0.1.6-py3-none-any.whl

Total release size: 84.4 kB

Release files / napari_dinosim-0.1.6.tar.gz

Download URL napari_dinosim-0.1.6.tar.gz
Size 41.3 kB
Tags Source
SHA-256 checksum
How to use checksums
5ee03f155cdfc65e44a50c3e8dce9dca1ae0afbdbe961cd84fccf592fd6b7c94
BLAKE2b-256 checksum
How to use checksums
cb78ffff4cc5de58190071842363b4968789a31c315b81035d5ce8d6d32e5abf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / napari_dinosim-0.1.6-py3-none-any.whl

Download URL napari_dinosim-0.1.6-py3-none-any.whl
Size 43.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
42a8b17bd908337f40010d3ef279966d18fb8c95d2cd2021b610e9e9e8e1bee3
BLAKE2b-256 checksum
How to use checksums
d58d8081c8aa5ea19fd3e34149123f29bc3caa4b5b4dbe4b7c27b627779cc2dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Security for napari-dinosim 0.1.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page