Model weights · FastSAM

Download FastSAM weights

A CNN take on segment-anything built on YOLOv8-seg, reaching similar masks far faster than the original transformer-based SAM. Pick a size below and download the official .pt checkpoint in one click, with published accuracy, parameters and license all in view.

AGPL-3.0CASIA IVA · 2023 · Ultralytics (PyTorch)

FastSAM checkpoints, pick a size and download

A CNN take on segment-anything built on YOLOv8-seg, reaching similar masks far faster than the original transformer-based SAM.

ModelParamsDownload
FastSAM-s
FastSAM-s.pt
11.8M
FastSAM-x
FastSAM-x.pt
72.2M

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 FastSAM 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 FastSAM

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

About FastSAM

FastSAM reframes segment-anything as a YOLOv8-seg instance-segmentation problem plus prompt-guided selection, reaching comparable masks at up to 50x the speed of the original SAM. A pragmatic CNN alternative when you want SAM-style prompting without a transformer's cost.

Author
CASIA IVA
Released
2023
Tasks
Segment
Framework
Ultralytics (PyTorch)
Input size
1024px
License
AGPL-3.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 FastSAM 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 = FastSAM("FastSAM-s.pt")`. All 2 FastSAM checkpoints are hosted officially.
Is FastSAM free for commercial use?
FastSAM is released under AGPL-3.0. That is free for open-source and research; closed-source commercial deployments need an Ultralytics Enterprise license. Always confirm against the linked license text.
Which FastSAM model size should I use?
Start with FastSAM-s, 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.