The repository provides code for running inference and finetuning with the Meta Segment Anything Model 3 (SAM 3), links for downloading the trained model checkpoints, and example notebooks that show how to use the model.

★ 12,190⑂ 1,844👁 52⑃ 238● 307▤ 0
PythonCreated 2025-07-18ai.meta.com/sam3/
12,190
stars
+0+9+286
1,844
forks
52
watchers
238
prs
307
issues
0
releases
–
discussions

README

SAM 3: Segment Anything with Concepts

Meta Superintelligence Labs

Nicolas Carion\,
Laura Gustafson\,
Yuan-Ting Hu\,
Shoubhik Debnath\,
Ronghang Hu\,
Didac Suris\,
Chaitanya Ryali\,
Kalyan Vasudev Alwala\,
Haitham Khedr\, Andrew Huang,
Jie Lei,
Tengyu Ma,
Baishan Guo,
Arpit Kalla, Markus Marks,
Joseph Greer,
Meng Wang, Peize Sun,
Roman Rädle,
Triantafyllos Afouras,
Effrosyni Mavroudi,
Katherine Xu°,
Tsung-Han Wu°,
Yu Zhou°,
Liliane Momeni°,
Rishi Hazra°,
Shuangrui Ding°,
Sagar Vaze°,
Francois Porcher°,
Feng Li°,
Siyuan Li°,
Aishwarya Kamath°,
Ho Kei Cheng°,
Piotr Dollar†,
Nikhila Ravi†,
Kate Saenko†,
Pengchuan Zhang†,
Christoph Feichtenhofer†

\ core contributor, ° intern, † project lead, order is random within groups

[Paper]
[Project]
[Demo]
[Blog]
[BibTeX]

!SAM 3 architecture SAM 3 is a unified foundation model for promptable segmentation in images and videos. It can detect, segment, and track objects using text or visual prompts such as points, boxes, and masks. Compared to its predecessor SAM 2, SAM 3 introduces the ability to exhaustively segment all instances of an open-vocabulary concept specified by a short text phrase or exemplars. Unlike prior work, SAM 3 can handle a vastly larger set of open-vocabulary prompts. It achieves 75-80% of human performance on our new SA-CO benchmark which contains 270K unique concepts, over 50 times more than existing benchmarks.

This breakthrough is driven by an innovative data engine that has automatically annotated over 4 million unique concepts, creating the largest high-quality open-vocabulary segmentation dataset to date. In addition, SAM 3 introduces a new model architecture featuring a presence token that improves discrimination between closely related text prompts (e.g., “a player in white” vs. “a player in red”), as well as a decoupled detector–tracker design that minimizes task interference and scales efficiently with data.


  
  


 Latest updates

03/27/2026 -- SAM 3.1 Object Multiplex is released. It introduces a shared-memory approach for joint multi-object tracking that is significantly faster without sacrificing accuracy.

- A new suite of improved model checkpoints (denoted as SAM 3.1) are released on Hugging Face. See RELEASE_SAM3p1.md for full details.
   To use the new SAM 3.1 checkpoints, you need the latest model code from this repo. If you have installed an earlier version of this repo, pull the latest code from this repo (with git pull), and then reinstall the repo following Installation below.

 Installation

 Prerequisites

- Python 3.12 or higher
- PyTorch 2.7 or higher
- CUDA-compatible GPU with CUDA 12.6 or higher

1. Create a new Conda environment:

bash
conda create -n sam3 python=3.12
conda deactivate
conda activate sam3


2. Install PyTorch with CUDA support:

bash
pip install torch==2.10.0 torchvision --index-url https://download.pytorch.org/whl/cu128


3. Clone the repository and install the package:

bash
git clone https://github.com/facebookresearch/sam3.git
cd sam

Snapshot: 2026-11-04T14:00:00Z · Data license Apache-2.0 · JSON