sam2-hiera-small

Maintained By
facebook

sam2-hiera-small

PropertyValue
LicenseApache 2.0
PaperSAM 2: Segment Anything in Images and Videos
TagsMask Generation, SAM2
Downloads20,156

What is sam2-hiera-small?

sam2-hiera-small is a lightweight version of Facebook's SAM2 (Segment Anything Model 2) foundation model, designed for promptable visual segmentation in both images and videos. This model represents a significant advancement in computer vision, capable of performing sophisticated segmentation tasks with minimal prompting.

Implementation Details

The model supports both image and video prediction through dedicated predictors (SAM2ImagePredictor and SAM2VideoPredictor). It implements efficient inference using torch's CUDA acceleration and bfloat16 precision for optimal performance.

  • Supports both point and box-based prompting
  • Implements video propagation for consistent tracking
  • Optimized for CUDA acceleration
  • Utilizes bfloat16 precision for efficiency

Core Capabilities

  • Image segmentation with interactive prompting
  • Video object tracking and segmentation
  • Real-time mask generation
  • Multi-object tracking support
  • Frame-by-frame propagation in videos

Frequently Asked Questions

Q: What makes this model unique?

This model stands out for its ability to perform promptable segmentation across both images and videos, offering a smaller footprint compared to larger SAM2 variants while maintaining robust performance. It's particularly notable for its video propagation capabilities, allowing for consistent object tracking across frames.

Q: What are the recommended use cases?

The model is ideal for applications requiring interactive segmentation, such as content creation tools, video editing software, and computer vision applications where real-time performance is crucial. Its smaller size makes it suitable for deployment in resource-constrained environments.

🍰 Interesting in building your own agents?
PromptLayer provides Huggingface integration tools to manage and monitor prompts with your whole team. Get started here.