{
 "id": "segment-anything",
 "title": "Segment Anything (SAM)",
 "aliases": [
  "SAM"
 ],
 "domain": "capture",
 "subdomain": "segmentation",
 "stage": "capture",
 "realtime": "interactive",
 "platforms": [
  "cuda",
  "python",
  "webgpu"
 ],
 "year_introduced": 2023,
 "inputs": [
  "photos"
 ],
 "outputs": [
  "visibility-mask"
 ],
 "style": "both",
 "dynamic": "both",
 "summary": "A promptable image segmentation model: a heavy image encoder runs once, then a light decoder turns points, boxes or masks into object masks in milliseconds.",
 "how_it_works": "A ViT image encoder computes an embedding once per image. A prompt encoder converts clicks, boxes or rough masks into tokens, and a lightweight mask decoder attends between the prompt tokens and the embedding to predict several candidate masks with predicted quality scores, handling ambiguity such as part versus whole. The model was trained on a very large mask dataset built with a model-in-the-loop data engine. An automatic mode prompts a regular grid of points and filters the resulting masks by predicted IoU, stability under thresholding and non-maximum suppression, producing masks for everything in the image. Since the decoder is cheap, interactive use is possible in a browser after the embedding step.",
 "when_to_use": "Choose it for object masks to isolate subjects before reconstruction, to build `visual-hull` silhouettes or to label splats. Prefer `sam2` for video or multi-view propagation of masks, and plain thresholding when the background is controlled.",
 "cost": {
  "class": "medium",
  "notes": "Encoder is heavy (about a hundred milliseconds or more on a GPU for large variants); prompts are cheap afterwards."
 },
 "failure_modes": [
  "Fine structures and thin boundaries are rounded off",
  "Masks are not semantically labelled, so class names need another model",
  "Ambiguous prompts return the wrong granularity (part or whole)",
  "No temporal consistency across frames or views"
 ],
 "sources": [
  {
   "role": "primary",
   "key": "arxiv:2304.02643",
   "type": "paper",
   "title": "Segment Anything",
   "authors": [
    "Alexander Kirillov",
    "Eric Mintun",
    "Nikhila Ravi",
    "Hanzi Mao",
    "Chloe Rolland",
    "Laura Gustafson",
    "Tete Xiao",
    "Spencer Whitehead",
    "Alexander C. Berg",
    "Wan-Yen Lo",
    "Piotr Dollár",
    "Ross Girshick"
   ],
   "year": 2023,
   "venue": "arXiv preprint (cs.CV)",
   "url": "https://arxiv.org/abs/2304.02643",
   "ids": {
    "arxiv": "2304.02643"
   },
   "license": null,
   "extra": {
    "arxiv_version": "1",
    "category": "cs.CV"
   },
   "provenance": {
    "title": {
     "authority": "arxiv",
     "endpoint": "https://export.arxiv.org/api/query?id_list=2304.02643",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "authors": {
     "authority": "arxiv",
     "endpoint": "https://export.arxiv.org/api/query?id_list=2304.02643",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "year": {
     "authority": "arxiv",
     "endpoint": "https://export.arxiv.org/api/query?id_list=2304.02643",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "venue": {
     "authority": "arxiv",
     "endpoint": "https://export.arxiv.org/api/query?id_list=2304.02643",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "url": {
     "authority": "arxiv",
     "endpoint": "https://export.arxiv.org/api/query?id_list=2304.02643",
     "checked_at": "2026-11-29T15:51:27.588Z"
    }
   },
   "status": "verified",
   "checked_at": "2026-11-29T15:51:27.588Z",
   "title_sim": 1,
   "__bib": "kirillov2023segment"
  },
  {
   "role": "implementation",
   "key": "gh:facebookresearch/segment-anything",
   "type": "code",
   "title": "facebookresearch/segment-anything",
   "description": "The repository provides code for running inference with the SegmentAnything Model (SAM), links for downloading the trained model checkpoints, and example notebooks that show how to use the model.",
   "authors": [
    "facebookresearch"
   ],
   "year": 2023,
   "venue": "GitHub",
   "url": "https://github.com/facebookresearch/segment-anything",
   "ids": {
    "repo": "facebookresearch/segment-anything"
   },
   "license": "Apache-2.0",
   "extra": {
    "stars": 55199,
    "stars_checked": "2026-11-29",
    "archived": false,
    "fork": false,
    "pushed_at": "2024-09-18T17:46:55Z",
    "language": "Jupyter Notebook",
    "homepage": null,
    "license_name": "Apache License 2.0"
   },
   "provenance": {
    "title": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/facebookresearch/segment-anything",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "authors": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/facebookresearch/segment-anything",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "year": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/facebookresearch/segment-anything",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "venue": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/facebookresearch/segment-anything",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "url": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/facebookresearch/segment-anything",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "license": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/facebookresearch/segment-anything",
     "checked_at": "2026-11-29T15:51:27.588Z"
    }
   },
   "status": "verified",
   "checked_at": "2026-11-29T15:51:27.588Z",
   "title_sim": null,
   "__bib": "facebookresearch2023facebookresearch"
  },
  {
   "role": "tutorial",
   "key": "url:https://segment-anything.com/",
   "type": "tutorial",
   "title": "Segment Anything project page",
   "authors": [
    "Meta AI"
   ],
   "year": null,
   "venue": "aidemos.meta.com",
   "url": "https://aidemos.meta.com/segment-anything",
   "ids": {},
   "license": null,
   "extra": {
    "http_status": 200,
    "live": true,
    "archive": {
     "url": "http://web.archive.org/web/20261114180207/https://aidemos.meta.com/segment-anything/",
     "timestamp": "20261114180207"
    },
    "page_title": "Segment Anything Playground | Meta",
    "host": "aidemos.meta.com",
    "title_confirmed_by_page": false,
    "title_unconfirmed": true
   },
   "provenance": {
    "title": {
     "authority": "research-draft",
     "endpoint": "title_hint/author_hint, checked against page title where available",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "url": {
     "authority": "http",
     "endpoint": "GET https://segment-anything.com/ → 200",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "authors": {
     "authority": "research-draft",
     "endpoint": "title_hint/author_hint, checked against page title where available",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "venue": {
     "authority": "http",
     "endpoint": "GET https://segment-anything.com/ → 200",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "year": {
     "authority": "research-draft",
     "endpoint": "title_hint/author_hint, checked against page title where available",
     "checked_at": "2026-11-29T15:51:27.588Z"
    }
   },
   "status": "verified",
   "checked_at": "2026-11-29T15:51:27.588Z",
   "title_sim": 0.5,
   "__bib": "aisegment"
  }
 ],
 "presets": [
  {
   "id": "sam-automatic-mask-generator-defaults",
   "title": "SAM automatic mask generator defaults",
   "runtime": "json-params",
   "params": {
    "points_per_side": 32,
    "pred_iou_thresh": 0.88,
    "stability_score_thresh": 0.95,
    "stability_score_offset": 1,
    "box_nms_thresh": 0.7,
    "crop_n_layers": 0,
    "min_mask_region_area": 0
   },
   "basis": "original",
   "license_note": "Parameter names follow facebookresearch/segment-anything (Apache-2.0); values are the SamAutomaticMaskGenerator defaults, written for this index.",
   "execution_fidelity": "parameter-only",
   "proof": {
    "kind": "parameter",
    "label": "parameter preset",
    "ok": true,
    "proof": null
   }
  }
 ],
 "related": [
  "sam2",
  "visual-hull"
 ],
 "extends": [],
 "supersedes": [],
 "combines_with": [
  {
   "id": "visual-hull",
   "why": "Per-view SAM masks give the silhouettes that visual hull carving intersects."
  }
 ],
 "provenance": {
  "prose": "original text written for this index (research draft, editorially reviewed)",
  "sources_verified_at": "2026-11-29T15:51:27.588Z",
  "draft": "data/drafts/capture/segment-anything.json"
 },
 "solves": [
  "need to cut out a subject from a photo quickly",
  "isolate objects before 3d reconstruction",
  "want masks from a click or a box",
  "label parts of a splat or image interactively"
 ],
 "authority": "Kirillov et al., 2023",
 "url": "https://texelatlas.vercel.app/t/segment-anything/",
 "execution_fidelity": "parameter-only",
 "fidelity_label": "Parameter Preset",
 "benchmark_eligible": false
}