Papers / Vision
SAM (2023)
Segment Anything
A model that cuts out whatever you point at, in any image, trained on a billion masks.
Why it matters
Segmentation models had been trained for one dataset's classes. SAM made masks a general tool that works on new kinds of images without retraining, and its dataset was 400 times larger than any before. It became a standard component in labeling tools and in other vision systems.
- Year
- 2023
- Authors
- Alexander Kirillov, Eric Mintun, Nikhila Ravi, Hanzi Mao, Chloe Rolland, Laura Gustafson, Tete Xiao, Spencer Whitehead, Alexander C. Berg, Wan-Yen Lo, et al.
- Venue
- ICCV 2023
- Data
- MS COCO, ADE20K, Cityscapes
The idea
Define segmentation as answering a prompt: a click, a box or a rough mask in, a valid mask out, even when the prompt is ambiguous. A large ViT encodes the image once; a small decoder answers each prompt in about 50 ms. A data engine with the model in the loop produced SA-1B, 1.1 billion masks on 11 million images.
The result
From a single click it beat the previous interactive model on 16 of 23 unseen datasets, including ADE20K and Cityscapes. Prompted with a detector's boxes on COCO it reached 46.5 mask AP with no COCO training, below a supervised model's 51.0 but rated higher by human judges.
The data
MS COCO
2014330k everyday scenes with 1.5M labeled objects in 80 categories. (9 years earlier)




ADE20K
201727,000 scenes where every object, and often its parts, is outlined and named. (6 years earlier)




Cityscapes
20165,000 street photos from 50 cities, every pixel labeled as road, car, person, sky and so on. (7 years earlier)




Builds on
- ViT (2020): Cut an image into 16×16 patches, treat them as words, and a plain Transformer matches the best convolutional networks.
- MAE (2021): Masked 75% of an image's patches and trained a Vision Transformer to reconstruct the missing pixels using an asymmetric encoder–decoder.
- CLIP (2021): Learn images from 400 million captions found on the web, then classify anything you can name.
- DETR (2020): Framed object detection as direct set prediction with a Transformer, dropping anchors and non-maximum suppression.
