Manuscript Offprint
arXiv:2608.29677MedSegBenchmarker: A Raw-Count-First Framework for Controlled 2D Medical Image Segmentation Benchmarks
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 and . 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.
Table 1. Comparison of segmentation frameworks and benchmarks (√=fulfilled, ○=partially fulfilled, ×=not fulfilled).
| Tier | Framework / Benchmark | Counts | Ext. | Config. | HPO | Audit | OOD | XAI | Profil. | Plotting | Notifs. |
|---|---|---|---|---|---|---|---|---|---|---|---|
| — | MEDSEGBENCHMARKER (MSB) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| 1 | nnU-Net [18] | ✓ | ✓ | ✓ | ✓ | × | × | × | ○ | ○ | × |
| MONAI [7] | ○ | ✓ | ✓ | ✓ | × | × | ✓ | × | ✓ | ○ | |
| TorchIO [31] | × | ✓ | ○ | × | × | × | × | × | × | × | |
| TorchXrayVision [11] | × | ✓ | × | × | ○ | ✓ | × | × | × | × | |
| 2 | MedSegBench [21] | × | ✓ | ○ | × | × | × | × | × | × | × |
| Medical Segmentation Decathlon [3] | × | × | × | × | × | ✓ | × | × | × | × | |
| TotalSegmentator [47] | × | ✓ | ○ | ✓ | × | × | × | × | ○ | × | |
| FeTS Challenge Toolkit [30, 51] | × | ✓ | ✓ | × | - | ✓ | × | × | × | × | |
| G | PaddleSeg [26] | × | ✓ | ✓ | ✓ | × | × | × | ✓ | ✓ | × |
| Segmentation Models PyTorch [17] | ○ | ✓ | ✓ | × | × | × | × | × | × | × | |
| MMSegmentation [12] | × | ✓ | ✓ | × | × | × | ✓ | ✓ | ✓ | × | |
| Transformers Hugging Face [48] | × | ✓ | ✓ | ✓ | ○ | ○ | × | × | × | ○ |
for example for HPO. Such integrations require users to select, connect, and maintain an additional tool within the experimental workflow and are therefore denoted by “×”. A “✓” is reserved for functionality implemented within the system’s own workflow and exposed through interfaces; study-specific configuration may still be required.
Medical Image Segmentation Frameworks. Prominent MIS frameworks include nnU-Net [18], MONAI [7], TorchIO [31] and TorchXrayVision [11]. MONAI provides composable networks, transforms, losses, and inference utilities for healthcare imaging [7], while TorchIO focuses on image loading, preprocessing, augmentation, and patch sampling [31]. nnU-Net addresses a different, adjacent objective: it derives a strong task-specific pipeline from dataset characteristics [18]. TorchXrayVision provides a standardized interface to chest X-ray datasets, preprocessing routines, and pretrained deep-learning models [11]. These systems provide valuable primitives, reference implementations, and task-specific automation. MSB operates at a different layer: it coordinates a declared comparison across heterogeneous model adapters, records the checkpoint used for final evaluation, and retains sample-class count artifacts for subsequent analysis. It is therefore complementary to, rather than a replacement for, their model, transform, and training components.
MONAI is the closest comparator in scope, combining broad medical-imaging primitives, visualization, and extensibility. Nevertheless, it is a component framework rather than a benchmark-control layer: its bundles may contain executable Python expressions, while external-dataset workflows and the use of optimization libraries such as Optuna [1] or Ray Tune [24] require study-specific integration. MSB instead exposes seed control and an optional deterministic mode through explicit YAML keys (random_seed and full_determinism). Moreover, it provides declared grid/Hyperband execution, checkpoint-backed raw-count export, duplicate diagnostics, and separate efficiency profiling. These facilities make relevant choices more explicit and inspectable.
Benchmarking Studies and Datasets. The Medical Segmentation Decathlon established a collection of ten 3D tasks for evaluating algorithmic generalization [3]. MedSegBench broadens task and modality coverage through a curated collection of 2D and 3D MIS datasets [21]. TotalSegmentator provides a widely used task-specific segmentation application [47], while the FeTS Toolkit supports challenge-oriented federated-learning workflows [30, 51]. Such resources define valuable tasks, data, and reference settings. However, their primary focus is not on providing general-purpose benchmarking capabilities, such as automated HPO, standardized visualization, or comprehensive performance evaluation across heterogeneous models. Consequently, such functionality may require additional implementation or integration within the respective workflow. In contrast, MSB provides dataset-agnostic infrastructure for configuring and inspecting comparative studies once a dataset has been converted to its indexed image-mask schema. This design allows existing benchmark datasets to be integrated without requiring the benchmarking framework itself to be tailored to a specific dataset or task.
General Segmentation Frameworks. General-purpose segmentation frameworks like PaddleSeg [26], Segmentation Models PyTorch [17], MMSegmentation [12], and Hugging Face Transformers [48] offer broad model zoos and strong community support. MSB is not intended to replace these libraries or to provide a general model zoo. Instead, it supplies study-level control for declared 2D MIS comparisons, while architectures remain available through model adapters and can be implemented using general-purpose framework components.
3. MedSegBenchmarker Toolbox
3.1. Design Rationale
MIS studies commonly combine dataset preparation, split generation, model training, HPO, CV, post-hoc analysis, and figure generation through study-specific scripts. Such fragmentation can obscure the relationship between a reported result and the experimental choices that produced it, including the data split, selected checkpoint, decision threshold, and aggregation rule. It can therefore impede the inspection, reproduction, and comparison of results.
In contrast, MEDSEG BENCHMARKER was developed as a Python/PyTorch toolbox for controlled end-to-end benchmarks in supervised 2D MIS. It supports binary and multi-class tasks from an indexed image-mask dataset through training and final evaluation to reusable, sample-level evaluation data. Overall, its design is guided by five principles: (I) Transparency, through human-readable YAML configurations, logging, and structured outputs; (II) Reproducibility support, through seed control, checkpointed states, and an optional deterministic execution mode; (III) Modularity, through separate data, training, evaluation, and analysis components; (IV) Extensibility, through common dataset and model interfaces; and (V) Traceability, by linking final-evaluation counts to their configuration hash, checkpoint reference, and prediction semantics.
Together, these principles support configurable benchmarking across deep learning (DL) architectures. Configurations declare architectures, transforms, optimizers, loss functions, checkpoint policies, and evaluation settings. The shared evaluator uses common metric definitions and records binary decision thresholds or multi-class argmax semantics with the final counts. When experiments are run under a stated common protocol, these facilities make the resulting comparison more transparent and inspectable; they do not by themselves establish that the protocol is fair.
3.2. Benchmark Contract
We use the term benchmark contract for the methodological choices that define the conditions under which performance is estimated and compared:
Here, denotes the dataset and label mapping; the split and, where available, grouping policy; preprocessing and augmentation; and the model architecture and its declared settings. comprises optimization and checkpoint selection, the output interpretation and decision rule, and the retained elementary outputs, metric definitions, aggregation, and uncertainty procedure.
The contract is a conceptual representation, not a universal manifest format. In MSB, its elements are declared across YAML configurations, the stored K-fold state, checkpoint records, and final-evaluation artifacts. The configuration generator combines global, architecture-specific, and dataset-specific settings into runnable YAML files, making experimental choices such as normalization, batch size, or precision settings visible rather than hidden in orchestration code. The raw-count artifact then binds an evaluation to a configuration hash, an explicit checkpoint reference, and a decision rule. Thus, the toolbox makes many comparison choices inspectable, but it does not certify that all choices in C are scientifically appropriate. Those choices should be fixed or justified before inspecting final results.
3.3. Five-Stage Workflow
Rather than treating training as an isolated task, MEDSEG-BENCHMARKER organizes a study around persisted configurations, states, checkpoints, and evaluation outputs. Fig. 1 summarizes the stages: ① dataset preparation and audit; ② YAML-based study specification; ③ training, HPO, or K-fold CV; ④ checkpoint-backed final evaluation with raw-count export; and ⑤ post-hoc analysis and reporting.
-
Dataset Curation and Leakage Control. The common dataset interface uses index.csv to associate image and mask files with their split, dimensions, and file types, and classes.csv to map source mask values to the training classes. Dataset-specific converters are available for some public datasets as an example, while any custom dataset following this layout can use the same training path. Fixed splits may be read from the index, and seeded custom splits are supported. In K-fold CV, a configured group column keeps all samples of a known group, such as a patient, in the same fold. MSB also provides optional duplicate-assessment utilities. They report byte-identical files using SHA-256, identical perceptual hashes, and candidate near-duplicate groups based on perceptual-hash distance; an Excel report and a graphical review tool support manual inspection of the candidate images. A mask-drawing utility further supports visual dataset inspection. These utilities identify potential leakage routes but do not prove patient identity or automatically remove samples: review decisions must be applied during curation, and unknown cross-subject dependencies remain a dataset-specific risk.
-
Study Specification and Configuration. YAML specifications declare the dataset, transforms, architecture, optimizer, loss, learning-rate (LR) schedule, checkpoint policy, and evaluation settings. The configuration generator can compose global controls with architecture- and dataset-specific layers, yielding an explicit configuration for each experiment. This provides a practical place to state legitimate model accommodations, while retaining the common settings that define a comparison.
-
Controlled and Resumable Execution. A common Segmentor interface separates orchestration from model implementation. The current registry covers convo-

Figure 1. Five-stage study workflow in MEDSEG BENCHMARKER.
lutional, transformer, hybrid, and state-space-inspired designs (cf. Section 4). Some model adapters require optional packages or native extensions, so registration alone does not claim support on every platform. The execution layer supports single runs, Cartesian grid search, Hyperband, and K-fold CV; the latter persists generated fold indices. Training checkpoints retain model, optimizer, scheduler, gradient-scaler, early-stopping, metric-tracking, and random-number-generator states for resumption. Deterministic execution can be configured, although exact numerical equality may still depend on hardware and library versions.
- Checkpoint-backed Raw-Count Evaluation. Final evaluation explicitly reloads the configured checkpoint role (best validation, latest, or both). Its checkpoint record stores the epoch, selection split, metric, value, and a SHA-256 content hash. By default, final evaluation writes one raw-count record for each image-class pair. In addition to true positives (TP), false positives (FP), false negatives (FN), and true negatives (TN), the record contains intersection, reference-mask, predicted-mask, and union counts; dataset, split, fold, run, model, checkpoint, image, and class identifiers; and the prediction semantics. Binary records retain the decision threshold and whether the model output was interpreted as logits or probabilities; multi-class records retain the argmax rule. These counts are sufficient to recompute, for example, DSC, which is defined as , or IoU as . Crucially, the counts can be pooled before evaluating the respective formula. They therefore preserve the informa-
tion required for foreground-pixel pooling as well as image-weighted, class-weighted, or fold-wise summaries.
For each fold of a K-fold evaluation, a compressed PyTorch artifact additionally retains the reference masks and, depending on the configured storage option, raw model outputs (logits), hard predictions, or both. The artifact links image filenames, the checkpoint path, the class mapping, and the declared prediction semantics, including the decision threshold where applicable, to the stored artifact. It therefore preserves the per-fold segmentations needed to compute additional geometry- or contour-based measures later without repeating inference. When logits are retained, hard predictions can also be regenerated under an alternative documented decision threshold; this enables subsequent threshold or calibration analyses.
- Post-hoc Aggregation and Reporting. The post-hoc layer distinguishes analyses of retained artifacts from procedures that require model access. Without reloading checkpoints or repeating inference, raw-count artifacts can be validated and consolidated with duplicate-row detection, then re-aggregated to derive per-image-class, per-sample foreground, pooled-class, and pooled-foreground results. The provided analysis recomputes count-based metrics, including Dice, IoU, precision, and recall, estimates image-level bootstrap intervals, and generates PNG/SVG figures and LATEX table entries. When the optional fold-wise output artifacts are retained, additional output-based measures and visualizations can likewise be computed post hoc. Checkpoint-backed utilities are required only for anal-yses that need a model forward pass. They support Grad-CAM-style maps as diagnostic output, model-only complexity and inference profiling, including latency and peak GPU-memory measurements after warm-up, and evaluation of K-fold checkpoints on a declared external test dataset.
4. Case Study
This case study illustrates the analytical value of retaining evaluation artifacts after model training has finished, using a fixed collection of checkpoints and sample-level pixel counts to ask whether benchmark conclusions depend on aggregation, input resolution, computational constraints, or transfer to an external dataset (OOD generalization).
4.1. Datasets, Model Cohort, and Artifact Scope
We use three heterogeneous 2D MIS datasets: ISIC'18 dermoscopic lesion [10, 44], BKAI-IGH NeoPolyp Small endoscopic polyp [29], and CAMUS echocardiographic segmentation [22]. After duplicate assessment and removal, the datasets contain 3,565, 945, and 1,996 images, respectively. ISIC'18 is binary; NeoPolyp comprises background, neoplastic polyp, and non-neoplastic polyp; and CAMUS comprises background, left-ventricular cavity, myocardium, and left atrium. CAMUS uses patient-level folds, whereas ISIC'18 and NeoPolyp use image-level folds. Building on the selection rationale of prior work [2], the benchmarked model cohort comprises U-Net [37], HiFormer-B* [14], MISSFormer [15], Swin-UMamba (SU-Mamba) [25], CENet* [5], SegFormer-B3 (SegFormer) [50], SegNeXt-L (SegNeXt) [13], VWFormer with MiT-B3 backbone (VW-MiT), VWFormer with ConvNeXt-S backbone (VW-Conv), InternImage-T (InternImage) [46] with UPerHead [49], and TransNeXt-Tiny (TransNeXt) [41] with UPerHead.
For this case study, we reused the 256 × 256 final-evaluation artifacts generated as part of prior work [2] and reproduced the same experimental protocol at 512×512, including hyperparameter selection followed by five-fold CV. This protocol was applied to all methods except CENet*, which exceeded the available GPU memory at the increased input resolution. Consequently, matched five-fold checkpoints and final-evaluation artifacts are available at both resolutions for ten architectures, while CENet* was excluded from analyses requiring matched-resolution results. Details of the architectures and setup are provided in the Appendix.
4.2. Analysis Protocol
All post-hoc analyses described below reuse the saved raw counts and model checkpoints and do not involve retraining any method. The following provides a brief summary of the conducted analyses, while detailed descriptions and additional results are provided in the supplementary material.
Aggregation Sensitivity. We recomputed foreground Dice under three defensible aggregation rules: global mi-
cro, which pools foreground counts before calculating Dice; image macro, which first pools foreground classes per image and then averages image-level Dice; and class macro, which averages Dice after pooling counts within each foreground class. Images without foreground in both prediction and reference have an undefined Dice denominator and are therefore excluded from image-macro Dice. Architectures were ranked separately for every dataset, resolution, and aggregation rule. We report rank correlation, changed ranks, and whether the leading architecture changes between rules.
Input-Resolution Sensitivity. We compared 256 × 256 and 512 × 512 predictions matched by dataset, architecture, CV fold, and test image. The primary estimand was the paired global-micro change , with 95% percentile CIs estimated from 1,000 paired, fold-stratified bootstrap replicates (excluding CENet*).
Inference Efficiency. We measured device-resident, model-only forward-pass efficiency for batch size one on an NVIDIA A100 MIG 40 GB partition. Timing used the first NeoPolyp CV checkpoint per architecture and resolution, 100 warm-up passes, 1,000 timed passes, and five repetitions. The timed region excludes preprocessing, transfer, decoding, postprocessing, and I/O. We report parameter count, GMACs, median latency, derived throughput, and maximum allocated CUDA memory.
External Same-task Cross-Dataset Evaluation. For same-task external transfer, we evaluated all five NeoPolyp CV checkpoints for each available architecture–resolution combination on the 1,000-image, test-only Kvasir-SEG dataset [19], without retraining, fine-tuning, target-domain threshold selection, or target-informed model selection. Both source foreground classes were merged into a binary polyp label before fold-wise scoring and ensembling. We then formed a pixel-wise strict-majority ensemble, assigning foreground when at least three of five folds predicted polyp, and recomputed foreground Dice, IoU, precision, and recall from retained per-image pixel counts for individual folds and ensembles. The accompanying 256 × 256 qualitative example shows the ensemble prediction and a fold-aggregated Grad-CAM diagnostic; details of the ontology mapping, attribution aggregation, and representative-image selection are provided in the Appendix.
4.3. Case Study Results
Reaggregation can change rankings. Table 2 compares the three aggregation rules pairwise. Despite high rank correlations (–1.00), reaggregation changes up to seven architecture ranks per dataset–resolution cell and can change the leading method. Global-micro (G) and image-macro (I) Dice yield different winners for NeoPolyp at 256 × 256 and ISIC'18 at both resolutions, while G and class-macro (C) preserve the winner but reorder up to seven ranks. Full rank matrices are provided in the Appendix.

Figure 2. Representative 256×256 Kvasir-SEG example with ensemble masks and fold-aggregated Grad-CAM maps for each architecture.
Table 2. Ranking sensitivity to pairwise reaggregation. : Spearman correlation; : changed ranks; W: changed winner.
| Dataset | Size | G vs. I | G vs. C | I vs. C | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| W | W | W | ||||||||
| NeoPolyp | 256 | .95 | 7/11 | Yes | .95 | 7/11 | No | .95 | 7/11 | Yes |
| NeoPolyp | 512 | .99 | 2/10 | No | .94 | 7/10 | No | .95 | 5/10 | No |
| CAMUS | 256 | .99 | 2/11 | No | 1.00 | 0/11 | No | .99 | 2/11 | No |
| CAMUS | 512 | 1.00 | 0/10 | No | 1.00 | 0/10 | No | 1.00 | 0/10 | No |
| ISIC'18 | 256 | .93 | 5/11 | Yes | 1.00 | 0/11 | No | .93 | 5/11 | Yes |
| ISIC'18 | 512 | .93 | 6/10 | Yes | 1.00 | 0/10 | No | .93 | 6/10 | Yes |
Higher resolution is not universally beneficial. Fig. 3 shows paired global-micro Dice changes from 256 × 256 to 512 × 512. Effects vary by dataset and architecture: NeoPolyp ranges from a +3.46 pp gain for SU-Mamba (95% CI +2.40 to +4.64) to a −2.08 pp loss for U-Net (95% CI −3.38 to −0.89); CAMUS shows mostly small gains (+0.11 to +0.33 pp), while ISIC'18 includes losses for InternImage (−0.30 pp) and U-Net (−1.26) pp.
Efficiency profiles differ substantially. Table 3 exposes trade-offs that are invisible from parameter counts alone. At 256 × 256, the models span 9.36–59.89 GMACs and 4.09–74.92 ms per image; at 512 × 512, the available models span 37.43–238.43 GMACs and 13.17–57.46 ms. The table therefore supports selecting an architecture under an explicit deployment constraint, rather than treating DSC as the sole criterion. More detailed analysis, including a complexity-vs.-DSC-plot, are provided in the Appendix.
External transfer is model-/ resolution-dependent. Fig. 2 shows same-task transfer from NeoPolyp to Kvasir-SEG. Across 11 models at 256 × 256, strict-majority ensemble DSC ranged from 0.689 (MISSFormer) to 0.862 (TransNeXt); across the 10 models with larger input size, from 0.687 (MISSFormer) to 0.861 (VW-Conv). Fold-level markers indicate checkpoint variation. Resolution effects were architecture-dependent, improving SegFormer and VW-MiT but reducing U-Net, TransNeXt, and SU-Mamba. The 256 × 256 case in Fig. 2, selected by the median architecture-level score, shows consistent recovery of the main polyp region but visible boundary differences.

Figure 4. Pooled foreground DSC for each evaluated CV fold (small, semi-transparent) and the strict-majority ensemble (larger).
5. Discussion
From score reporting to inspectable evaluation claims. The case study shows that segmentation scores depend on both the estimator and experimental conditions. Reaggregation changed the leading architecture in several dataset-resolution cells, while 512 × 512 input yielded neither consistent gains nor uniform computational costs. Thus, aggregation and resolution choices define the evaluation question rather than a universally optimal setting. MSB makes these choices explicit and preserves the quantities needed to revisit them after training. Inference records further show that parameter count alone does not characterize efficiency: latency and memory depend on the configuration, with CENet* exceeding available GPU memory at 512 × 512. Together, these capabilities shift benchmarking from isolated scores toward reproducible, inspectable claims under a declared protocol.
Threats to validity. The current toolbox is scoped to supervised 2D semantic segmentation and is not a general platform for 3D, instance, detection, prompt-based, or deployment workflows. New architectures and datasets still require adapters or conversion to the index.csv schema. Configuration hashes and study checkpoints improve traceability, but do not replace complete dataset-version or con-

Figure 3. Paired change in global-micro foreground Dice when increasing the input resolution from 256 × 256 to 512 × 512.
Table 3. Model-only inference efficiency at batch size one. GMACs denote model-operation counts per forward pass; latency is the median across repeated runs (± between-repeat SD); peak memory is the maximum allocated CUDA memory observed across repetitions.
| Architecture | Param (M) | 256×256 | 512×512 | ||||||
|---|---|---|---|---|---|---|---|---|---|
| GMACs | Latency (ms) | TP (img/s) | PM (GiB) | GMACs | Latency (ms) | TP (img/s) | PM (GiB) | ||
| U-Net | 31.03 | 48.18 | 4.09 ± 0.00 | 244.4 | 0.62 | 192.70 | 13.17 ± 0.00 | 75.9 | 0.96 |
| MISSFormer | 42.46 | 9.36 | 32.75 ± 0.13 | 30.5 | 0.70 | 37.43 | 57.46 ± 0.04 | 17.4 | 1.66 |
| HiFormer-B* | 45.361 | 25.52 | 27.12 ± 0.18 | 36.9 | 0.72 | 100.03 | 56.55 ± 0.17 | 17.7 | 0.83 |
| SegFormer | 47.22 | 17.80 | 37.46 ± 0.18 | 26.7 | 0.86 | 71.21 | 39.27 ± 0.23 | 25.5 | 1.22 |
| SegNeXt | 48.78 | 16.05 | 32.56 ± 0.30 | 30.7 | 0.79 | 64.19 | 32.58 ± 0.10 | 30.7 | 0.85 |
| VW-MiT | 51.42 | 15.55 | 38.79 ± 0.19 | 25.8 | 0.84 | 62.81 | 41.50 ± 0.16 | 24.1 | 0.95 |
| CENet | 53.25 | 19.13 | 74.92 ± 0.40 | 13.3 | 1.41 | - | - | - | - |
| VW-Conv | 57.01 | 19.21 | 17.52 ± 0.17 | 57.1 | 0.93 | 77.44 | 24.93 ± 0.00 | 40.1 | 1.04 |
| TransNeXt | 57.74 | 59.60 | 50.85 ± 0.14 | 19.7 | 1.02 | 238.43 | 56.88 ± 0.24 | 17.6 | 1.31 |
| InternImage | 58.37 | 58.57 | 36.17 ± 0.15 | 27.6 | 1.03 | 234.25 | 41.64 ± 0.23 | 24.0 | 1.28 |
| SU-Mamba | 59.89 | 39.74 | 21.45 ± 0.09 | 46.6 | 1.04 | 158.97 | 42.54 ± 0.01 | 23.5 | 1.34 |
¹ HiFormer-B*: parameter counts differ by input resolution; the reported value is their mean (256×256: 44.62 M; 512×512: 46.09 M).
tainerized environment manifests. Likewise, duplicate diagnostics support review but neither prevent leakage automatically nor substitute patient-, study-, or site-level metadata. Post-hoc analyses, including profiling, currently require study-specific maintenance when models, datasets, or resolutions change; the underlying structure is modular, but not yet fully plug-and-play. Fold-wise segmentations can be retained, yet automated boundary-, instance-, calibration-, and probability-based analyses are not yet provided. The integrated HPO functionality automate executions, not the choice of search space or evaluation protocol. Finally, deterministic execution remains best effort across hardware and software environments.
Future work. Future work should extend the scope to 3D and instance-level segmentation and build analysis modules that use the already retained masks and optional logits for surface- and object-based metrics and calibrated probabilistic analyses. Further priorities are declarative semantic mappings for external evaluation, more complete dataset and execution-environment provenance, and reducing the
study-specific maintenance currently required for post-hoc analyses. Finally, MSB itself should be evaluated as infrastructure: independent users should add a dataset and architecture from the documentation alone, with onboarding effort and reproduction deviations measured explicitly.
6. Conclusion
We introduced MEDSEGBENCHMARKER, a configuration-driven PyTorch framework for controlled 2D MIS benchmarks. It links duplicate-aware data preparation, layered experiment specifications, resumable execution, checkpoint-backed evaluation, and raw-count-first post-hoc analysis. The case study shows that architecture rankings can depend on the aggregation rule and that increasing input resolution yields dataset- and architecture-specific accuracy–efficiency trade-offs. Rather than treating a benchmark result as a standalone score, MSB preserves the elementary evidence and declared conditions needed to inspect, recompute, and qualify the resulting claim.
References
[1] Takuya Akiba, Shotaro Sano, Toshihiko Yanase, Takeru Ohta, and Masanori Koyama. Optuna: A next-generation hyperparameter optimization framework. In Knowledge Discovery & Data Mining, 2019. 3
[2] Anonymous. GP-VMxSMA: Benchmarking general-purpose vision models and specialized architectures for 2D medical image segmentation, 2026. Accepted at British Machine Vision Conference 2026, Submission ID 482. Supplied as supplemental material BMVC2026-Submission-482.pdf. 6
[3] Michela Antonelli, Annika Reinke, Spyridon Bakas, et al. The medical segmentation decathlon. Nature Communications, 13:4128, 2022. 2, 3
[4] Monya Baker. 1,500 scientists lift the lid on reproducibility. Nature, 533(7604):452–454, 2016. 1
[5] Afshin Bozorgpour, Sina Ghorbani Kolahi, Reza Azad, Ilker Hacihaliloglu, and Dorit Merhof. CENet: Context enhancement network for medical image segmentation. In Med. Image Comput. Comput. Assist. Interv., 2025. 6
[6] Hu Cao, Yueyue Wang, Joy Chen, Dongsheng Jiang, Xiaopeng Zhang, et al. Swin-unet: Unet-like pure transformer for medical image segmentation. In ECCV, 2023. 1
[7] M. Jorge Cardoso, Wenqi Li, Richard Brown, et al. MONAI: An open-source framework for deep learning in healthcare, 2022. 2, 3
[8] Jieneng Chen, Jieru Mei, Xianhang Li, Yongyi Lu, Qihang Yu, et al. Transunet: Rethinking the u-net architecture design for medical image segmentation through the lens of transformers. Medical Image Anal., 97:103280, 2024. 1
[9] Evangelia Christodoulou, Annika Reinke, Rola Houhou, et al. Confidence intervals uncovered: Are we ready for real-world medical imaging AI? In Med. Image Comput. Comput. Assist. Interv., 2024. 1
[10] Noel C. F. Codella, David Gutman, M. Emre Celebi, Brian Helba, Michael A. Marchetti, 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 2018 IEEE 15th International Symposium on Biomedical Imaging (ISBI 2018), 2018. 6
[11] Joseph Paul Cohen, Joseph D. Viviano, Paul Bertin, Paul Morrison, Parsa Torabian, et al. Torchxrayvision: A library of chest x-ray datasets and models. In Medical Imaging with Deep Learning, 2022. 3
[12] MMSegmentation Contributors. MMSegmentation: Openmmlab semantic segmentation toolbox and benchmark. https://github.com/open-mmlab/mmsegmentation, 2020. 3
[13] Meng-Hao Guo, Cheng-Ze Lu, Qibin Hou, Zheng-Ning Liu, Ming-Ming Cheng, et al. SegNeXt: Rethinking convolutional attention design for semantic segmentation. In NeurIPS, 2022. 6
[14] Moein Heidari, Amirhossein Kazerouni, Milad Soltany, Reza Azad, Ehsan Khodapanah Aghdam, et al. HiFormer: Hierarchical multi-scale representations using transformers
for medical image segmentation. In IEEE Winter Conf. Appl. Comput. Vis., 2023. 6
[15] Xiaohong Huang, Zhifang Deng, Dandan Li, Xueguang Yuan, and Ying Fu. MISSFormer: An effective transformer for 2D medical image segmentation. IEEE Trans. Med. Imaging, 42(5):1484–1494, 2023. 6
[16] Ben Hutchinson, Negar Rostamzadeh, Christina Greer, Katherine Heller, and Vinodkumar Prabhakaran. Evaluation Gaps in Machine Learning Practice. In ACM Conference on Fairness Accountability and Transparency, 2022. 2
[17] Pavel Lakubovskii. Segmentation models pytorch. https://github.com/qubvel/segmentation_models.pytorch, 2019. 3
[18] Fabian Isensee, Paul F. Jaeger, Simon A. A. Kohl, Jens Petersen, and Klaus H. Maier-Hein. nnU-Net: A self-configuring method for deep learning-based biomedical image segmentation. Nature Methods, 18:203–211, 2021. 2, 3
[19] Debesh Jha, Pia H Smedsrud, Michael A Riegler, Päl Halvorsen, et al. Kvasir-SEG: A segmented polyp dataset. In MMM, 2019. 6
[20] Sayash Kapoor and Arvind Narayanan. Leakage and the reproducibility crisis in machine-learning-based science. Patterns, 4(9):100804, 2023. 1
[21] Zeki Kus and Musa Aydin. MedSegBench: A comprehensive benchmark for medical image segmentation in diverse data modalities. Scientific Data, 11, 2024. 2, 3
[22] Sarah Leclerc, Erik Smistad, João Pedrosa, et al. Deep learning for segmentation using an open large-scale dataset in 2D echocardiography. IEEE Trans. Med. Imaging, 38:2198–2210, 2019. 6
[23] Thomas Liao, Rohan Taori, Inioluwa Deborah Raji, and Ludwig Schmidt. Are we learning yet? A meta review of evaluation failures across machine learning. In NeurIPS, 2021. 2
[24] Richard Liaw, Eric Liang, Robert Nishihara, Philipp Moritz, Joseph E Gonzalez, et al. Tune: A research platform for distributed model selection and training, 2018. 3
[25] Jiarun Liu, Hao Yang, Hong-Yu Zhou, et al. Swin-UMamba: Mamba-based UNet with ImageNet-based pretraining. In Med. Image Comput. Comput. Assist. Interv., 2024. 6
[26] Yi Liu, Lutao Chu, Guowei Chen, Zewu Wu, Zeyu Chen, et al. Paddleseg: A high-efficient development toolkit for image segmentation, 2021. 3
[27] Jun Ma, Yuting He, Feifei Li, Lin Han, Chenyu You, et al. Segment anything in medical images. Nature Communications, 15(1):654, 2024. 1
[28] Lena Maier-Hein, Matthias Eisenmann, Annika Reinke, Sinan Onogur, Marko Stankovic, et al. Why rankings of biomedical image analysis competitions should be interpreted with care. Nature Communications, 9:5217, 2018. 1
[29] Phan Ngoc Lan, Nguyen Sy An, Dao Viet Hang, Dao Van Long, Tran Quang Trung, et al. Neounet : Towards accurate colon polyp segmentation and neoplasm detection. In Advances in Visual Computing, 2021. 6
[30] Sarthak Pati, Ujjwal Baid, Brandon Edwards, Micah J Sheller, Patrick Foley, et al. The federated tumor segmentation (fets) tool: an open-source solution to further solid tumor research. Physics in Medicine & Biology, 2022. 3
[31] Fernando Pérez-García, Rachel Sparks, and Sébastien Ourselin. TorchIO: A python library for efficient loading, preprocessing, augmentation and patch-based sampling of medical images in deep learning. Computer Methods and Programs in Biomedicine, 208:106236, 2021. 2, 3
[32] Joelle Pineau, Philippe Vincent-Lamarre, Koustuv Sinha, Vincent Larivière, Alina Beygelzimer, et al. Improving reproducibility in machine learning research: A report from the NeurIPS 2019 reproducibility program. Journal of Machine Learning Research, 22(1):1–20, 2021. 1
[33] Md Mostafijur Rahman and Radu Marculescu. Medical image segmentation via cascaded attention decoding. In IEEE Winter Conf. Appl. Comput. Vis., 2023. 1
[34] Md Mostafijur Rahman, Mustafa Munir, and Radu Marculescu. Emcad: Efficient multi-scale convolutional attention decoding for medical image segmentation. In CVPR, 2024. 1
[35] Annika Reinke, Minu D. Tizabi, Carole H. Sudre, Matthias Eisenmann, et al. Metrics reloaded: Recommendations for image analysis validation. Nature Methods, 21:48–53, 2024. 1
[36] Félix Renard, Soulaimane Guedria, Noel De Palma, and Nicolas Vuillerme. Variability and reproducibility in deep learning for medical image segmentation. Scientific Reports, 10, 2020. 1
[37] Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-Net: Convolutional networks for biomedical image segmentation. In Med. Image Comput. Comput. Assist. Interv., 2015. 6
[38] Jiacheng Ruan, Jincheng Li, and Suncheng Xiang. Vm-unet: Vision mamba unet for medical image segmentation. ACM Trans. Multimedia Comput. Commun. Appl., 2025. 1
[39] Ramprasaath R. Selvaraju, Michael Cogswell, Abhishek Das, Ramakrishna Vedantam, Devi Parikh, et al. Grad-cam: Visual explanations from deep networks via gradient-based localization. In ICCV, 2017. 2
[40] Harald Semmelrock, Tony Ross-Hellauer, Simone Kopeinik, Dieter Theiler, Armin Haberl, et al. Reproducibility in machine-learning-based research: Overview, barriers, and drivers. AI Magazine, 46(2):e70002, 2025. 2
[41] Dai Shi. TransNeXt: Robust foveal visual perception for vision transformers. In CVPR, 2024. 6
[42] Aaron Stupple, David Singerman, and Leo Anthony Celi. The reproducibility crisis in the age of digital medicine. npj Digit. Medicine, 2, 2019. 1
[43] Yucheng Tang, Dong Yang, Wenqi Li, Holger R. Roth, Bennett Landman, et al. Self-supervised pre-training of swin transformers for 3d medical image analysis. In CVPR, 2022. 1
[44] Philipp Tschandl, Cliff Rosendahl, and Harald Kittler. The HAM10000 dataset, a large collection of multi-source dermatoscopic images of common pigmented skin lesions. Scientific Data, 5, 2018. 6
[45] Gaël Varoquaux and Veronika Cheplygina. Machine learning for medical imaging: Methodological failures and recommendations for the future. npj Digital Medicine, 5, 2022. 1
[46] Wenhai Wang, Jifeng Dai, Zhe Chen, et al. InternImage: Exploring large-scale vision foundation models with deformable convolutions. In CVPR, 2023. 6
[47] Jakob Wasserthal, Hanns-Christian Breit, Manfred T. Meyer, Maurice Pradella, Daniel Hinck, et al. Totalsegmentator: Robust segmentation of 104 anatomic structures in ct images. Radiology: Artificial Intelligence, 5(5), 2023. 3
[48] Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumond, Clement Delangue, et al. Transformers: State-of-the-art natural language processing. In Conference on Empirical Methods in Natural Language Processing, 2020. 3
[49] Tete Xiao, Yingcheng Liu, Bolei Zhou, Yuning Jiang, and Jian Sun. Unified perceptual parsing for scene understanding. In ECCV, 2018. 6
[50] Enze Xie, Wenhai Wang, Zhiding Yu, Anima Anandkumar, Jose M. Alvarez, et al. SegFormer: Simple and efficient design for semantic segmentation with transformers. In NeurIPS, 2021. 6
[51] Maximilian Zenk, Ujjwal Baid, Sarthak Pati, Akis Linardos, Brandon Edwards, et al. Towards fair decentralized benchmarking of healthcare AI algorithms with the Federated Tumor Segmentation (FeTS) challenge. Nature Communications, 16(1):6274, 2025. 3
[52] Zongwei Zhou, Vatsal Sodha, Jiaxuan Pang, Michael B. Gotway, and Jianming Liang. Models genesis. Medical Image Analysis, 67:101840, 2021. 1