SAM

Kirillov 2023 · Paper

One-line summary — Segment Anything: a promptable segmentation foundation model trained on 1.1B masks from 11M images that segments arbitrary objects zero-shot from point, box, or mask prompts.

Problem

Segmentation research was fragmented into task-specific models — interactive, semantic, instance, panoptic — each requiring its own labeled dataset and training run, and none transferring zero-shot to new image distributions or new tasks. NLP had shown that a foundation model trained at sufficient scale on a promptable task can generalize to tasks it was never explicitly trained for. The Segment Anything project asks what the equivalent task, model, and dataset are for segmentation — the catch being that masks are not naturally abundant on the internet, so billion-scale annotation had to be manufactured.

Method & architecture

The project has three interconnected components: a promptable segmentation task (return a valid mask for any prompt — point, box, mask, or exploratory free-form text), the model (SAM), and a data engine producing SA-1B.

SAM has three modules, designed so the expensive part is amortized per image:

Ambiguity: a single click can validly mean whole/part/subpart, so SAM predicts 3 output masks per prompt with a predicted IoU confidence each; training backpropagates only the minimum loss over the three. Mask supervision is a linear combination of focal loss and dice loss, with an interactive setup simulated by sampling prompts over 11 rounds per mask.

Data engine (model-in-the-loop, three stages): (1) assisted-manual — annotators click with SAM in the loop, 4.3M masks from 120k images, per-mask time falling from 34 s to 14 s as the model was retrained 6 times; (2) semi-automatic — SAM pre-fills confident masks, annotators add the rest, +5.9M masks from 180k images; (3) fully automatic — prompt SAM with a 32×32 point grid, keep masks that are confident (predicted IoU) and stable (thresholding the probability map at 0.5δ0.5-\delta and 0.5+δ0.5+\delta yields similar masks), deduplicate with NMS. Applied to all 11M images, this yielded SA-1B: 1.1B masks, ~100 masks/image, 11x more images and 400x more masks than Open Images; released images downsampled to 1500 px shortest side.

Results

Why it matters for SLAM

SAM gave SLAM systems class-agnostic object masks on demand — the missing ingredient for open-vocabulary semantic mapping. Paired with a text-prompted detector (Grounded SAM = Grounding DINO + SAM), it powers 3D scene-graph and open-vocabulary mapping systems like ConceptGraphs and Clio, and provides clean masks for dynamic-object removal. Its per-image amortized design (heavy encoder once, cheap prompts many times) fits SLAM keyframe pipelines, and its video successor SAM 2 adds the temporal consistency SLAM actually needs across frames.