Lesion segmentation is the pixel-level classification task that partitions a medical image into distinct regions, isolating a suspicious mass, calcification cluster, or architectural distortion from the background parenchyma. Unlike object detection, which draws a bounding box, segmentation generates a precise binary mask defining the exact boundary of the abnormality, enabling quantitative radiomic analysis of shape, margin, texture, and size.
Glossary
Lesion Segmentation

What is Lesion Segmentation?
Lesion segmentation is the computational process of precisely delineating a suspicious abnormality from surrounding healthy tissue at the pixel level, enabling quantitative morphological analysis.
In mammography, deep convolutional neural networks—particularly U-Net and Mask R-CNN architectures—perform this task by learning hierarchical features from annotated datasets. The resulting segmentation mask feeds downstream computer-aided diagnosis (CADx) systems for malignancy probability estimation and provides objective, reproducible measurements critical for BI-RADS classification and surgical planning.
Key Characteristics of Lesion Segmentation
Lesion segmentation is the process of precisely delineating a suspicious mass or calcification cluster from surrounding breast tissue at the pixel level, enabling quantitative morphological analysis and accurate size measurement.
Semantic vs. Instance Segmentation
In mammography, semantic segmentation classifies every pixel as 'lesion' or 'background' without distinguishing individual masses. Instance segmentation goes further, assigning unique identifiers to each distinct lesion when multiple abnormalities appear in the same image. This distinction is critical for multi-focal disease assessment, where a patient may present with several independent masses requiring separate characterization. Modern architectures like Mask R-CNN and U-Net variants dominate this space, with U-Net's encoder-decoder skip connections proving particularly effective for preserving fine margin detail in high-resolution mammograms.
Dice Similarity Coefficient (DSC)
The Dice Similarity Coefficient is the primary overlap metric for evaluating segmentation accuracy. It measures the spatial agreement between the algorithm's predicted mask and the radiologist's ground-truth annotation, calculated as twice the intersection area divided by the sum of both areas. A DSC of 1.0 indicates perfect overlap; clinical-grade systems typically target >0.85 for mass segmentation. However, DSC alone can be misleading for small lesions, where a few pixels of disagreement disproportionately lower the score. Complementary metrics include Hausdorff distance for boundary accuracy and sensitivity/specificity at the pixel level.
Morphological Feature Extraction
Once a lesion is segmented, quantitative radiomic features can be extracted to characterize its morphology:
- Margin sharpness: Quantifies the transition gradient at the lesion boundary, where abrupt transitions suggest malignancy
- Spiculation index: Measures the presence and length of radiating lines extending from the mass margin
- Circularity and compactness: Shape descriptors where irregular, non-elliptical contours correlate with invasive cancers
- Texture heterogeneity: Analyzes pixel intensity variance within the segmented region using Gray-Level Co-occurrence Matrices (GLCM) These features feed downstream CADx classifiers for BI-RADS assessment.
Boundary Uncertainty and Partial Volume Effects
A fundamental challenge in lesion segmentation is the partial volume effect, where pixels at the lesion boundary represent a mixture of malignant and healthy tissue due to finite scanner resolution. This creates inherent ambiguity in ground-truth annotation, with inter-radiologist variability in boundary delineation often exceeding 2-3mm. Advanced approaches address this by modeling segmentation as a probabilistic task, outputting uncertainty maps alongside binary masks. Bayesian U-Nets with Monte Carlo dropout or ensembles of multiple models can quantify this boundary uncertainty, flagging ambiguous margins for closer radiologist review.
Multi-Modal Segmentation Fusion
Segmentation accuracy improves significantly when algorithms jointly process multiple imaging modalities. In Contrast-Enhanced Mammography (CEM), the recombined iodine image highlights areas of neoangiogenesis, providing functional information that complements the anatomical detail of low-energy images. Similarly, Digital Breast Tomosynthesis (DBT) slice data can be segmented in 3D before projecting results onto synthesized 2D views. Multi-modal fusion architectures typically employ separate encoder branches for each modality, merging features at the bottleneck before a shared decoder generates the final segmentation mask.
Temporal Segmentation for Interval Change
Comparing a current mammogram with a prior exam requires precise co-registration before segmentation differences can be analyzed. Deformable registration algorithms align the breast parenchyma across time points, accounting for differences in compression and positioning. The segmentation model then operates on the subtraction image, highlighting new or growing lesions while suppressing stable background tissue. This temporal approach is particularly valuable for detecting architectural distortion and subtle asymmetries that lack a discrete mass boundary, improving sensitivity to early-stage malignancies that present as gradual tissue changes.
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.
Frequently Asked Questions
Explore the critical technical concepts behind pixel-level lesion delineation, a foundational task for quantitative medical image analysis and AI-driven diagnostics.
Lesion segmentation is the process of classifying every pixel in a medical image to precisely delineate the boundary of a suspicious mass or calcification cluster from surrounding healthy tissue. Unlike object detection, which merely places a bounding box around a finding, segmentation generates a pixel-level mask that captures the exact morphology, margin characteristics, and spatial extent. This granular output is essential for calculating volumetric measurements, analyzing spiculation patterns, and performing radiomic feature extraction. While detection answers 'where is the lesion?', segmentation answers 'what is the precise shape and size of the lesion?'
Related Terms
Explore the core concepts, evaluation metrics, and architectural patterns that surround the pixel-level delineation of suspicious masses and calcifications.
Semantic Segmentation
The deep learning task of assigning a class label to every pixel in an image, forming the technical foundation of lesion segmentation. Unlike object detection, which draws a bounding box, semantic segmentation provides a precise pixel mask that defines the exact boundary of a mass or calcification cluster.
- U-Net Architecture: A symmetric encoder-decoder with skip connections that preserves fine spatial detail.
- Output: A binary or multi-class probability map the same size as the input mammogram.
- Clinical Value: Enables accurate morphological analysis of margin characteristics like spiculation and lobulation.
Dice Similarity Coefficient
The primary overlap-based metric for evaluating segmentation accuracy, measuring the spatial agreement between the AI-predicted mask and the ground-truth annotation. The Dice score ranges from 0 (no overlap) to 1 (perfect overlap).
- Formula: 2 × |Prediction ∩ Ground Truth| / (|Prediction| + |Ground Truth|)
- Clinical Benchmark: A Dice score above 0.85 is generally considered clinically acceptable for mass segmentation.
- Limitation: Does not capture boundary distance errors, requiring complementary metrics like Hausdorff distance.
U-Net Architecture
The de facto standard convolutional neural network for biomedical image segmentation, characterized by its symmetric contracting path (encoder) and expansive path (decoder). Skip connections concatenate high-resolution features from the encoder directly to the decoder, preserving the precise localization information lost during downsampling.
- Encoder: Typically a pre-trained backbone like ResNet or EfficientNet that extracts hierarchical features.
- Bottleneck: The deepest layer capturing high-level semantic context of the lesion.
- Variants: Attention U-Net and U-Net++ add gating mechanisms and dense skip pathways to improve boundary refinement.
Hausdorff Distance
A boundary-sensitive metric that measures the maximum distance between the predicted segmentation contour and the ground-truth contour. It complements the Dice coefficient by penalizing outlier errors—small, sharp protrusions or isolated false-positive islands that overlap-based metrics might miss.
- 95th Percentile HD: A robust variant that ignores the top 5% of distances to reduce sensitivity to annotation noise.
- Unit: Measured in millimeters, with clinically acceptable values typically under 2-3 mm for mass segmentation.
- Relevance: Critical for evaluating segmentation of spiculated masses, where boundary precision is diagnostically essential.
Instance Segmentation
An extension of semantic segmentation that not only classifies each pixel but also distinguishes between separate, individual objects of the same class. In mammography, this enables the AI to assign a unique identifier to each distinct mass or calcification cluster when multiple lesions are present in the same breast.
- Mask R-CNN: A popular architecture that adds a mask prediction branch to the Faster R-CNN object detector.
- Clinical Need: Essential for multi-focal disease assessment and generating a count of distinct lesions.
- Differentiation: Semantic segmentation would label all lesion pixels as 'mass'; instance segmentation labels them as 'mass_1', 'mass_2', etc.
Jaccard Index (IoU)
The Intersection over Union metric, functionally equivalent to the Dice coefficient but with a stricter penalty for disagreement. It is defined as the area of overlap divided by the area of union between the predicted and ground-truth masks.
- Relationship to Dice: Dice = 2 × IoU / (1 + IoU). A Dice of 0.85 corresponds to an IoU of approximately 0.74.
- Use Case: Often preferred in loss functions during training because it directly optimizes the ratio of correct to total pixels.
- Interpretation: An IoU of 0.50 means the union area is twice the overlap area, indicating substantial boundary error.

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