Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

samv2

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

samv2

fork of the official SAMv2 implementation with cpu support

  • 0.0.4
  • PyPI
  • Socket score

Maintainers
1

Open In Colab Build and Tests

CPU compatible fork of the official SAMv2 implementation.

Features 🚀

  • CPU compatible
  • ships with config files
  • Run image and video inference on CPUs
  • Example notebooks showcasing inference using weights and biases.

Installation

You can download it from pypi using pip as follows:

pip install samv2

or from the repository:

pip install git+https://github.com/SauravMaheshkar/samv2.git

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"
)
  • Open In Colab Example Notebook to run prompted segmentation on images logging predictions as W&B Tables.
  • Open In Colab Example Notebook to run automatic segmentation on images logging predictions as W&B Tables.

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}
}

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc