# facebookresearch/sam2

The repository provides code for running inference with the Meta Segment Anything Model 2 (SAM 2), links for downloading the trained model checkpoints, and example notebooks that show how to use the model.

Repository: https://github.com/facebookresearch/sam2
Canonical: https://ross.abutalabs.com/products/sam2
Language: Jupyter Notebook
License: Apache-2.0
License Family: permissive
Last push: 2026-05-30T02:29:40+00:00

## Health v2 (maintenance only)
Score: 61/100 (v2, computed 2026-09-03T02:39:23.370411+00:00)
- activity 84, release rhythm 35, longevity 54
- inputs: {"age_days": 765, "days_push": 96, "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 19770, forks 2535 (observed 2026-08-28T04:11:29.164065+00:00)

## What it is
Official code for Meta's Segment Anything Model 2 (SAM 2), a foundation model for promptable visual segmentation in images and videos. It includes inference code, downloadable model checkpoints, training code, and example notebooks.

## Use cases
- segment objects in images with point or box prompts
- track and segment objects across video frames in real time
- download pretrained SAM 2 checkpoints for segmentation tasks
- run video object segmentation with multi-object tracking
- fine-tune or train SAM 2 on custom segmentation data
- extract object masks from images and videos for downstream pipelines

## When to choose
- you need state-of-the-art promptable segmentation for images or videos
- you want a foundation segmentation model to build annotation or labeling tools on
- you need real-time video object segmentation with streaming memory
- you want pretrained checkpoints plus training code from the model authors

## When to avoid
- you need lightweight segmentation on CPU-only hardware
- you need semantic or instance segmentation with fixed class labels rather than promptable masks
- you need a turnkey application rather than a model library requiring PyTorch and GPUs

## Facets
- artifact type: library
- maturity: active
- function: machine-learning, computer-vision, image-processing, video-processing, deep-learning
- domain: computer-vision, machine-learning, image-processing, artificial-intelligence
- platform: python, cross-platform
- tags: segment-anything, image-segmentation, video-segmentation, promptable-segmentation, foundation-model, object-tracking, meta-ai, inference, video, gpu

## Member repositories
- facebookresearch/sam2 (main) score 61

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:29.164065+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-29T16:59:51.783165+00:00, confidence not recorded.
  - readme: https://github.com/facebookresearch/sam2 (fetched 2026-08-28T04:11:29.164065+00:00, sha 55a0c3cb6848)
- Data as of 2026-08-30T08:39:29.467469+00:00.
