Napari plugin to use segment anything version 2 models from Meta.
Plugin primarily made for segmenting 3d volumetric data or 3d time series data.
Pre-requisite of samv2 installation needed: --- Our current plugin supports only sam v 2.0 not 2.1. So, we need to pull the SAM repo around september 15 ,2024 (last update of SAM2.0)
git clone https://github.com/facebookresearch/segment-anything-2.git
cd segment-anything-2
git rev-list -n 1 --before="2024-09-15" HEAD
git checkout <commit_hash>
pip install -e .
You can install napari-SAMV2
via pip:
pip install napari-SAMV2
The plugin and installation tested with python 3.10 in conda environment with pytorch-cuda=12.1
conda environment with example :
conda create -n samv2_env python=3.10
conda activate samv2_env
conda install pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidia
python -m pip install "napari[all]"
git clone https://github.com/facebookresearch/segment-anything-2.git
cd segment-anything-2
git rev-list -n 1 --before="2024-09-15" HEAD
git checkout <commit_hash>
pip install -e .
pip install napari-SAMV2
Middle mouse click - positive point
Ctrl + Middle mouse click - negative point
Time Series Segmentation :
Volume Segmentation :
Reference :
Example Data from in demo videos from, Cell tracking challenge - https://celltrackingchallenge.net/ FlyEM project - https://www.janelia.org/project-team/flyem/hemibrain
Distributed under the terms of the BSD-3 license, "napari-SAMV2" is free and open source software
If you encounter any problems, please file an issue along with a detailed description.