What is the Segment Anything Model (SAM)?
SAM is an image segmentation model from Meta that can cut out any object in an image at pixel level with a single click.
What is SAM?
The Segment Anything Model is a computer vision model Meta introduced in 2023. Segmentation means determining exactly which pixels in an image belong to an object. A rough box around the object is not enough; its exact outline is extracted.
You show SAM what you want by clicking a point or drawing a box, and the model returns a mask for that object. Click on a dog in a photo and every pixel from its ears to its tail is selected.
Why does it matter?
Before SAM, segmentation models were usually trained separately for specific kinds of objects: one model for cars, another for certain tissues in medical scans. SAM was designed as a general model that also works on object types it has never seen, without extra training.
To build it, Meta created the SA-1B dataset with more than a billion masks across 11 million images and released the model as open source. SAM 2, released in 2024, brought the same ability to video: an object selected in one frame is tracked through the clip.
Where is it used?
- Photo and video editing: background removal and one click object selection.
- E-commerce: cleanly separating product photos from their background.
- Medicine: speeding up the outlining of organs and lesions in scans, under expert review.
- Agriculture and satellite imagery: separating fields, buildings and water.
- Data labeling: preparing the labeled images needed to train new AI models far faster.
SAM versus VLM
A VLM understands an image and describes it in words: "there is a red cup on the table". SAM does not say what the object is; it shows, pixel by pixel, where it starts and ends. Together they are powerful: the VLM understands what is being looked for and SAM cuts it out of the image.