fork of the official SAMv2 implementation with cpu support
Project description
Installation
This is a CPU compatible fork of the official SAMv2 implementation. You can download it from pypi using pip
as follows:
pip install samv2
Usage
After downloading the official weights, you can use the load_model()
helper method to instantiate a model.
from sam2 import load_model
model = load_model(
variant="tiny",
ckpt_path="artifacts/sam2_hiera_tiny.pt",
device="cpu"
)
Features 🚀
- CPU compatible
- ships with config files
Citation
@article{ravi2024sam2,
title={SAM 2: Segment Anything in Images and Videos},
author={Ravi, Nikhila and Gabeur, Valentin and Hu, Yuan-Ting and Hu, Ronghang and Ryali, Chaitanya and Ma, Tengyu and Khedr, Haitham and R{\"a}dle, Roman and Rolland, Chloe and Gustafson, Laura and Mintun, Eric and Pan, Junting and Alwala, Kalyan Vasudev and Carion, Nicolas and Wu, Chao-Yuan and Girshick, Ross and Doll{\'a}r, Piotr and Feichtenhofer, Christoph},
journal={arXiv preprint},
year={2024}
}
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
samv2-0.0.2.tar.gz
(57.6 kB
view details)
Built Distribution
samv2-0.0.2-py3-none-any.whl
(72.1 kB
view details)
File details
Details for the file samv2-0.0.2.tar.gz
.
File metadata
- Download URL: samv2-0.0.2.tar.gz
- Upload date:
- Size: 57.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aff567e95310f67015271b01bec663de0bfc7037a8c77d69f0a83df9f1a842dc |
|
MD5 | 5054eeac41d343076eb1dcb354b185b2 |
|
BLAKE2b-256 | 90dfce6783f35e53c915c37e9d00401a7257ec6a3b5ae7ad8db799e65c4a0135 |
File details
Details for the file samv2-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: samv2-0.0.2-py3-none-any.whl
- Upload date:
- Size: 72.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9cdf56fc74813e1eb858269b99447c28ed9f8cc2bf0818a006966c5a8d6b837 |
|
MD5 | e8a802d57af112576a2dfe470fee5e1f |
|
BLAKE2b-256 | dbf1b51b0abfc9a01755a67e6723062abada4c0c666da5c9e9a8fd2433112b0a |