A Meta FAIR release

Segment anything in images and videos

SAM 2 is a segmentation model that enables fast, precise selection of any object in any video or image.
A click, box, or mask on any image or frame of video.

What is SAM 2

SAM 2 is the first unified model for segmenting objects across images and videos. Prompt it with a click, box, or mask to select any object on any image or frame of video.

One model for images and video

A single architecture segments still images and video frames with consistent, high-quality results.

Prompt with a click, box, or mask

Select any object precisely using any prompt type, then use additional prompts to refine predictions.

Built on a scalable data engine

A data engine that extends annotation from images to video powers SAM 2 training at scale.

Open source and reproducible

Checkpoints, inference code, and the web demo are publicly available for research and applications.

Why SAM 2

State-of-the-art segmentation that is faster, more robust, and easier to use than ever before.

SAM 2 builds on Segment Anything and delivers stronger image segmentation quality.

Key capabilities

Segment any object, now in any video or image.

Cross-frame selection

Select one or multiple objects in a video frame and adjust predictions across frames.

Zero-shot robustness

Strong performance on objects and videos never seen during training, enabling real-world applications.

Real-time interactivity

Streaming inference designed for efficient, interactive video processing.

State-of-the-art performance

Top results for object segmentation in both videos and images.

Simple design, fast inference

A unified model with a straightforward design and fast inference speed.

Image and video in one model

The next generation of Meta Segment Anything, bringing image and video together.

Frequently asked questions

Questions about SAM 2, segmentation, and how to get started.







Try it yourself

Track an object across any video interactively with as little as a single click, and create fun effects.