SAM 2 (Segment Anything in Images and Videos)

Detection & segmentation · neural · 2024 · images · video

What it is

A promptable unified segmentation model extending visual mask prediction to real-time streaming video through a spatio-temporal memory bank and memory attention.

When to use it

Interactive video object tracking, zero-shot video segmentation, and fast pixel-accurate mask propagation across temporal cuts.

Caveats

Tracking can drift or lose the object after long occlusions, across shot changes, or in crowded scenes with similar-looking objects. Each object is tracked separately, so cost grows with the number of objects, and like SAM it outputs masks without class labels.

Key ideas

  • Memory bank stores past frame embeddings and interactive prompt selections
  • Memory attention block cross-attends current visual features against historical memory tokens
  • Runs at 44+ FPS in real-time streaming inference mode

Related architectures

Original paper

SAM 2: Segment Anything in Images and Videos (2024, arXiv)

Browse all 198 architectures

The architecture landscape, in one place.

Two things get called “ML architecture”: the classical statistical model families, and the neural network wirings. Both are here, tagged by what they are and what data they eat.

Start from your problem

Architectures

0 shortlisted