arXiv:2608.29677cs.CVAug 2026

Manuscript Offprint

arXiv:2608.29677

MedSegBenchmarker: A Raw-Count-First Framework for Controlled 2D Medical Image Segmentation Benchmarks

Vanessa Borst, Lukas Horn, Daniel Grillmeyer, Thomas Prantl, Samuel Kounev

Abstract

Despite rapid advances in medical image segmentation (MIS), fair and reproducible comparisons of segmentation models remain challenging due to heterogeneous datasets, inconsistent evaluation protocols, and rapidly evolving architectures. In particular, comparisons often implicitly assume that model rankings are invariant to data partitioning, preprocessing, metric aggregation, uncertainty estimation, and computational constraints. The lack of extensible and unified evaluation frameworks further limits systematic investigation of new models, datasets, and training paradigms. We present MEDSEGBENCHMARKER (MSB), a configuration-driven framework for controlled benchmarking of 2D MIS. It integrates duplicate and near-duplicate detection during data preparation, group-aware data splitting, layered YAML study specifications, resumable training, hyperparameter optimization (HPO), cross-validation (CV), and checkpoint-based final evaluation. Rather than retaining only aggregate performance measures, MSB exports sample- and class-level pixel counts and predictions together with the associated evaluation context. These elementary artifacts enable post-hoc analyses without requiring repeated inference. We demonstrate MSB in a case study involving three heterogeneous 2D datasets and multiple MIS and general-purpose vision models evaluated at 256- and 512-pixel input resolutions. Reaggregation of identical predictions changes the top-ranked architecture in three of six dataset-resolution settings, despite high rank correlations between aggregation strategies. Increasing input resolution produces model- and dataset-dependent performance gains and losses that must be considered alongside empirically measured inference complexity. These results show that seemingly minor choices in evaluation and experimental setup can affect benchmark conclusions. MSB, available at GitHub, provides a practical and extensible basis for making benchmark conditions and evaluation choices explicit and reproducible.

1. Introduction

In MIS, progress is commonly communicated through improved metric scores attributed to a new encoder [6, 8, 38, 43], decoder [6, 8, 33, 34, 38], attention mechanism [33, 34], or pretraining strategy [27, 43, 52]. That score, however, is inseparable from the experiment that produced it. Dataset curation, patient separation, input resolution, augmentation, optimization budget, checkpoint selection, and metric aggregation can all affect the reported result. Empirical work has documented substantial variability in deep-learning segmentation pipelines [36], while broader analyses identify experimental design and reporting deficiencies as recurring threats to reliable medical-imaging research [32, 45]. In a review of recent MIS papers, more than half reported no measure of variability and fewer than one percent reported confidence intervals (CIs) [9].

Evaluation choices are particularly consequential when target structures are rare or heterogeneous. Pooling pixels across a test set gives greater weight to large structures, whereas averaging image-level scores weights each image equally; class-macro aggregation instead favors rare labels. These estimators answer different questions rather than providing interchangeable versions of one result. Likewise, higher image resolution may better represent small details while imposing model-dependent compute and memory costs. Biomedical challenge rankings can be unstable under changes in test cases and aggregation schemes [28]; recent guidance emphasizes matching metrics to the scientific question and properties of the target structures [35].

These issues reflect a broader reproducibility crisis affecting scientific research across disciplines [4, 42]. Kapoor and Narayanan [20] documented reproducibility failures and methodological pitfalls, including data leakage, across 648 papers spanning medicine, neuroimaging, radiology, and dermatology, contributing in some cases to substantially overoptimistic performance claims. Such discrepancies can impede scientific progress, waste computational and human resources, and increase the risk of deploying unreliable systems in high-stakes settings.

Concerns about the validity of machine learning (ML) evaluations are neither new nor confined to a single pipeline stage. Semmelrock et al. [40] categorize reproducibility barriers into description, code, data, and experiment, concluding that the reliability of ML evaluation remains underemphasized and lacks established best practices, particularly when ML frameworks are used by domain experts rather than data scientists. Liao et al. [23] show in a meta-review that pitfalls arise throughout the ML lifecycle, including model training, baseline selection, and dataset and metric choice, indicating that no single stage can be addressed in isolation. Hutchinson et al. [16] further confirm this in an analysis of 200 papers from top-tier NLP and computer vision venues, finding a systematic gap between what should be evaluated and what is actually evaluated.

Dataset collections, benchmarks, and software frameworks address important parts of this landscape. The Medical Segmentation Decathlon [3] and MedSegBench [21] provide curated evaluation tasks; MONAI [7] and TorchIO[31] provide reusable medical-imaging components; and nnU-Net automatically configures a strong segmentation method for a new task [18]. Our scope is complementary: we focus on controlled comparisons among heterogeneous segmentation architectures and on retaining the elementary evidence needed to examine how evaluation choices affect their conclusions.

We present MEDSEGBENCHMARKER, a configuration-driven research framework for controlled 2D MIS benchmarks. The current implementation targets modalities acquired as 2D images, including dermoscopy, endoscopy, and ultrasound. It supports duplicate and near-duplicate diagnostics during data preparation, as well as group-aware splitting when group metadata are supplied. Layered YAML specifications describe shared, dataset-specific, and architecture-specific settings; execution covers single runs, declared Cartesian grid or Hyperband searches, and K-fold CV, with resumable run state. Final evaluation reloads the selected checkpoint and exports foreground TP, FP, FN, and TN counts for each sample-class pair, together with the relevant split, fold, run, evaluation, and prediction-semantics fields. These counts are then the basis for subsequent aggregation, uncertainty estimation, figures, and LaTeX tables.

To characterize the conditions of a model comparison, we introduce the benchmark contract as a conceptual representation of factors that may influence evaluation outcomes: dataset and labels, split policy, preprocessing, data augmentation, model settings, optimization and checkpoint-selection policy, inference rules, and evaluation procedure. The contract does not certify that a comparison is fair; rather, it provides a structured means to record and inspect shared controls, justified differences, and architecture-specific constraints across the configurations and artifacts used in a study.

Overall, our contributions can be summarized as follows:

  • Configuration-driven benchmarking tool: We design a modular workflow connecting dataset diagnostics and splitting, layered study specifications, resumable execution, checkpoint-backed final evaluation, and post-hoc analysis for 2D MIS. MEDSEGBENCHMARKER produces reproducible artifacts, including raw CV results and scripts for regenerating analyses and reports.

  • Raw-count-first evaluation and benchmark contract: Sample-class confusion counts retain the information required for several count-based aggregation views and paired resampling analyses after inference, while the benchmark contract organizes the methodological choices needed to interpret a comparison. By mapping the contract directly to the implementation, MSB enables systematic and reproducible comparisons of heterogeneous architectures for MIS.

  • Case study of evaluation sensitivity: We demonstrate MSB in a case study covering eleven architectures and three heterogeneous 2D MIS datasets at two input resolutions of 256×256256 \times 256 and 512×512512 \times 512. The study reaggregates fixed raw counts under global-micro, image-macro, and class-macro Dice, compares paired resolution changes, and reports model-only inference complexity. Its purpose is to illustrate the consequences of evaluation design, rather than to establish an universal architecture ranking.

References (45)