The Segment Anything Model (SAM) is a promptable vision foundation model that generates high-quality object masks from input prompts such as points, boxes, or coarse masks. Trained on the massive SA-1B dataset of over 1 billion masks across 11 million images, SAM achieves zero-shot generalization, meaning it can segment objects it has never explicitly seen during training without additional fine-tuning.
Glossary
Segment Anything Model (SAM)

What is Segment Anything Model (SAM)?
A promptable foundation model developed by Meta AI for general-purpose image segmentation, capable of generating masks for arbitrary objects with zero-shot transfer.
SAM's architecture consists of a heavyweight image encoder that computes a one-time embedding, and a lightweight prompt encoder paired with a mask decoder that predicts segmentation masks in real-time. This decoupled design enables amortized inference: the expensive image encoding happens once, after which interactive, prompt-driven mask generation occurs in approximately 50 milliseconds on a GPU.
Key Features of SAM
The Segment Anything Model (SAM) is a promptable foundation model for general-purpose image segmentation. It introduces a novel architecture that decouples heavy image encoding from lightweight prompt encoding, enabling real-time, zero-shot mask generation for arbitrary objects.
Automatic Mask Generation Mode
Beyond interactive prompting, SAM can operate in a fully automatic mode that segments every distinct object in an image without human input.
- Grid prompting: A regular grid of point prompts is sampled across the image.
- Multi-scale processing: Overlapping image crops are processed to handle objects at different scales.
- Post-processing: Non-max suppression and filtering by predicted IoU score remove duplicate and low-quality masks.
- Output: Generates a panoptic-like segmentation with hundreds of masks, each with a stability score, bounding box, and predicted IoU.
Frequently Asked Questions
Explore the core mechanics, zero-shot capabilities, and architectural innovations of Meta AI's promptable foundation model for universal image segmentation.
The Segment Anything Model (SAM) is a promptable foundation model developed by Meta AI that performs general-purpose image segmentation, capable of generating valid segmentation masks for arbitrary objects with zero-shot transfer. SAM operates on a vision transformer (ViT)-based image encoder that generates a one-time image embedding, a prompt encoder that handles sparse (points, boxes) and dense (masks) prompts, and a lightweight mask decoder that predicts segmentation masks from the combined embeddings. This architecture enables real-time, interactive segmentation where users can click on an object, draw a bounding box, or provide a coarse mask to instantly generate a precise pixel-level delineation. Trained on the SA-1B dataset containing over 1 billion masks across 11 million images, SAM demonstrates robust generalization to unfamiliar objects and scenes without task-specific fine-tuning.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Core concepts for understanding the Segment Anything Model's architecture, training methodology, and performance measurement in medical imaging contexts.
Promptable Segmentation
SAM's defining capability: generating valid segmentation masks from sparse prompts such as points, boxes, or coarse masks. Unlike traditional models trained for fixed object categories, SAM interprets prompts as spatial queries that guide an image encoder-decoder architecture. A single click on an organ or lesion produces a complete mask, enabling interactive annotation workflows. The model handles ambiguous prompts by predicting multiple valid masks, reflecting inherent uncertainty at object boundaries.
Zero-Shot Transfer
The ability to segment objects from entirely unseen categories without fine-tuning. SAM achieves this through training on the SA-1B dataset—over 1 billion masks across 11 million diverse images—forcing the model to learn a general concept of 'objectness' rather than memorizing specific classes. In medical imaging, zero-shot transfer means SAM can attempt to segment novel anatomical structures or rare pathologies it never encountered during training, though performance varies significantly by modality.
Dice Score Evaluation
The Dice Similarity Coefficient measures spatial overlap between predicted and ground truth masks: 2 × |A ∩ B| / (|A| + |B|). Values range from 0 (no overlap) to 1 (perfect match). For SAM-based medical segmentation, Dice scores typically range from 0.85–0.95 for well-defined organs and 0.60–0.80 for challenging pathologies. The metric is sensitive to object size—small structures yield lower scores for identical boundary errors.
Image Encoder Architecture
SAM employs a Vision Transformer (ViT) backbone—specifically ViT-H, ViT-L, or ViT-B variants—pretrained with Masked Autoencoder (MAE) self-supervision. The encoder processes images at 1024×1024 resolution, producing a dense feature embedding. This heavy encoder runs once per image; subsequent prompts query the cached embedding, enabling real-time interactive segmentation. The ViT-H variant contains 632M parameters and provides the highest accuracy.
Intersection over Union
IoU quantifies segmentation accuracy as the ratio of overlap area to total union area: |A ∩ B| / |A ∪ B|. More conservative than Dice—an IoU of 0.75 corresponds to a Dice of ~0.857. SAM's mask decoder directly predicts an IoU confidence score for each generated mask, enabling automatic quality filtering. In practice, masks with predicted IoU below 0.88 are often discarded in automated pipelines.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us