Skip to main content

A simple plugin to use DINOSim in napari

Project description

DINOSim

License: MIT biorxiv 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

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

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 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 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/09/22/2025.03.09.642092},
    doi = {10.1101/2025.03.09.642092},
    year = {2025}
}

Contributing

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.

Issues

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

napari_dinosim-0.1.4.tar.gz (38.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

napari_dinosim-0.1.4-py3-none-any.whl (40.7 kB view details)

Uploaded Python 3

File details

Details for the file napari_dinosim-0.1.4.tar.gz.

File metadata

  • Download URL: napari_dinosim-0.1.4.tar.gz
  • Upload date:
  • Size: 38.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for napari_dinosim-0.1.4.tar.gz
Algorithm Hash digest
SHA256 b152b1bd230f635f39b37446257fcadce274f2b9f6bc4356acfa859902b43e1c
MD5 17344114f09b2ac5ef849d7a5ef25f41
BLAKE2b-256 7f64e570d7825194ccc197c0652d4089fab5018a4ee4eebc92636cae60011a3f

See more details on using hashes here.

File details

Details for the file napari_dinosim-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: napari_dinosim-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 40.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for napari_dinosim-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 19c79b9b211725017bc95052a1b170841ff4ea15b8329629af119f8f7782dedc
MD5 2685de6fb6c49f513cae671bee141466
BLAKE2b-256 eca29adc01f2ee6904989091a6c75725e0c99ee113aa8b9804b280361a07ee0f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page