A segmentation mask is a discrete label map—binary or multi-class—spatially aligned with a source volumetric image where each voxel is assigned an integer value denoting its tissue class. In a binary mask, voxels are classified as either foreground (e.g., tumor) or background; in a multi-class mask, distinct integers differentiate organs like the liver, kidney, and spleen within a single volume. This dense, per-voxel annotation serves as the ground truth for training 3D U-Net architectures and is the primary output of medical image segmentation models.
Glossary
Segmentation Mask

What is a Segmentation Mask?
A segmentation mask is a voxel-wise classification map that assigns every element in a 3D medical image to a specific anatomical structure, lesion, or background class.
The quality of a predicted mask is quantified against a ground truth mask using spatial overlap metrics like the Dice Similarity Coefficient (DSC) and boundary distance metrics like the Hausdorff Distance. Segmentation masks enable downstream clinical tasks including volume rendering, surgical planning, and radiomics feature extraction. They are stored as DICOM Segmentation objects or NIfTI files, preserving the original geometry and enabling multi-planar reconstruction of labeled structures.
Key Characteristics of Segmentation Masks
A segmentation mask is a pixel-wise or voxel-wise classification map that partitions a medical image into distinct anatomical regions. The following properties define its structure, encoding, and clinical utility.
Binary vs. Multi-Class Encoding
Masks encode anatomical labels as integer values at each spatial coordinate. Binary masks use 0 (background) and 1 (foreground) to isolate a single structure, such as a tumor. Multi-class masks assign unique integers to each anatomical region—e.g., 1 for liver, 2 for spleen, 3 for kidney—enabling simultaneous segmentation of multiple structures in a single volume. This encoding directly impacts loss function selection during training, with binary cross-entropy used for single-class tasks and categorical cross-entropy or Dice loss variants applied to multi-class problems.
Spatial Correspondence with Source Data
A segmentation mask maintains exact spatial correspondence with its source image, sharing identical dimensions and origin coordinates. For a CT volume of size 512×512×300 voxels, the mask occupies the same grid. This one-to-one mapping is encoded in the DICOM header via shared Frame of Reference UID and Image Position (Patient) tags. Any resampling, cropping, or affine transformation applied to the source image must be identically applied to the mask to preserve alignment—a critical requirement for training supervised deep learning models.
Label Semantics and Ontologies
Integer labels in a mask derive meaning from an associated ontology or coding scheme. Common standards include:
- SNOMED CT codes for anatomical structures
- RadLex terms for radiology-specific findings
- TNM staging labels for oncology masks Without explicit semantic mapping, a label value of '3' is ambiguous across datasets. Production-grade medical AI systems store label-to-ontology mappings in structured metadata, enabling interoperability across institutions and compliance with FHIR and DICOM Segmentation IOD standards.
Probabilistic vs. Hard Masks
Segmentation outputs exist on a spectrum of certainty. Hard masks assign a single discrete class to each voxel via argmax thresholding, producing the final clinical delineation. Probabilistic masks retain per-class probability values (e.g., 0.87 probability of 'tumor' at voxel i,j,k), preserving model uncertainty. Probabilistic masks are essential for:
- Uncertainty quantification and risk stratification
- Ensemble model agreement analysis
- Deformable registration where soft boundaries improve convergence Clinical workflows typically store hard masks, while research pipelines retain probabilities for downstream analysis.
Overlap Metrics and Mask Validation
Mask quality is quantified by comparing predicted segmentations against ground truth annotations. The Dice Similarity Coefficient (DSC) measures volumetric overlap, while Hausdorff Distance (HD) captures boundary accuracy by computing the maximum surface-to-surface distance. For clinical acceptance, DSC values above 0.85 are typically required for large organs, while small lesions demand stricter HD thresholds. Surface Dice at a tolerance (e.g., 2mm) has emerged as a clinically intuitive metric that correlates with radiologist-perceived quality better than voxel-wise measures alone.
Temporal and Multi-Modal Mask Alignment
In longitudinal studies and multi-modal fusion, masks from different time points or modalities (CT, MRI, PET) must be co-registered into a common coordinate space. Deformable registration warps masks to account for patient positioning changes, organ deformation, and tumor growth between scans. The resulting aligned masks enable:
- Tracking lesion volume changes over treatment cycles
- Fusing functional PET masks with anatomical CT masks
- Building 4D atlases for radiation therapy planning Misalignment errors propagate directly into downstream quantitative analysis, making registration accuracy a critical quality gate.
Frequently Asked Questions
Clear, technically precise answers to the most common questions about segmentation masks in medical imaging and diagnostic AI.
A segmentation mask is a pixel-level or voxel-level label map that classifies each element of an image as belonging to a specific category, such as an anatomical structure or lesion. In medical imaging, it works by assigning a discrete integer value to every voxel in a 3D volume—0 for background, 1 for liver, 2 for tumor, and so on—creating a dense, spatially aligned overlay. This differs fundamentally from object detection, which only provides bounding boxes. The mask is generated by a trained model, often a 3D U-Net or nnU-Net, that performs semantic segmentation. The output is a volumetric array of identical dimensions to the input scan, enabling precise quantification of volume, shape, and spatial relationships critical for surgical planning and radiotherapy target delineation.
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
Understanding segmentation masks requires fluency in the spatial, metric, and architectural concepts that govern their creation and evaluation.
Voxel
The fundamental volumetric pixel in a 3D grid. A segmentation mask assigns a class label to each voxel, making it the atomic unit of spatial classification in CT and MRI analysis. Resolution is defined by voxel dimensions (e.g., 0.5mm isotropic).
Dice Similarity Coefficient (DSC)
The primary overlap metric for validating segmentation masks. DSC measures spatial agreement between a predicted mask and a ground-truth annotation.
- Formula: 2 * |A ∩ B| / (|A| + |B|)
- Range: 0 (no overlap) to 1 (perfect match)
- Clinical threshold: >0.70 generally considered acceptable for organ segmentation
Hausdorff Distance
A boundary accuracy metric that quantifies the maximum surface distance between two segmentation masks. Unlike DSC, which measures overlap, Hausdorff Distance identifies the worst-case local disagreement in contour delineation, critical for surgical planning where boundary precision is paramount.
Partial Volume Effect
An imaging artifact where a single voxel contains a mixture of multiple tissue types, producing an averaged signal intensity. This blurs boundaries in segmentation masks, particularly at tissue interfaces. Mitigation strategies include:
- Higher resolution acquisition
- Partial volume correction algorithms
- Probabilistic rather than binary mask assignments

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