# YavorGIvanov/sam.cpp

Repository: https://github.com/YavorGIvanov/sam.cpp
Canonical: https://ross.abutalabs.com/products/samcpp
Language: C++
License: MIT
License Family: permissive
Last push: 2023-10-24T20:49:51+00:00

## Health v2 (maintenance only)
Score: 28/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 79
- inputs: {"age_days": 1106, "days_push": 1044, "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 1275, forks 62 (observed 2026-08-28T04:04:12.872496+00:00)

## What it is
A pure C/C++ implementation of Meta's Segment Anything Model (SAM) for image segmentation inference, built on the ggml tensor library. It converts PyTorch checkpoints to ggml format and runs segmentation locally with an optional SDL2-based GUI.

## Use cases
- run segment anything model locally without python
- segment objects in images using C++
- convert SAM pth checkpoints to ggml format
- on-device image segmentation inference
- interactive image segmentation with a native GUI

## When to choose
- you need SAM inference in C/C++ without a Python runtime
- you want lightweight, dependency-minimal local segmentation
- you're integrating SAM into a native C++ application

## When to avoid
- you need training or fine-tuning of SAM
- you want GPU-accelerated production inference at scale
- you need the latest SAM features or active development

## Facets
- artifact type: library
- maturity: maintenance
- function: machine-learning, computer-vision, image-processing, llm-inference
- domain: computer-vision, image-processing, machine-learning
- platform: windows, cpp, cross-platform
- tags: segment-anything, ggml, image-segmentation, inference, sdl2, linux, macos

## Member repositories
- YavorGIvanov/sam.cpp (main) score 28

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:12.872496+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-30T05:03:00.311163+00:00, confidence not recorded.
  - readme: https://github.com/YavorGIvanov/sam.cpp (fetched 2026-08-28T04:04:12.872496+00:00, sha afb11f3f2c8b)
- Data as of 2026-08-30T08:39:29.467469+00:00.
