Skip to main content

Napari plugin for segment anything version 2 model from meta. Plugin primarily useful for segmenting 3d volumetric data or 3d time series data.

Project description

napari-SAMV2

Napari plugin to use segment anything version 2.1 models from Meta.

Plugin made for segmenting 3d volumetric data or 3d time series data.


Installation

The plugin requires the following pre-requisite to be installed :

  1. Python and pytorch versions

python>=3.10,torch>=2.5.1 and torchvision>=0.20.1 required

To install pytorch with your respective OS please visit - https://pytorch.org/get-started/locally/

  1. SAM v2 installation from meta

Please refer https://github.com/facebookresearch/sam2

  1. Install napari

python -m pip install "napari[all]"

Following is a sample conda environment installation with the above pre-req

conda create -n samv2_env python=3.10
conda activate samv2_env
pip3 install torch torchvision

git clone https://github.com/facebookresearch/sam2.git && cd sam2
pip install -e .

python -m pip install "napari[all]"

pip install napari-SAMV2

Usage

Middle mouse click - positive point or keyboard shortcut "a"

Ctrl + Middle mouse click - negative point or keyboard shortcut "n"

Time Series Segmentation :

samv2_time_series_demo

Volume Segmentation :

samv2_volume_segmentation

Reference :

Example Data in the demo videos are from,

Cell tracking challenge - https://celltrackingchallenge.net/

and

FlyEM project - https://www.janelia.org/project-team/flyem/hemibrain

License

Distributed under the terms of the BSD-3 license, "napari-SAMV2" is free and open source software

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_samv2-0.0.9.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

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

napari_samv2-0.0.9-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

Details for the file napari_samv2-0.0.9.tar.gz.

File metadata

  • Download URL: napari_samv2-0.0.9.tar.gz
  • Upload date:
  • Size: 17.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for napari_samv2-0.0.9.tar.gz
Algorithm Hash digest
SHA256 5a8dc9b87356072cfbed837cad5a3a01c812f09402e6138de12eaa7859eb2bc7
MD5 b680b62e311ed2aa60cb61872dd65942
BLAKE2b-256 c22b91d0c4a539a1fe265ef56d17edb4d0546976ccf7b5e0c3f5fc3db0eeaaa6

See more details on using hashes here.

File details

Details for the file napari_samv2-0.0.9-py3-none-any.whl.

File metadata

  • Download URL: napari_samv2-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 13.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for napari_samv2-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 61d735ddce914b628ce7b3a6e82f8f6e8b88c5078945d38c1ca1dfea44fd6ab8
MD5 2d1ebb415dae7e7aab97573d636e7555
BLAKE2b-256 a09e03f3f83b9d9daf90466bb3a01ce8c4db1c4d25a5d39389e07a926e58fae7

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