Model weights · SAM

Download SAM weights

The original promptable segmentation model, trained on a billion masks, that outlines any object in an image from a simple point or box prompt. Pick a size below and download the official .pt checkpoint in one click, with published accuracy, parameters and license all in view.

Apache-2.0Meta AI · 2023 · Ultralytics (PyTorch)

SAM checkpoints, pick a size and download

The original promptable segmentation model, trained on a billion masks, that outlines any object in an image from a simple point or box prompt.

ModelParamsSizeDownload
SAM base
sam_b.pt
93.7M358 MB
SAM large
sam_l.pt
312.3M1250 MB

Figures are published by the authors. Weights host: github.com. Clicking Download verifies the file and starts it straight from the official CDN.

How to load SAM weights

Install the Ultralytics package, then point the loader at the checkpoint. It downloads automatically on first use, or you can pass the local path to the file you downloaded above.

pip install ultralytics
from ultralytics import SAM

# Downloads on first use, or pass a local path to your .pt file
model = SAM("sam_b.pt")
results = model("image.jpg")

About SAM

The original Segment Anything Model (Meta AI) segments any object in an image from a point, box or mask prompt, trained on the 1-billion-mask SA-1B dataset for strong zero-shot generalization. It is the foundation the whole SAM ecosystem builds on; for video and speed, prefer SAM 2.1 or the distilled MobileSAM / FastSAM below.

Author
Meta AI
Released
2023
Tasks
Segment
Framework
Ultralytics (PyTorch)
Input size
1024px
License
Apache-2.0
Blog

From the blog

Tutorials, code, and notes on computer vision, deep learning, and applied AI.

Build a semantic image search engine with CLIP and Python
Semantic SearchJuly 6, 20267 min read

Build a semantic image search engine with CLIP and Python

Learn how to build a semantic image search engine that finds pictures by meaning. A few lines of Python turn a folder of images into a searchable index you can query in plain English.

YOLO26 vs YOLO11: Real-time ONNX FPS benchmark in Python
YOLO26July 3, 20269 min read

YOLO26 vs YOLO11: Real-time ONNX FPS benchmark in Python

Build one small, reusable class that runs Ultralytics YOLO26 and Ultralytics YOLO11 as ONNX models, draws clean detections, and overlays live FPS and latency so you can compare their real-time speed on the exact same footage.

Depth estimation from a single image with Depth Anything V2
Depth EstimationJuly 1, 20269 min read

Depth estimation from a single image with Depth Anything V2

Learn how to estimate depth from a single image, a video, or your webcam using Depth Anything V2 and a clean, reusable Python class.

Ultralytics object trackers comparison: ByteTrack, BoT-SORT & More
Object TrackingJune 27, 202613 min read

Ultralytics object trackers comparison: ByteTrack, BoT-SORT & More

How do the six Ultralytics trackers actually behave on the same footage? A look at BoT-SORT, ByteTrack, OC-SORT, Deep OC-SORT, FastTrack, and TrackTrack, their internals, trade-offs, and side-by-side results on ID switches, ID stability, and FPS.

How to extract text from images with LightOnOCR and Python
OCRJune 26, 20266 min read

How to extract text from images with LightOnOCR and Python

Learn how to read text from images using LightOnOCR, a small and fast vision language model, with a clean and reusable Python class.

Object tracking and trajectory forecasting with YOLO26 and ByteTrack
YOLO26June 25, 202610 min read

Object tracking and trajectory forecasting with YOLO26 and ByteTrack

Detect, track, and predict the future path of people and vehicles using Ultralytics YOLO26, ByteTrack, and a lightweight velocity-based forecasting model.

Real time bird detection and tracking using YOLO11
YOLO11June 24, 20265 min read

Real time bird detection and tracking using YOLO11

Learn how to detect and track birds using Ultralytics YOLO11 for real-time monitoring and ecological research through computer vision.

How to count people in zones with YOLO26 and OpenCV
YOLO26June 23, 202613 min read

How to count people in zones with YOLO26 and OpenCV

A practical walkthrough of a compact Python script that detects, tracks, and counts people inside polygon zones using Ultralytics YOLO26 and OpenCV.

Build a semantic image search engine with CLIP and Python
Semantic SearchJuly 6, 20267 min read

Build a semantic image search engine with CLIP and Python

Learn how to build a semantic image search engine that finds pictures by meaning. A few lines of Python turn a folder of images into a searchable index you can query in plain English.

YOLO26 vs YOLO11: Real-time ONNX FPS benchmark in Python
YOLO26July 3, 20269 min read

YOLO26 vs YOLO11: Real-time ONNX FPS benchmark in Python

Build one small, reusable class that runs Ultralytics YOLO26 and Ultralytics YOLO11 as ONNX models, draws clean detections, and overlays live FPS and latency so you can compare their real-time speed on the exact same footage.

Depth estimation from a single image with Depth Anything V2
Depth EstimationJuly 1, 20269 min read

Depth estimation from a single image with Depth Anything V2

Learn how to estimate depth from a single image, a video, or your webcam using Depth Anything V2 and a clean, reusable Python class.

Ultralytics object trackers comparison: ByteTrack, BoT-SORT & More
Object TrackingJune 27, 202613 min read

Ultralytics object trackers comparison: ByteTrack, BoT-SORT & More

How do the six Ultralytics trackers actually behave on the same footage? A look at BoT-SORT, ByteTrack, OC-SORT, Deep OC-SORT, FastTrack, and TrackTrack, their internals, trade-offs, and side-by-side results on ID switches, ID stability, and FPS.

How to extract text from images with LightOnOCR and Python
OCRJune 26, 20266 min read

How to extract text from images with LightOnOCR and Python

Learn how to read text from images using LightOnOCR, a small and fast vision language model, with a clean and reusable Python class.

Object tracking and trajectory forecasting with YOLO26 and ByteTrack
YOLO26June 25, 202610 min read

Object tracking and trajectory forecasting with YOLO26 and ByteTrack

Detect, track, and predict the future path of people and vehicles using Ultralytics YOLO26, ByteTrack, and a lightweight velocity-based forecasting model.

Real time bird detection and tracking using YOLO11
YOLO11June 24, 20265 min read

Real time bird detection and tracking using YOLO11

Learn how to detect and track birds using Ultralytics YOLO11 for real-time monitoring and ecological research through computer vision.

How to count people in zones with YOLO26 and OpenCV
YOLO26June 23, 202613 min read

How to count people in zones with YOLO26 and OpenCV

A practical walkthrough of a compact Python script that detects, tracks, and counts people inside polygon zones using Ultralytics YOLO26 and OpenCV.

Frequently asked questions

How do I download SAM weights?
Click the Download button next to any variant in the table above; we verify the file and start it straight from the official CDN. You can also let the loader fetch it automatically on first use with `model = SAM("sam_b.pt")`. All 2 SAM checkpoints are hosted officially.
Is SAM free for commercial use?
SAM is released under Apache-2.0. Apache-2.0 is permissive and commercial-friendly: you can use it in closed-source products with attribution. Always confirm against the linked license text.
Which SAM model size should I use?
Start with SAM base, the smallest and fastest, ideal for prototyping, edge and CPU. Move up the ladder only when you need more accuracy and have the compute for it.