Skip to content
naulon

No retraction, correction or concern found when last checked on Oct 19, 2026.

Towards a guideline for evaluation metrics in medical image segmentation

Dominik Müller, Iñaki Soto-Rey, Frank Kramer

BMC Research Notes · 2022 · Review · CC BY

doi:10.1186/s13104-022-06096-y

Abstract

In the last decade, research on artificial intelligence has seen rapid growth with deep learning models, especially in the field of medical image segmentation. Various studies demonstrated that these models have powerful prediction capabilities and achieved similar results as clinicians. However, recent studies revealed that the evaluation in image segmentation studies lacks reliable model performance assessment and showed statistical bias by incorrect metric implementation or usage. Thus, this work provides an overview and interpretation guide on the following metrics for medical image segmentation evaluation in binary as well as multi-class problems: Dice similarity coefficient, Jaccard, Sensitivity, Specificity, Rand index, ROC curves, Cohen’s Kappa, and Hausdorff distance. Furthermore, common issues like class imbalance and statistical as well as interpretation biases in evaluation are discussed. As a summary, we propose a guideline for standardized medical image segmentation evaluation to improve evaluation quality, reproducibility, and comparability in the research field.

Full text

From PubMed Central, U.S. National Library of Medicine, as current on Oct 19, 2026. Paragraph numbers are ours, so an answer can point at one.

Introduction

In the last decade, research on artificial intelligence has seen rapid growth with deep learning models, by which various computer vision tasks got successfully automated through accurate neural network classifiers. Evaluation procedures or quality of model performance are highly distinctive in computer vision between different research fields and applications.

The subfield medical image segmentation (MIS) covers the automated identification and annotation of medical regions of interest (ROI) like organs or medical abnormalities (e.g. cancer or lesions). Various novel studies demonstrated that MIS models based on deep learning revealed powerful prediction capabilities and achieved similar results as radiologists regarding performance. Clinicians, especially from radiology and pathology, strive to integrate deep learning based MIS methods as clinical decision support (CDS) systems in their clinical routine to aid in diagnosis, treatment, risk assessment, and reduction of time-consuming inspection processes. Throughout their direct impact on diagnosis and treatment decisions, correct and robust evaluation of MIS algorithms is crucial.

However, in the past years a strong trend of highlighting or cherry-picking improper metrics to show particularly high scores close to 100% was revealed in scientific publishing of MIS studies. Studies showed that statistical bias in evaluation is caused by issues reaching from incorrect metric implementation or usage to missing hold-out set sampling for reliable validation. This led to the current situation that various clinical research teams are reporting issues on model usability outside of research environments. The use of faulty metrics and missing evaluation standards in the scientific community for the assessment of model performance on health-sensitive procedures is a large threat to the quality and reliability of CDS systems.

In this work, we want to provide an overview of appropriate metrics, discuss interpretation biases, and propose a guideline for properly evaluating medical image segmentation performance in order to increase research reliability and reproducibility in the field of medical image segmentation.

Evaluation metrics

Evaluation of semantic segmentation can be quite complex because it is required to measure classification accuracy as well as localization correctness. The aim is to score the similarity between the predicted (prediction) and annotated segmentation (ground truth). Over the last 30 years, a large variety of evaluation metrics can be found in the MIS literature. However, only a handful of scores have proven to be appropriate and are used in a standardized way. This work demonstrates and discusses the behavior of the following common metrics for evaluation in MIS:F-measure based metrics like Dice Similarity Coefficient (DSC) and Intersection-over-Union (IoU)Sensitivity (Sens) and Specificity (Spec)Accuracy / Rand Index (Acc)Receiver Operating Characteristic (ROC) and the area under the ROC curve (AUC)Cohen’s Kappa (Kap)Average Hausdorff Distance (AHD)

F-measure based metrics like Dice Similarity Coefficient (DSC) and Intersection-over-Union (IoU)

Sensitivity (Sens) and Specificity (Spec)

Accuracy / Rand Index (Acc)

Receiver Operating Characteristic (ROC) and the area under the ROC curve (AUC)

Cohen’s Kappa (Kap)

Average Hausdorff Distance (AHD)

In detail descriptions of these metrics are presented in the Appendix. The behavior of the metrics in this work is illustrated in Fig. 1 and Fig. 2 which demonstrate the metric application in multiple use cases.

Class imbalance in medical image segmentation

Medical images are infamous in the field of image segmentation due to their extensive class imbalance. Usually, an image in medicine contains a single ROI taking only a small percentage of pixels in the image, whereas the remaining image is all annotated as background. From a technical perspective for machine learning, this scenario entails that the model classifier must be trained on data composed of a very rare ROI class and a background class with often more than 90% or even close to 100% prevalence. This extreme inequality in class distribution affects all aspects of a computer vision pipeline for MIS, starting from the preprocessing, to the model architecture and training strategy up to the performance evaluation.

In MIS evaluation, class imbalance significantly affects metrics which include correct background classification. For metrics based on the confusion matrix, these cases are defined as true negatives. In a common medical image with a class distribution of 9:1 between background and ROI, the possible number of correct classifications is extensively higher for the background class compared to the ROI. Using a metric with equal true positive and true negative weighting results in a high-ranking scoring even if any pixel at all is classified as ROI and, thus, significantly biases the interpretation value. This behavior can be seen in metrics like Accuracy or Specificity which present always significantly high scorings in any MIS context. Therefore, these metrics should be avoided for any interpretation of segmentation performance. Metrics that focus on only true positive classification without a true negative inclusion provide better performance representation in a medical context. This is why the DSC and IoU are highly popular and recommended in the field of MIS.

Influence of the region-of-interest size on evaluation

The size of an ROI and the resulting class imbalance ratio in an image demonstrates an anti-correlation to evaluation complexity for interpretation robustness. In the medical context, the ROI size is determined by the type in terms of the medical condition and the imaging modality. Various types of ROIs can be relevant to segment for clinicians. Whereas organ segmentation, cell detection, or a brain atlas take up a larger fraction of the image and, thereby, represent a more equal background-ROI class ratio, the segmentation of abnormal medical features like lesions commonly reflects the strong class imbalance and can be characterized as more complex to evaluate. Furthermore, the imaging modality highly influences the ratio between ROI and background. Modern high-resolution imaging like whole-slide images in histopathology provides resolutions of 0.25 μm with commonly 80,000 × 60,000 pixels in which an anaplastic (poorly differentiated) cell region takes up only a minimalistic part of the image. In such a scenario, the resulting background-ROI class ratio could typically be around 183:1 (estimated by a 512 × 512 ROI in an 803 × 603 slide). Another significant class ratio increase can be observed in 3D imaging from radiology and neurology. Computer tomography or magnetic resonance imaging scans regularly provide image resolutions of 512 × 512 pixels with hundreds of slices (z-axis) resulting in a typical class ratio around 373:1 (estimated by a 52 × 52 ROI in a 512 × 512x200 scan). In order to avoid such extreme imbalance bias, metrics that are distance-based like AHD or exclude true negative rewarding like DSC are recommended. Besides that, patching techniques (splitting the slide or scan into multiple smaller images) are often also applied to reduce complexity and class imbalance.

Influence of the segmentation task on evaluation

For valid interpretation of a MIS performance, it is crucial to understand metric behaviors and expected scores in different segmentation tasks. Depending on the ROI type like a lesion or organ segmentation, the complexity of the segmentation task and the resulting expected score varies significantly. In organ segmentation, the ROI should be located consistently at the same position with low spatial variance between samples, whereas an ROI in lesion segmentation shows high spatial as well as morphological variance in its characteristics. Thereby, optimal performance metrics in organ segmentation are more likely to be possible, even though less realistic in lesion segmentation. This complexity variance implicates expected evaluation scores and should be factored in performance interpretation. Another important influencing factor in the segmentation task is the number of ROIs in an image. Multiple ROIs require additional attention for implementation and interpretation because not only high scoring metrics can be misleading and hiding undetected smaller ROIs between well predicted larger ROIs but also distance-based metrics are defined only on pairwise instance comparisons. These risks should be considered in any evaluation of multiple ROIs.

Multi-class evaluation

The previous evaluation metrics discussed are all defined for binary segmentation problems. It is needed to be aware that applying binary metrics to multi-class problems can result in highly biased results, especially in the presence of class imbalance. This can often lead to a confirmation bias and promising-looking evaluation results in scientific publications which, however, are actually quite weak. In order to evaluate multi-class tasks, it is required to compute and analyze the metrics individually for each class. Distinct evaluation for each class is in the majority of cases the most informative and comparable method. Nevertheless, it is often necessary to combine the individual class scores to a single value for improving clarity or for further utilization, for example as a loss function. This can be achieved by micro and macro averaging the individual class scores. Whereas macro-averaging computes the individual class metrics independently and just averages the results, micro-averaging aggregates the contributions of each class for computing the average score.

Evaluation guideline

Use DSC as main metric for validation and performance interpretation.Use AHD for interpretation of point position sensitivity (contour) if needed.Watch out for class imbalance and avoid interpretations based on high Accuracy.Provide next to DSC also IoU, Sensitivity, and Specificity for method comparability.Provide sample visualizations, comparing the annotated and predicted segmentation, for visual evaluation as well as to avoid statistical bias.Avoid cherry-picking high-scoring samples.Provide histograms or box plots showing the scoring distribution across the dataset.Keep in mind variable metric outcomes for different segmentation types.Be aware of interpretation risks by multiple ROIs.For multi-class problems, provide metric computations for each class individually.Avoid confirmation bias through macro-averaging classes which is pushing scores via background class inclusion.Provide access to evaluation scripts and results with journal data services or third-party services like GitHub and Zenodo for easier reproducibility.

Use DSC as main metric for validation and performance interpretation.

Use AHD for interpretation of point position sensitivity (contour) if needed.

Watch out for class imbalance and avoid interpretations based on high Accuracy.

Provide next to DSC also IoU, Sensitivity, and Specificity for method comparability.

Provide sample visualizations, comparing the annotated and predicted segmentation, for visual evaluation as well as to avoid statistical bias.

Avoid cherry-picking high-scoring samples.

Provide histograms or box plots showing the scoring distribution across the dataset.

Keep in mind variable metric outcomes for different segmentation types.

Be aware of interpretation risks by multiple ROIs.

For multi-class problems, provide metric computations for each class individually.

Avoid confirmation bias through macro-averaging classes which is pushing scores via background class inclusion.

Provide access to evaluation scripts and results with journal data services or third-party services like GitHub and Zenodo for easier reproducibility.

Sample visualization

Besides the exact performance evaluation via metrics, it is strongly recommended to additionally visualize segmentation results. Comparing annotated and predicted segmentation allows robust performance estimation by eye. Sample visualization can be achieved via binary visualization of each class (black and white) or via utilizing transparent color application based on pixel classes on the original image. The strongest advantage of sample visualization is that statistical bias, overestimation of predictive power through unsuited or incorrect computed metrics, is avoided.

Experiments

We conducted multiple experiments for supporting the principles of our evaluation guideline as well as demonstrate metric behaviors on various medical imaging modalities. Furthermore, the insights of this comment are based on the experience during the development and application of the popular framework MIScnn as well as our contribution to currently running or already published clinical studies.

The analysis utilized our medical image segmentation framework MIScnn and was performed with the following parameters: Sampling in 64% training, 16% validation, and 20% testing sets; resizing into 512 × 512 pixel images; value intensity normalization via Z-score; extensive online image augmentation during training, common U-Net architecture as neural network with focal Tversky loss function and a batch size of 24 samples; advanced training features like dynamic learning rate, early stopping and model checkpoints. The training was performed for a maximum of 1000 epochs (68 up to 173 epochs after early stopping) and on 50 up to 75 randomly selected images per epoch. For metric computation and evaluation, we utilized our framework MISeval, which provides implementation and an open interface for all discussed evaluation metrics in a Python environment. In order to cover a large spectrum of medical imaging with our experiments, we integrated datasets from various medical fields: Radiology–brain tumor detection in magnetic resonance imaging from Cheng et al., ultrasound–breast cancer detection in ultrasound images, microscopy–cell nuclei detection in histopathology from Caicedo et al., endoscopy–endoscopic colonoscopy frames for polyp detection, fundus photography–vessel extraction in retinal images, dermoscopy–skin lesion segmentation for melanoma detection in dermoscopy images.

Outlook

This work focused on defining metrics, their recommended usage and interpretation biases to establish a standardized medical image segmentation evaluation procedure. We hope that our guidelines will help improve evaluation quality, reproducibility, and comparability in future studies in the field of medical image segmentation. Furthermore, we noticed that there is no universal Python package for metric computations, which is why we are currently working on a package to compute metrics scores in a standardized way. In the future, we want to further contribute and expand our guidelines for reliable medical image segmentation evaluation.

References 47

  1. 1.

    Litjens G, Kooi T, Bejnordi BE, Setio AAA, Ciompi F, Ghafoorian M, et al. A survey on deep learning in medical image analysis. Med Image Anal. 2012;2017(42):60-88.

    Not in our library10.1016/j.media.2017.07.005

  2. 2.

    Müller D, Soto-Rey I, Kramer F. Robust chest CT image segmentation of COVID-19 lung infection based on limited data. Inform Med Unlocked. 2021;25:100681.

    Not in our library10.1016/j.imu.2021.100681

  3. 3.

    Renard F, Guedria S, De Palma N, Vuillerme N. Variability and reproducibility in deep learning for medical image segmentation. Sci Rep. 2020;10(1):1-16.

    Not in our library10.1038/s41598-020-69920-0

  4. 4.

    Parikh RB, Teeple S, Navathe AS. Addressing bias in artificial intelligence in health care. J Am Med. 2019;322:2377-8.

    Not in our library10.1001/jama.2019.18058

  5. 5.

    Zhang Y, Mehta S, Caspi A. Rethinking Semantic Segmentation evaluation for explainability and model selection. 2021. Accessed from: https://arxiv.org/abs/2101.08418

    Not in our library

  6. 6.

    Powers DMW. Evaluation: from precision, recall and F-measure to ROC, informedness, markedness and correlation. 2020. Accessed from: http://arxiv.org/abs/2010.16061

    Not in our library

  7. 7.

    El Naqa IM, Hu Q, Chen W, Li H, Fuhrman JD, Gorre N, et al. Lessons learned in transitioning to AI in the medical imaging of COVID-19. J Med Imaging. 2021;8(S1):010902.

    Not in our library10.1117/1.jmi.8.s1.010902

  8. 8.

    Gibson E, Hu Y, Huisman HJ, Barratt DC. Designing image segmentation studies: statistical power, sample size and reference standard quality. Med Image Anal. 2017;1(42):44-59.

    Not in our library10.1016/j.media.2017.07.004

  9. 9.

    Niessen WJ, Bouma CJ, Vincken KL, Viergever MA, Reinhard K, Siegfried HS, Max AV, Koen LV. Error metrics for quantitative evaluation of medical image segmentation. Performance characterization in computer vision. 2000.

    Not in our library

  10. 10.
  11. 11.

    Popovic A, de la Fuente M, Engelhardt M, Radermacher K. Statistical validation metric for accuracy assessment in medical image segmentation. Int J Comput Assist Radiol Surg. 2007;2(3–4):169-81.

    Not in our library10.1007/s11548-007-0125-1

  12. 12.

    Sandeep Kumar E, Satya JP, Sujata D, Biswa RA, Mamta M, Ajith A, Arpad K. Deep learning for clinical decision support systems: a review from the panorama of smart healthcare. Deep learning techniques for biomedical and health informatics. 2020.

    Not in our library

  13. 13.

    Altaf F, Islam SMS, Akhtar N, Janjua NK. Going deep in medical image analysis: concepts, methods, challenges, and future directions. IEEE Access. 2019;7:99540-72.

    Not in our library10.1109/access.2019.2929365

  14. 14.

    Shaikh F, Dehmeshki J, Bisdas S, Roettger-Dupont D, Kubassova O, Aziz M, et al. Artificial intelligence-based clinical decision support systems using advanced medical imaging and radiomics. Curr Probl Diagn Radiol. 2021;50(2):262-267.

    Not in our library10.1067/j.cpradiol.2020.05.006

  15. 15.

    Pedersen M, Verspoor K, Jenkinson M, Law M, Abbott DF, Jackson GD. Artificial intelligence for clinical decision support in neurology. Brain Commun. 2020.

    Not in our library10.1093/braincomms/fcaa096/5869431

  16. 16.

    Chen H, Sung JJY. Potentials of AI in medical image analysis in gastroenterology and hepatology. J Gastroenterol Hepatol. 2021;36(1):31-8.

    Not in our library10.1111/jgh.15327

  17. 17.

    Nai YH, Teo BW, Tan NL, O’Doherty S, Stephenson MC, Thian YL, et al. Comparison of metrics for the evaluation of medical segmentations using prostate MRI dataset. Comput Biol Med. 2021;1(134):104497.

    Not in our library10.1016/j.compbiomed.2021.104497

  18. 18.
  19. 19.

    Wolfgang Kuhlen T, Scholl I, Aach T, Deserno TM, Kuhlen T, Scholl I, et al. Challenges of medical image processing. Comput Sci Res Dev. 2011;26:5-13.

    Not in our library10.1007/s00450-010-0146-9

  20. 20.

    Herrmann MD, Clunie DA, Fedorov A, Doyle SW, Pieper S, Klepeis V, et al. Implementing the DICOM standard for digital pathology. J Pathol Inform. 2018;9(1):37.

    Not in our library10.4103/jpi.jpi_42_18

  21. 21.
  22. 22.

    Isensee F, Jaeger PF, Kohl SAA, Petersen J, Maier-Hein KH. nnU-Net: a self-configuring method for deep learning-based biomedical image segmentation. Nat Methods. 2021;18(2):203-11.

    Not in our library10.1038/s41592-020-01008-z

  23. 23.

    Liu X, Song L, Liu S, Zhang Y, Feliu C, Burgos D. Review of deep-learning-based medical image segmentation methods. Sustainability. 2021.

    Not in our library10.3390/su13031224

  24. 24.

    GitHub. Accessed from: https://github.com/

    Not in our library

  25. 25.

    Zenodo—Research. Shared. Accessed from: https://zenodo.org/

    Not in our library

  26. 26.

    Müller D, Soto-Rey I, Kramer F. Multi-disease detection in retinal imaging based on ensembling heterogeneous deep learning models. In: studies in health technology and informatics. Accessed from: https://pubmed.ncbi.nlm.nih.gov/34545816/

    Not in our library10.3233/shti210537

  27. 27.

    Müller D, Soto-Rey I, Kramer F. An Analysis on ensemble learning optimized medical image classification with deep convolutional neural networks. 2022. Accessed from: http://arxiv.org/abs/2201.11440

    Not in our library

  28. 28.

    Meyer P, Müller D, Soto-Rey I, Kramer F, John M, Lăcrămioara ST, Catherine C, Arie H, Patrick W, Parisis G, Mihaela CV, Emmanouil Z, Oana SCh. COVID-19 image segmentation based on deep learning and ensemble learning. Public health and informatics. 2021.

    Not in our library10.3233/shti210223

  29. 29.

    Ronneberger O, Philipp Fischer, Brox T. U-Net: Convolutional Networks for Biomedical Image Segmentation. Lect Notes Comput Sci (including Subser Lect Notes Artif Intell Lect Notes Bioinformatics). 2015;9351:234–41.

    Not in our library

  30. 30.

    Abraham N, Khan NM. A novel focal tversky loss function with improved attention u-net for lesion segmentation. In: proceedings—international symposium on biomedical imaging. 2019.

    Not in our library

  31. 31.

    Müller D, Hartmann D, Meyer P, Auer F, Soto-Rey I, Kramer F, Sylvia P, Andrea P, Bastien R, Lucia S, Adrien U, Arriel B, Parisis G, Brigitte S, Patrick W, Ferdinand D, Cyril G, Jan DL. MISeval: a metric library for medical image segmentation evaluation. Challenges of trustable AI and added-value on health. proceedings of MIE 2022. 2022.

    Not in our library10.3233/shti220391

  32. 32.

    Cheng J, Yang W, Huang M, Huang W, Jiang J, Zhou Y, et al. Retrieval of brain tumors by adaptive spatial pooling and fisher vector representation. PLoS ONE. 2016;11(6):e0157112.

    Not in our library10.1371/journal.pone.0157112

  33. 33.
  34. 34.
  35. 35.
  36. 36.

    Bernal J, Sánchez FJ, Fernández-Esparrach G, Gil D, Rodríguez C, Vilariño F. WM-DOVA maps for accurate polyp highlighting in colonoscopy: validation vs saliency maps from physicians. Comput Med Imaging Graph. 2015;43:99-111.

    Not in our library10.1016/j.compmedimag.2015.02.007

  37. 37.

    Introduction—grand challenge. Accessed from: https://drive.grand-challenge.org/DRIVE/

    Not in our library

  38. 38.

    Codella NCF, Gutman D, Celebi ME, Helba B, Marchetti MA, Dusza SW, et al. Skin lesion analysis toward melanoma detection: a challenge at the 2017 International symposium on biomedical imaging (ISBI), hosted by the international skin imaging collaboration (ISIC). In: proceedings—international symposium on biomedical imaging. IEEE computer society; 2018. 168–72.

    Not in our library

  39. 39.

    Taghanaki SA, Abhishek K, Cohen JP, Cohen-Adad J, Hamarneh G. Deep semantic segmentation of natural and medical images. Artif Intell Rev. 2021.

    Not in our library10.1007/s10462-020-09854-1

  40. 40.

    Liu X, Song L, Liu S, Zhang Y. A review of deep-learning-based medical image segmentation methods. Sustain. 2021;13(3):1-29.

    Not in our library

  41. 41.

    Kumar RV, Antony GM. A Review of methods and applications of the ROC curve in clinical trials. Drug Inf J. 2010;44(6):659-71.

    Not in our library10.1177/009286151004400602

  42. 42.

    Hanley JA, McNeil BJ. The meaning and use of the area under a receiver operating characteristic (ROC) curve. Radiology. 1982;143(1):29-36.

    Not in our library10.1148/radiology.143.1.7063747

  43. 43.

    Cohen J. A coefficient of agreement for nominal scales. Educ Psychol Meas. 1960;20(1):37-46.

    Not in our library10.1177/001316446002000104

  44. 44.

    Cohen’s Kappa: what it is, when to use it, how to avoid pitfalls | KNIME. Accessed from: https://www.knime.com/blog/cohens-kappa-an-overview

    Not in our library

  45. 45.

    Delgado R, Tibau XA. Why Cohen’s Kappa should be avoided as performance measure in classification. PLoS One. 2019;14(9):e0222916.

    Not in our library10.1371/journal.pone.0222916

  46. 46.
  47. 47.

    Karimi D, Salcudean SE. Reducing the hausdorff distance in medical image segmentation with convolutional neural networks. IEEE Trans Med Imaging. 2019;39(2):499-513.

    Not in our library10.1109/tmi.2019.2930068

Cited by papers we hold 1

Reads

Read by people on this page

None yet.

Checked or read by AI through naulon

None yet.

A person counts once a day per paper. We keep no cookie and no address: a reader is a hash that changes every day. Any month under five reads shows no number.

Are you an author?

Is this your paper?

Claim it to add your note and be paid when agents cite it. Free.