The original model · 2023
Meta SAM 1: The Original Segment Anything Model One image, one prompt, one precise mask. SAM 1 is the model that started the Segment Anything family. Here is how it works, what it is still good for, and when to choose a newer version.
At a glance
SAM 1 in six facts
Is SAM 1 still the latest? No. It has been followed by SAM 2, SAM 2.1, SAM 3 and the current SAM 3.1. SAM 1 is still useful for simple, click-based cut-outs in still images, and many tools are built on it.
Overview
What is Meta SAM 1?
Meta SAM 1, usually just called SAM, is a promptable image segmentation model. You show it where an object is, and it draws an accurate outline (a mask) around it, even for objects it was never specifically trained to recognise.
What goes in, and what comes out
- In: an image. Any photo or picture, in any domain.
- In: a prompt. One or more clicks, a box, or a rough mask that says which object you mean.
- Out: masks with scores. One or more pixel-accurate masks, each with a quality score so you can pick the best.
Why it mattered: before SAM, a new segmentation task usually meant collecting labels and training a new model. SAM showed that one general model could segment almost anything with just a prompt. Read more in our segmentation overview.
Training data
The SA-1B Dataset: Why SAM 1 Generalises So Well
SAM 1 was trained on SA-1B (Segment Anything 1 Billion), a dataset Meta built alongside the model. Its size and variety are the main reason SAM works on images it has never seen.
- About 11 million images. Licensed, high-resolution photos, with faces and licence plates blurred for privacy.
- About 1.1 billion masks. Roughly 100 masks per image on average, including many small objects.
- Mostly automatic. 99.1% of the final masks were generated by the model itself, after a careful quality check.
How the data was made: the “data engine”
- 1Assisted by handAnnotators clicked on objects and fixed masks proposed by an early version of SAM.
- 2Semi-automaticSAM filled in confident masks, and people focused on the objects it missed.
- 3Fully automaticSAM was prompted with a grid of points across each image to generate the remaining masks.
The SA-1B dataset is available for research under its own licence, separate from the model’s Apache 2.0 licence.
Architecture
How SAM 1 Works
SAM 1 splits the job into one heavy step and two light ones. The heavy step runs once per image, so every extra click after that is almost instant.
- 1Image encoder (heavy, runs once)A Vision Transformer (ViT) turns the whole image into an “embedding”, a compact summary the rest of the model reuses.
- 2Prompt encoder (light)Turns your clicks, box or rough mask into the same kind of representation.
- 3Mask decoder (fast)Combines the two and predicts masks with a quality score for each. Once the image is encoded, this takes about 50 milliseconds, even in a web browser on a CPU.
This split is why SAM feels interactive: you can keep clicking to fix a mask and see the result immediately, without re-processing the image.
Prompt types
Prompts in SAM 1: Points, Boxes and Masks
SAM 1 understands visual prompts only. You show it what you mean; you cannot type a description.
- Points. Positive clicks on the object you want, negative clicks on what to leave out. Best for quick touch-ups.
- Boxes. Draw a rough rectangle around the object and SAM finds the exact shape inside it.
- Masks. Give a rough mask, for example from another model, and SAM refines its edges.
- Mixed. Start with a box, then add a few clicks to fix the edges.
Need to type “red car” instead of clicking? That needs text prompts, which arrived in SAM 3. See our prompt guide.
Ambiguity
One Click, Three Answers
A single click is often ambiguous. Did you mean the logo, the shirt, or the whole person? SAM 1 handles this by returning three candidate masks instead of guessing.
- Three levels. Most real objects nest at most three deep: whole, part and subpart, so three masks cover most cases.
- Scored. Each mask comes with a predicted quality score, so a tool can show the best one first.
- Easy to resolve. Add a second click and SAM usually settles on a single mask.
Model sizes
SAM 1 Checkpoints: ViT-B, ViT-L and ViT-H
Meta released three versions of SAM 1. They differ only in the size of the image encoder, which holds almost all of the parameters.
| Model type | Encoder layers | Encoder parameters | Checkpoint file | Best for |
|---|---|---|---|---|
| vit_b | 12 | 91M | sam_vit_b_01ec64.pth | Laptops, limited GPUs, fast experiments |
| vit_l | 24 | 308M | sam_vit_l_0b3195.pth | Near-ViT-H quality with less compute |
| vit_h Default | 32 | 636M | sam_vit_h_4b8939.pth | Best quality when you have a GPU |
Meta reports that ViT-H improves clearly on ViT-B but only slightly on ViT-L, while taking longer to run. Some studies, for example on medical images, found ViT-B performing just as well, so test on your own images before choosing.
Use cases
What SAM 1 Is Good At
Background removal
Click the subject, get a mask, and remove or replace the background.
Selective effects
Apply colour, blur or glow to the selected object only.
Cut-and-paste designs
Lift objects out of one image and drop them into another.
Data labelling
Pre-label images so people only correct mistakes, then train smaller task-specific models.
Aerial and satellite images
Outline buildings, fields or vehicles in drone and satellite imagery.
Research and medicine
A starting point for specialised versions such as MedSAM, usually after fine-tuning.
More examples on our use cases page.
Strengths and limits
Strengths and Limitations of SAM 1
Strengths
- Works on almost any image, without training on your objects first.
- Needs very little input, often a single click.
- Clean edges that follow object boundaries closely.
- Handles ambiguity by offering three scored masks.
- Fast to interact with, about 50 ms per prompt once the image is encoded.
- Permissive licence (Apache 2.0) and wide support in open-source tools.
Limitations
- No text prompts in the released model. You must click or draw.
- Images only. No video or tracking; that came with SAM 2.
- One object per prompt. It will not find “all instances” of something on its own.
- Crowded scenes with overlapping objects can need extra clicks.
- Specialist domains such as medical imaging often need a fine-tuned version.
- Heavy first step. Encoding each image with ViT-H needs a GPU to be quick.
See also: limitations across the SAM family.
How to use
How to Use Meta SAM 1
There are two ways in: a no-code tool in your browser, or the open-source code.
Without code
- 1Open a playgroundUpload an image in our Playground or another SAM-based tool.
- 2Click the objectAdd more clicks or draw a box until the mask looks right.
- 3ExportDownload the mask or the cut-out. See how to export masks.
With code: install
Requires Python 3.8 or later, PyTorch 1.7 or later and TorchVision 0.8 or later. A CUDA GPU is strongly recommended.
pip install git+https://github.com/facebookresearch/segment-anything.gitThen download a checkpoint (see model sizes). To segment everything in an image at once, use SamAutomaticMaskGenerator instead of the predictor.
With code: your first mask
import cv2, numpy as np
from segment_anything import sam_model_registry, SamPredictor
# 1. Load a checkpoint (vit_h, vit_l or vit_b)
sam = sam_model_registry["vit_h"](checkpoint="sam_vit_h_4b8939.pth")
predictor = SamPredictor(sam)
# 2. Encode the image once (SAM expects RGB)
image = cv2.cvtColor(cv2.imread("photo.jpg"), cv2.COLOR_BGR2RGB)
predictor.set_image(image)
# 3. Prompt with one positive click at (x, y)
masks, scores, logits = predictor.predict(
point_coords=np.array([[500, 375]]),
point_labels=np.array([1]), # 1 = include, 0 = exclude
multimask_output=True, # return 3 candidates
)
best = masks[scores.argmax()]Based on the official segment-anything repository. For a full walkthrough, see the Python tutorial.
Comparison
SAM 1 vs SAM 2 vs SAM 3: Which Should You Use?
Each release kept what came before and added one big ability: video in SAM 2, and text and concept prompts in SAM 3.
| Model | Works on | Prompts | Key ability |
|---|---|---|---|
| SAM 1 | Images | Points, boxes, masks | Click-to-mask in single images |
| SAM 2 | Images, video | Points, boxes, masks | Tracks objects through video with memory |
| SAM 3 | Images, video | Text, exemplars, points, boxes, masks | Finds every instance of a concept |
| SAM 3.1 | Images, video | Same as SAM 3 | Faster multi-object video tracking |
Detailed comparisons: SAM 3 vs SAM 2 · SAM 3 vs SAM 3.1 · alternatives
Quick decision
Pick the Right Model in 10 Seconds
Questions
SAM 1 FAQ
What is Meta SAM 1?
Meta SAM 1, usually just called SAM, is the original Segment Anything Model from Meta AI. You give it an image and a prompt (a click, a box or a rough mask) and it returns a pixel-accurate mask of the object you meant, even for object types it was never labelled with.
When was SAM 1 released?
Meta published the Segment Anything paper, model and SA-1B dataset on 5 April 2023. It was followed by SAM 2 in July 2024, SAM 2.1 in September 2024, SAM 3 in November 2025 and SAM 3.1 in March 2026.
Can SAM 1 understand text prompts like “red car”?
Not in the public release. The released model takes points, boxes and masks. The original paper showed early experiments with free-form text, but that was not part of the model Meta published. For text prompts, use SAM 3 or SAM 3.1.
Does SAM 1 work on video?
No. SAM 1 works on single images. Video segmentation and tracking arrived with SAM 2.
Which SAM 1 checkpoint should I use?
ViT-H (vit_h) is the default and the most accurate. ViT-L is close to ViT-H in quality and lighter. ViT-B is the smallest and fastest, and is a good choice on limited hardware.
Is SAM 1 free for commercial use?
The SAM 1 code and model weights are released under the Apache 2.0 licence. The SA-1B dataset is released under a separate research licence. This is a summary, not legal advice, so read both licences before you ship a product.
Is SAM 1 still worth using?
Yes, for simple click-based cut-outs in still images, or when an existing tool is built on it. For new projects, SAM 3.1 is the current version and does everything SAM 1 does, plus video and text prompts.
Keep reading
Sources
- Kirillov et al., “Segment Anything”, Meta AI Research, 2023 (ICCV 2023)
- facebookresearch/segment-anything on GitHub (code, checkpoints, licence)
- Meta AI blog: SAM 2 and SAM 2.1
- Meta AI blog: SAM 3 and SAM 3.1