# ChaoningZhang/MobileSAM

This is the official code for MobileSAM project that makes SAM lightweight for mobile applications and beyond!

Repository: https://github.com/ChaoningZhang/MobileSAM
Canonical: https://ross.abutalabs.com/products/mobilesam
Language: Jupyter Notebook
License: Apache-2.0
License Family: permissive
Last push: 2026-05-05T11:00:13+00:00

## Health v2 (maintenance only)
Score: 65/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 80, release rhythm 35, longevity 83
- inputs: {"age_days": 1165, "days_push": 120, "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 5858, forks 586 (observed 2026-08-28T04:09:31.724944+00:00)

## What it is
MobileSAM is the official implementation of a lightweight version of Meta's Segment Anything Model (SAM), replacing the heavyweight image encoder with a tiny one for fast segmentation on CPUs and mobile devices. It also includes MobileSAMv2 with object-aware prompt sampling for faster segment-everything mode, and supports ONNX export for deployment.

## Use cases
- run segment anything model on cpu or mobile devices
- segment objects in images quickly with a lightweight model
- export a segmentation model to onnx for browser or mobile deployment
- add fast auto-labeling segmentation to annotation tools
- integrate sam-based mask generation into image editing or inpainting pipelines

## When to choose
- you need SAM-style promptable segmentation but with low latency or limited compute
- you want to run segmentation on CPU, mobile, or in the browser
- you need a drop-in lightweight replacement for the original SAM image encoder

## When to avoid
- you need the highest possible segmentation accuracy and can afford the full SAM or larger variants
- you need training/fine-tuning infrastructure rather than inference
- your project depends on features only in newer official SAM releases

## Facets
- artifact type: library
- maturity: stable
- function: machine-learning, computer-vision, image-processing, llm-inference
- domain: computer-vision, image-processing, machine-learning, artificial-intelligence
- platform: python, cross-platform, wasm
- tags: segment-anything, sam, lightweight-model, onnx-export, image-segmentation, mobile-inference, gpu

## Member repositories
- ChaoningZhang/MobileSAM (main) score 65

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:31.724944+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-29T17:51:38.221780+00:00, confidence not recorded.
  - readme: https://github.com/ChaoningZhang/MobileSAM (fetched 2026-08-28T04:09:31.724944+00:00, sha af17d534d13c)
- Data as of 2026-08-30T08:39:29.467469+00:00.
