Recommended Free Tools
Dice and IoU summarize how much a predicted segmentation overlaps its reference; sensitivity measures how much of the reference target was found; Hausdorff distance measures boundary separation in spatial units. They answer different questions, so no one score captures every segmentation error or establishes clinical usefulness.
What is the difference between Dice, IoU, sensitivity, and Hausdorff distance?
For a binary segmentation, count true positives (TP: target pixels or voxels correctly predicted), false positives (FP: predicted as target but absent from the reference), and false negatives (FN: present in the reference but missed). These metrics use those counts or compare the spatial boundaries of the masks.
As an Amazon Associate I earn from qualifying purchases.
| Metric | Formula or definition | What it reveals | Important limitation |
|---|---|---|---|
| Dice (DSC) | 2TP/(2TP+FP+FN) | Overall overlap between predicted and reference masks | Does not show where errors occur; ignores true negatives and is affected by target size. |
| IoU (Jaccard) | TP/(TP+FP+FN) | The intersection as a fraction of the union | Shares overlap metrics’ limitations; for the same masks, its value is lower than Dice. |
| Sensitivity (recall, true positive rate) | TP/(TP+FN) | How much of the reference-positive target was recovered | Does not penalize extra predicted target on its own. |
| Hausdorff distance | Maximum symmetric nearest-point distance between sets of boundary points | How far apart the worst-matching boundary points are | The maximum can be dominated by one outlier; variant, boundary definition, spacing, and units must be reported. |
Dice and IoU: overlap
For predicted set P and reference set G, Dice is 2|P∩G|/(|P|+|G|), while IoU is |P∩G|/|P∪G|. Both penalize false positives and false negatives, and both exclude true negatives. Dice is also known as the F1 score in this setting. Their values differ, but for the same binary masks Dice = 2·IoU/(1+IoU), and IoU = Dice/(2−Dice). This monotonic conversion preserves method ordering when definitions and calculation are consistent.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsSensitivity: missed target
Sensitivity asks what fraction of the reference-positive pixels or voxels the model recovered. It makes omissions visible, but can remain high even if the prediction adds a large amount of false-positive area. Pair it with an overlap metric and, when relevant to the task, precision or specificity.
#1 Best Overall
Hausdorff distance: boundary separation
Hausdorff distance compares boundary points by their nearest-point distances in both directions; the symmetric maximum is the greater of the two directed distances. Lower is better. Because it is a spatial distance, its units follow the coordinates used: a calculation in voxel coordinates is not automatically in millimeters. One distant boundary outlier can drive the maximum, so studies may instead report HD95 or another surface-distance summary. Name the exact variant and state the image spacing and units.
Which metric should you use for medical image segmentation?
Choose metrics according to the error that matters and the geometry of the target, rather than searching for one universally best score. Müller, Soto-Rey, and Kramer’s 2022 guideline describes Dice as a main validation and interpretation metric, with average Hausdorff distance useful for sensitivity to contour position; it recommends reporting IoU, sensitivity, and specificity alongside Dice for comparability (guideline).
Rank #2
- For general overlap: report Dice or IoU, with the precise definition. They express related information, so reporting both is often useful for comparability rather than as two independent views of error.
- When missed target is especially consequential: include sensitivity, and include a measure that also responds to false positives.
- When boundary placement matters: add a distance metric such as Hausdorff distance, clearly identifying whether it is the maximum, HD95, average Hausdorff, or another defined variant.
- For tubular structures: consider clDice, which is designed to reflect connectivity and topology that ordinary overlap scores may not represent well.
- When false positives and false negatives have unequal importance: consider an F-beta score with the weighting stated. Nature Methods’ 2023 recommendations discuss these alternatives and caution that overlap scores have weaknesses for consistently small targets and noisy references (recommendations).
A metric should reflect the task, not substitute for clinical evaluation. Agreement with an annotation says how well the prediction matches that reference; it does not by itself prove clinical benefit or performance outside the evaluated data. Annotation quality and target size can affect apparent scores.
How to report segmentation metrics clearly
- Define the calculation. State whether Dice is binary or soft, how empty masks are handled if applicable, and whether the distance is a boundary or volume formulation. For Hausdorff, distinguish the maximum from HD95 or another summary. Definitions and variants are not interchangeable (3D metric analysis).
- Show class-wise results. In multi-class segmentation, give each relevant class its own result. A background-dominated aggregate can make performance appear stronger than foreground performance.
- Describe aggregation and variability. Explain whether scores are aggregated per case, per class, or across voxels. Show case-level distributions, not just one favorable aggregate, and include visual comparisons of predictions with reference masks where possible.
- Avoid accuracy as the headline under severe imbalance. In images with a small foreground and large background, correct background predictions can dominate accuracy without showing whether the target was segmented well.
- Report spatial calibration for distances. Give image spacing and physical units, and make clear if distances are instead in voxel coordinates.
- Include uncertainty when comparing methods. Where appropriate, provide error estimates such as standard deviations or 95% confidence intervals, as recommended in AAPM Task Group Report 273 (report).
- Make evaluation reproducible. Share the evaluation code and results where possible, along with the metric definitions and aggregation choices.
These distinctions align with the European Society of Medical Imaging Informatics’ 2025 practice recommendations on common performance metrics (ESR Essentials).
Quick Recap
Best Value
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




