Not medical advice. This page and its simulation are educational tools for understanding how segmentation AI is evaluated. They do not analyze real patient scans, do not diagnose any condition, and must never be used in place of assessment by a qualified radiologist, neurologist or oncologist. If you or someone you know has concerns about a brain tumor or any MRI finding, please consult a licensed medical professional.
Why Segmenting a Brain Tumor Is Harder Than It Sounds
To a non-specialist, "find the tumor on the scan" sounds like a single well-defined task. In practice, a glioma, the most common type of primary brain tumor studied in segmentation research, does not have one boundary; it has several, nested inside each other and each clinically meaningful in a different way. There is a bulk region of abnormal tissue and swelling visible mainly on T2-weighted and FLAIR MRI sequences, generally called the whole tumor. Inside that, there is a denser region including any necrotic or non-enhancing tissue, the tumor core. And within that, there is often a thin, contrast-enhancing rim that lights up specifically on a T1-weighted scan taken after a gadolinium contrast injection (T1ce), the enhancing tumor, frequently the most clinically significant sub-region because it can mark the most active, aggressively growing part of the mass. Radiologists trace these three overlapping regions by hand, slice by slice, through a 3D MRI volume, a slow, expertise-intensive process. Automating it well could meaningfully speed up treatment planning and monitoring, which is precisely why segmentation AI has become one of the most actively benchmarked problems in medical imaging, and why a rigorous, standardized way of scoring "how good" an automated segmentation is became essential.
Inside the BraTS Challenge: Multi-Modal MRI and Expert Ground Truth
The BraTS (Brain Tumor Segmentation) challenge, first proposed in work by Menze and colleagues and run annually since, is the field's reference benchmark for this problem. It assembles multi-institutional MRI scans of glioma patients contributed from hospitals and research centers around the world, each patient imaged with four standard, co-registered MRI sequences: T1-weighted (T1), contrast-enhanced T1-weighted (T1ce), T2-weighted (T2), and Fluid-Attenuated Inversion Recovery (FLAIR). Each sequence highlights different tissue properties, T1ce is best for spotting the enhancing rim, FLAIR is particularly sensitive to the swelling and infiltration that defines the whole tumor, so a good segmentation model has to learn to combine information across all four rather than rely on any single image. Alongside the raw scans, BraTS provides expert-annotated ground-truth labels: board-certified neuroradiologists (with results cross-checked by multiple experts) trace the whole tumor, tumor core, and enhancing tumor regions by hand on every training case. These hand-drawn labels are the "ground truth" that competing algorithms are measured against, exactly the role the fixed red blob plays in this simulation, a stand-in for that expert-drawn outline, deliberately irregular because real tumor boundaries are irregular, not the tidy circles a first attempt at automated segmentation often naively produces.
The Dice Similarity Coefficient, Explained
The core scoring formula is the Dice similarity coefficient (also called the Sørensen–Dice index): Dice = 2 × |A ∩ B| / (|A| + |B|), where A is the ground-truth region, B is the predicted region, |A| and |B| are their areas (or, for real 3D MRI volumes, their volumes), and |A∩B| is the size of their overlap. The factor of two compensates for the fact that the overlap region is otherwise counted only once while it is being compared against the sum of two full areas, so a perfect match, where A and B are identical, always produces a Dice score of exactly 1.0, and two regions that do not touch at all produce 0. Working through the arithmetic makes the formula's behavior intuitive. If two regions overlap over 80% of their combined footprint, Dice sits comfortably in the 0.85-0.95 range. If a predicted region is roughly the right size but shifted so only half of it lands on the true tumor, Dice drops sharply, often below 0.6, because both the false-positive area outside the true tumor and the false-negative area of true tumor left uncovered count against the score simultaneously. That dual sensitivity, penalizing both over-segmentation and under-segmentation in one number, is exactly why Dice became the default metric rather than something simpler like raw pixel accuracy, which can look deceptively high on a mostly-normal-tissue image even when the tumor itself is segmented poorly, since correctly labeling all the healthy tissue as "not tumor" dominates the accuracy score regardless of how the tumor region itself is handled. In this simulation, moving the predicted blob's offset sliders shifts it away from the fixed ground truth, directly reducing the overlap area |A∩B| while the individual areas |A| and |B| barely change, which is exactly why Dice falls fastest under pure positional drift. Shrinking or enlarging the size slider changes |B| itself, illustrating the second, independent way a segmentation can go wrong even when it is perfectly centered.
Why Real Leaderboards Also Report the Hausdorff Distance
Dice is an area-based (or volume-based) metric, and area-based metrics have a specific blind spot: a small, isolated spike of incorrectly predicted tumor tissue, sticking far out into otherwise healthy brain tissue, contributes only a tiny amount to the total mismatched area, so it barely moves the Dice score even though it could represent a serious, clinically dangerous localization error. This is precisely the kind of failure a boundary-distance metric is built to catch. The Hausdorff distance measures worst-case boundary disagreement rather than overlap area. Informally: for every point on one region's boundary, find the distance to the nearest point on the other region's boundary; take the largest such distance found (this is the "directed" Hausdorff distance in one direction); do the same calculation in the other direction; the true Hausdorff distance is the larger of those two directed values. A large Hausdorff distance means that somewhere along the boundary, the two outlines diverge badly, even if the overall Dice score still looks reasonable. Real BraTS-style leaderboards typically report a 95th-percentile variant of this distance rather than the strict maximum, which trims out single-pixel noise while still catching genuine large boundary errors, but the underlying idea is the same worst-case-mismatch logic implemented here in simplified, clearly-labeled form. This simulation's "boundary mismatch" indicator is a deliberately simplified, illustrative approximation of that same idea, computed by sampling points around each blob's boundary and finding the largest nearest-neighbor gap between the two point sets. Watch what happens when you push the jaggedness slider up: the Dice score often barely moves if the overall size and position stay similar, but the boundary-mismatch number can jump noticeably, because a jagged edge creates exactly the kind of localized spikes and gaps that an overlap-only metric tends to understate.
Reading the Score: Excellent, Clinically Usable, or Needs Review
Raw Dice numbers only become meaningful once they are anchored to some practical reference point, which is why segmentation-challenge leaderboards and published clinical-validation studies commonly group results into qualitative bands. This simulation uses three such bands. A Dice score above 0.85 is treated as excellent overlap, comparable to the agreement seen between two different expert human annotators tracing the same tumor independently, sometimes called inter-rater agreement, a useful ceiling because an AI model rarely needs to exceed how consistently two trained radiologists agree with each other. A Dice score between 0.70 and 0.85 is labeled clinically usable, generally good enough to assist workflows like rough treatment-planning drafts or longitudinal tumor-volume tracking, though still meriting a clinician's review rather than fully automated reliance. A Dice score below 0.70 is flagged as poor — needs review, the range where a segmentation is likely missing significant tumor tissue, including significant healthy tissue by mistake, or both, and should not be trusted without correction. These bands are not arbitrary; they reflect thresholds that repeatedly show up across published segmentation-validation literature as rough dividing lines between "matches expert-level agreement," "usable with oversight," and "not yet reliable enough." They are, however, general-purpose guidance rather than a fixed clinical standard, actual acceptability thresholds vary by institution, by tumor sub-region (enhancing-tumor Dice is typically harder to achieve than whole-tumor Dice because that region is smaller and its boundary more subtle), and by the specific downstream use of the segmentation.
What This Simulation Simplifies, and Why That's Fine for Learning
A few honest simplifications are worth naming. Real BraTS segmentation happens in three dimensions across a full MRI volume, not on a single flat 2D shape; this simulation works in 2D purely so the overlap and boundary-mismatch behavior stay directly visible and intuitive rather than requiring a volumetric renderer to appreciate. Real ground-truth tumor boundaries come from actual expert annotation on actual patient scans, not from a fixed mathematical noise function; the irregular red blob here is a stand-in shaped to feel anatomically plausible, not an image of any real tumor. And the boundary-mismatch indicator is explicitly a simplified proxy for the Hausdorff distance rather than the exact 95th-percentile calculation used in published BraTS results. None of that undermines the point of the exercise. The relationship between position, size, and jaggedness on one side, and Dice score and boundary mismatch on the other, behaves the same way here as it does in real volumetric tumor segmentation, because both are built on the same overlap and boundary-distance mathematics. Dragging the sliders and watching the numbers respond is, in miniature, the same feedback loop a machine-learning engineer sees when they retrain a segmentation model and re-run it against the BraTS validation set.
Frequently asked questions
What is the Dice similarity coefficient and how is it calculated?
The Dice similarity coefficient measures how well two regions overlap using the formula 2×|A∩B| divided by (|A|+|B|), where A is the ground-truth region, B is the predicted region, and |A∩B| is the area or volume they share. A score of 1.0 means the two regions match perfectly; a score of 0 means they do not overlap at all. It is the standard metric for scoring automated medical-image segmentation, including every submission to the real BraTS brain tumor segmentation challenge, because it rewards both correctly including tumor tissue and correctly excluding healthy tissue in a single number.
What does the BraTS challenge actually provide and measure?
BraTS, the Brain Tumor Segmentation challenge, provides multi-institutional, multi-modal MRI scans of glioma patients, typically T1-weighted, contrast-enhanced T1 (T1ce), T2-weighted, and FLAIR sequences, alongside expert-annotated ground-truth labels for three overlapping tumor sub-regions: the whole tumor, the tumor core, and the enhancing tumor. Competing algorithms are ranked primarily by the Dice score of their predicted segmentations against those expert annotations, alongside boundary-distance metrics like the Hausdorff distance, giving a standardized, reproducible way to compare very different segmentation approaches on the same data.
Why are there separate Dice scores for whole tumor, tumor core and enhancing tumor?
A glioma is not a single uniform mass; it contains a bulk region visible on T2/FLAIR sequences (the whole tumor), a denser core including any necrotic tissue (the tumor core), and a contrast-enhancing rim that is often the most clinically significant part because it can indicate active, aggressive tumor growth (the enhancing tumor). A model can score very well on whole-tumor Dice by simply outlining the general area while still performing poorly on the enhancing-tumor sub-region, which is exactly the sub-region radiotherapy planning and treatment-response tracking care about most, so BraTS reports all three scores separately rather than a single blended number.
What is the Hausdorff distance and why is it reported alongside Dice?
The Hausdorff distance measures the worst-case boundary mismatch between two regions: informally, it is the largest distance you would have to travel from any point on one boundary to reach the nearest point on the other boundary, computed in both directions. Dice can look reasonably good even when a small but important spike of predicted tumor sticks out far into healthy tissue, because that spike may contribute little to the total overlap area; the Hausdorff distance catches that kind of large, isolated boundary error that an area-based metric like Dice can understate, which is why real segmentation-challenge leaderboards report both together.
Is this simulation diagnosing or analyzing real medical scans?
No. This is an educational tool built entirely from two synthetic, illustrative 2D outlines, a fixed "ground truth" blob and an adjustable "predicted" blob, designed to make the Dice and boundary-mismatch formulas tangible, not a diagnostic device and not real patient imaging. It should not be used to interpret real MRI scans, assess anyone's health, or substitute for evaluation by a qualified radiologist or oncologist; its only purpose is to show, interactively, how segmentation AI is scored in challenges like BraTS.
Try it live
Everything above runs in your browser — open BraTS Brain Tumor Segmentation — Dice Score Explorer and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.
▶ Open BraTS Brain Tumor Segmentation — Dice Score Explorer simulation