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 models from Meta.

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


Installation

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    

Usage

Middle mouse click - positive point

Ctrl + Middle mouse click - negative point

Time Series Segmentation :

samv2_time_series_demo

Volume Segmentation :

samv2_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

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.5.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

napari_SAMV2-0.0.5-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: napari_samv2-0.0.5.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for napari_samv2-0.0.5.tar.gz
Algorithm Hash digest
SHA256 a3a8677b920a9509026f38e68c9130a7be7aa24ec36e9af54490e8095db8cef2
MD5 675a12b365ff97a16358c6021a4fa575
BLAKE2b-256 5d8609f2678c3a8063a9cd0de9218824a2d46ef487e52e9b8c2614c98c949e0c

See more details on using hashes here.

File details

Details for the file napari_SAMV2-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: napari_SAMV2-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for napari_SAMV2-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 d76fbdcdf91db9990fb99584c83ad943a306370f1428a04b90bb82eb6fe5f101
MD5 42dce1a6029dc2d898fe5ce1c31f8711
BLAKE2b-256 5de16a4b13f09590343e86a7054e48b5fd0e8fbf30c33f424a9c593fc2a8a2cd

See more details on using hashes here.

Supported by

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