Try Pro FREE for 2 weeksGet Started

SAM2 — Segmentation AI Model

SAM2 finds every distinct object in a picture without being told what to look for, coloring each one differently and listing them as metadata. Tiny, Small or Large trades accuracy against speed. 10-30 seconds.

What it does

SAM2 segments every distinct object in an image without being told what to look for. Upload a picture and each object comes back masked and coloured separately, with a list of them as metadata alongside.

That is the difference from SAM3 and SAM3.1, which start from a text prompt: this one starts from nothing and finds everything. Tiny, Small or Large trades accuracy against speed. Ten to thirty seconds.

When to use it

  • Everything in a picture masked at once, with nothing to describe
  • Any object category, since there is no vocabulary to train first
  • Pixel-accurate boundaries rather than a rough bounding box
  • Cluttered scenes, with many overlapping things in the frame
  • Annotation work, faster than selecting pixels by hand

Details

  • CategorySegmentation
  • Year2024
  • LicenseApache-2.0

Compliance & Provenance

  • ProviderMeta (open) · Specialized
  • EU AI Act RiskMinimal Risk
  • Art. 50 TransparencyNot applicable

Inputs & Outputs

ImageInputimage

Source image to segment

ImageOutputimage

Segmentation mask overlay image

TextOutputstring

Detected segment labels and metadata

Parameters

versionstringdefault Largeoptions: Large, Small, Tiny

Variant (Tiny/Small/Large)

Model size. 'Large' (default) — most accurate, slowest. 'Small' — balanced. 'Tiny' — fastest, suitable for previews or edge.

Tags

  • segmentation
  • segment-anything
  • automatic
  • universal
  • mask-generation
  • gpu-light
  • medium-speed

Alternatives in Segmentation

  • BiRefNet (Subject)

    Cleanly extracts a single salient subject with high-resolution edges. ~1-3s.

  • RF-DETR Seg Medium (Scene)

    Real-time instance segmentation on 80 COCO classes (RF-DETR Seg Medium).

  • SAM3 (Scene)

    Language-prompted segmentation (e.g. "person", "red car"). 10-30s/class.

  • SAM3.1 (Scene)

    Language-prompted segmentation — SAM 3.1 Object Multiplex with improved accuracy over SAM3. 10-30s/class.

Resources

All AI models