Skip to content
imaged

Segment everything

FastSAM-s

Class-agnostic instance masks for every salient region, in one pass.

Apache-2.0
Explore model

About this model

FastSAM-s is the small variant of CASIA-IVA-Lab's FastSAM. It uses a YOLOv8s-seg backbone fine-tuned on SA-1B to return masks for every salient region without prompts. About 47 MB on disk.

On M1 Max, CoreML hits 60 ms warm, around 16 fps. Pair with the heavier FastSAM-x when small or cluttered instances get missed.

What you can build

  • Generate per-object masks for downstream image editing.
  • Find salient regions live for a click-to-cut workflow.
  • Pre-segment frames before a SAM refinement pass.
  • Mask product photos for catalog cleanup at 16 fps.

Variants & downloads

Choose the build for your app

Model files are being prepared.

Explore the model’s examples, source links, and integration notes while download variants are added.

Example inference

Input
A hatchback photographed on a city street.
Output
The same car with each part covered by a colored instance mask.

Performance

Results depend on the device, runtime, and test conditions. Each measurement keeps its own context.

M1 Max, macOS 15, ONNX Runtime 1.17

See original catalog hardware notes · CPU

555.7 ms

Warm inference

Catalog reference · variant unspecifiedCold start (ms): 565.75

Reference result from the existing catalog; conversion variant and measurement date were not recorded.

M1 Max, macOS 15, ONNX Runtime 1.17

See original catalog hardware notes · CoreML

60.3 ms

Warm inference

Catalog reference · variant unspecifiedCold start (ms): 127.03

Reference result from the existing catalog; conversion variant and measurement date were not recorded.

RTX 2060, Ubuntu 24.04, ONNX Runtime 1.24.3

See original catalog hardware notes · CUDA

54.8 ms

Warm inference

Catalog reference · variant unspecified

Reference result from the existing catalog; conversion variant and measurement date were not recorded.

Integration examples

Vision SDK integration

cpp

#include "imaged/sdk.hpp"
#include "imaged/families/fastsam/fastsam_family.hpp"

imaged::SDK::AI ai;
auto& config = ai.getOptions();
config.set("fastsam.model", "weights/fastsam_s.onnx");

imaged::SDK::FastsamFamily family;
family.load(config);

imaged::SDK::Image image;
image.load("scene.jpg");

auto result = std::get<imaged::SDK::DetectionResult>(family.run({&image}));
for (const auto& d : result.detections) {
    // d.boundingBox, d.score, d.mask
}