Skip to content

Segment Anything Model 2

A visual segmentation foundation model for images and video

Visit official site

What segment-anything-model-2 is

The model is described as a visual segmentation foundation model for images and video, released by Meta FAIR. A simple transformer architecture with streaming memory enables real-time video processing.

What you can do with it

  • Segment static images and video
  • Generate masks on images automatically
  • Add prompts in video prediction and propagate masks
  • Compile the model for higher speed

Getting started

  • Clone the code base to a local machine
  • Install dependencies and set up the environment
  • Download and load a pretrained checkpoint
  • Run segmentation prediction through the API

Pros & cons

✓ What we like

  • Handles both static images and video
  • Supports multi-object segmentation and tracking in video

! What to watch out for

  • Setup needs the code base, dependencies and model checkpoints
  • Prediction runs through the provided API interface

FAQ

What does it segment?

The card says static images and video are both supported.

How do you start?

Clone the code base, install dependencies, load a checkpoint and call the API.

Last reviewed: 2026-11-15

More LLM API platform tools

View all →

How we review