# meta-pytorch/segment-anything-fast

A batched offline inference oriented version of segment-anything

Repository: https://github.com/meta-pytorch/segment-anything-fast
Canonical: https://ross.abutalabs.com/products/segment-anything-fast
Language: Python
License: Apache-2.0
License Family: permissive
Last push: 2025-08-22T23:43:32+00:00

## Health v2 (maintenance only)
Score: 45/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 38, release rhythm 35, longevity 78
- inputs: {"age_days": 1099, "days_push": 376, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1321, forks 80 (observed 2026-08-28T04:04:21.864171+00:00)

## What it is
A fast, batched offline inference-oriented fork of Meta's Segment Anything (SAM) image segmentation model. It applies optimizations like bfloat16, torch.compile with max-autotune, custom Triton SDPA kernels, and quantization as a drop-in replacement for segment-anything.

## Use cases
- run segment anything faster on A100 GPUs
- batch offline inference for image segmentation
- drop-in replacement for segment-anything with speedups
- accelerate SAM with torch.compile and bfloat16
- segment large batches of images quickly
- optimize vision transformer inference with Triton kernels

## When to choose
- you already use segment-anything and need faster batched inference on NVIDIA GPUs
- you can use PyTorch nightly and A100-class hardware
- you want automatic optimizations like compile, quantization, and sparsity

## When to avoid
- you need training or fine-tuning rather than inference
- you are not on NVIDIA GPU hardware and cannot tolerate compile overhead
- you need the full upstream segment-anything feature set or long-term stability

## Facets
- artifact type: library
- maturity: active
- function: machine-learning, llm-inference, image-processing, gpu-computing
- domain: computer-vision, image-processing, deep-learning, artificial-intelligence
- platform: python, cross-platform
- tags: segment-anything, sam, image-segmentation, torch-compile, triton-kernels, inference-optimization, bfloat16, quantization, gpu, linux

## Member repositories
- meta-pytorch/segment-anything-fast (main) score 45

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:21.864171+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:47:18.525422+00:00, confidence not recorded.
  - readme: https://github.com/meta-pytorch/segment-anything-fast (fetched 2026-08-28T04:04:21.864171+00:00, sha bfc8be8781fc)
- Data as of 2026-08-30T08:39:29.467469+00:00.
