Short Explanation
Upload an image and optionally provide points, boxes, or text prompts; FastSAM returns segmentation masks much faster than the original SAM-style workflow.
FastSAM is a fast Segment Anything style image segmentation tool that supports everything, point, box, and text prompt modes.
Core parameters, trigger timing, and visual before/after demo references.
Upload an image and optionally provide points, boxes, or text prompts; FastSAM returns segmentation masks much faster than the original SAM-style workflow.
Prepare the scene, image, video, sensor stream, prompt, or configuration expected by the original project.
Read the produced visualization, prediction, map, trajectory, mask, grasp pose, or other documented artifact.
A quick-run style example for the documentation page.
Readable controls and the meaning of each returned artifact.
img_pathfileImage to segment.
text_prompttextthe yellow dogText-guided prompt used to select one target region from candidate masks.
box_prompttextBounding box prompt in pixel coordinates, used when the target region is already localized.
point_prompttextForeground/background point coordinates for interactive segmentation.
maskBinary segmentation mask for the selected object or image regions.
scoreMask confidence or proposal ranking score from the segmentation model.
overlayRendered mask visualization over the input image.
Official resources, deployment steps, academic context, citation, and source-reported benchmark numbers.
# Relative-path local entry for the FastSAM tool folder python tools/fastsam/Inference.py --model_path tools/fastsam/weights/FastSAM.pt --img_path tools/fastsam/images/dogs.jpg # Prompt modes: python tools/fastsam/Inference.py --model_path tools/fastsam/weights/FastSAM.pt --img_path tools/fastsam/images/dogs.jpg --text_prompt "the yellow dog" python tools/fastsam/Inference.py --model_path tools/fastsam/weights/FastSAM.pt --img_path tools/fastsam/images/dogs.jpg --box_prompt "[[570,200,230,400]]" python tools/fastsam/app_gradio.py # Suggested repository layout: # tools/fastsam/README.md # tools/fastsam/Inference.py # tools/fastsam/app_gradio.py # tools/fastsam/images/ # tools/fastsam/output/ # This page documents the path. The static page does not execute FastSAM.
{
"tool": "fastsam",
"status": "ok",
"masks": [
{
"label": "Promptable segmentation",
"score": 0.87,
"output": "Segmentation masks"
}
],
"timing": {
"runtime": "FastSAM reports 40 ms on a single NVIDIA RTX 3090 and 68M parameters; the paper states 50x faster than SAM-H with 32x32 point prompts and 170x faster than SAM-H with 64x64.",
"device": "documented in source benchmark when available"
},
"artifacts": {
"visualization": "tools/fastsam/runs/visualization.png",
"raw_predictions": "tools/fastsam/runs/predictions.json"
}
}Paper identity and contribution summary.
@misc{fastsam2023,
title={Fast Segment Anything},
author={Xu Zhao and Wenchao Ding and Yongqi An and Yingqi Du and Tao Yu and Min Li and Ming Tang and Jinqiao Wang},
year={2023},
note={arXiv:2306.12156, 2023},
url={https://arxiv.org/abs/2306.12156}
}Only compact, source-reported numbers are shown here.
| Dataset | Metric | Value | Runtime | Source |
|---|---|---|---|---|
| COCO object proposal | Box AR@1000 | 63.7, reported 1.2 points above SAM-H E32 | 40 ms on one RTX 3090 | FastSAM paper |
| LVIS v1 | BBox AR@1000 / AR_s / AR_m / AR_l | 57.1 / 44.3 / 77.1 / 85.3 | 68M parameters | FastSAM paper |
FastSAM paper, speed table, COCO/LVIS proposal tables, prompt modes, Gradio demo, Replicate demo, model checkpoints, and output masks.
Visual references from the original tool. Click any image to inspect the original size.