Skip to main content

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.

Release files for napari-samv2 0.1.3

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-samv2 0.1.3
File Size Uploaded
napari_samv2-0.1.3.tar.gz 17.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for napari-samv2 0.1.3
File Interpreter ABI Platform
napari_samv2-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 31.1 kB

Release files / napari_samv2-0.1.3.tar.gz

Download URL napari_samv2-0.1.3.tar.gz
Size 17.3 kB
Tags Source
SHA-256 checksum
How to use checksums
1990839651eb5293cae7d6156acb98826847f028933a4c161a7525735397ceb0
BLAKE2b-256 checksum
How to use checksums
5413fdd5c63cfabb736ed16c1d62c8bf0180eba9ba11de2b8f64fa4ab25c8386
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release files / napari_samv2-0.1.3-py3-none-any.whl

Download URL napari_samv2-0.1.3-py3-none-any.whl
Size 13.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
db49c1fec6081fe5766b04fd96c58f2e54fc133253c723b858541d6a13b25a31
BLAKE2b-256 checksum
How to use checksums
8e27546082deebead50d06eb3c7aabb55e76eb05410ee0752031cf8a5d5c72c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.9

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

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