Batch QA on unlabeled prospective scans is awkward when every score still wants a ground-truth mask. Vincenzo Marcianò, Xiaoming Zhang, Gianluca Guglielmo, Sébastien Ourselin, Michela Antonelli and Maria A. Zuluaga (EURECOM, Sorbonne Université, King’s College London, TU Graz) posted arXiv:2610.17354 on 12 October 2026 with MID (Mask-Image Distributional Divergence), a Fréchet-style scalar that compares a labeled reference set of image-mask pairs to a candidate set of image-plus-predicted-mask pairs with no per-case pairing. Official code is github.com/erc-caravel/pytorch-mid under Apache 2.0 (pip install pytorch-mid).
What goes in and what comes out
The reference set is clean image and ground-truth mask pairs from a frozen labeled pool. The candidate set is the same kind of images paired with predicted masks (or any other masks you want to score as a batch). You do not need one GT per candidate case, and the two sets need not be aligned sample by sample.
The main output is one non-negative scalar, MID. Lower is closer to the reference joint distribution. An optional decomposition splits that score into image, mask, and residual correspondence (corr) terms so you can see whether the gap is mostly appearance, mask geometry, or image-mask misalignment.
How it works
MID embeds each image once with a pretrained medical vision encoder (MedSigLIP in the paper) and embeds each foreground class as its own binary mask through the same encoder, then concatenates image and mask features into a joint vector per class. For 3-D volumes the authors average patch-token embeddings across axial slices, following the MedSigLIP protocol.
Those joint vectors are projected with PCA fitted on the reference set to k=128 (more than 94% of reference variance retained). MID then fits Gaussians to the reference and candidate embeddings and reports their squared 2-Wasserstein distance W2^2, the same closed form used by FID. Covariance uses Ledoit-Wolf shrinkage. No per-sample pairing enters the score.
What the numbers say
Across controlled signed-distance corruptions on 56 organ groups from 13 public CT, MRI and MRA datasets, MID tracks classical paired metrics without needing those pairs at score time: Spearman ρ about −0.55 versus mean Dice and about +0.72 versus HD95. On real vessel models, MID ranks nnU-Net ahead of A2V ahead of SPOCKMIP in the same order as Dice (MID about 0.0035 / 0.0091 / 0.026 with Dice about 0.83 / 0.74 / 0.65).
Feature extraction is the slow step at about 11 s per volume on one GPU. Once latents exist, fitting PCA and computing MID for the full 11,223-vector reference set finishes in under a minute on CPU.
What the pictures show
The featured image is built from Fig. 1 of the paper. Top row: Task10 Colon ground truth versus a severe blob-shaped false-positive corruption. Bottom row: Task09 Spleen ground truth versus severe smooth dilation. Overlay colours mark preserved versus altered mask regions. In each panel MID rises with corruption severity while overlap metrics fall, which is the visual case for a batch score that does not need a GT on every candidate case.
Where it falls short
MID rests on a Gaussian approximation of the joint embeddings, so absolute values are not a universal currency across anatomies; the paper recommends anatomy-specific reference ranges (liver versus adrenal are not interchangeable). The score inherits the encoder: MedSigLIP worked best in their ablation, but a weak backbone will weaken MID. It is not a drop-in replacement for paired Dice or HD95 when you already have per-case GT and need voxel-level precision. Small candidate sets bias the estimate upward (sample-size sensitivity in Appendix H), so keep batch size fixed when you compare models or time windows.
Code, weights, and data
Install with pip install pytorch-mid. The repo is github.com/erc-caravel/pytorch-mid, Apache 2.0 (README License section; checked 15 October 2026). You can score from pre-extracted joint latents with compute_mid_from_latents and PCAProjection(k=128), or use the CLI pytorch-mid latents --ref ... --cand ... --k 128. Decomposition lives under pytorch_mid.decomposition (MID_img, MID_mask, MID_cross / corr). Features in the paper are MedSigLIP embeddings; the README also sketches a MAISI-style latent path for the same Fréchet form.
Evaluation spans 13 public datasets across CT, MRI and MRA (including TotalSegmentator v2, AMOS, ACDC and related organ tasks), with 56 organ groups in the corruption sweep. No separate weight dump is required beyond the chosen vision encoder.
How we would wire it into a viewer
We would treat MID as a batch QA / drift monitor, not as a pixel paint tool. Freeze a labeled reference cohort per anatomy (or per protocol), pre-extract MedSigLIP joint features once, and store the PCA fit. On unlabeled prospective cases, run the same segmentation model or human edits, extract candidate features, and compute MID against that frozen reference. Never overwrite original DICOM pixels; keep MID (and optional img/mask/corr terms) as study- or series-level metadata or a dashboard tile.
Alert when MID rises above an anatomy-specific baseline or when the corr term spikes after a model or scanner change. Keep candidate batch size fixed across nightly runs so sample-size bias does not look like drift. When GT exists for a subset, still report Dice/HD95 on that subset and use MID for the unlabeled remainder. For related posts on this site, see TDBM vessel maps from XCA and CIRSeg liver MRI masks under scanner shift.
Sources
- Marcianò, V., Zhang, X., Guglielmo, G., Ourselin, S., Antonelli, M., Zuluaga, M.A. MID: Mask-Image Distributional Divergence for Evaluating Medical Image Segmentation. arXiv:2610.17354, 2026. https://arxiv.org/abs/2610.17354. PDF: https://arxiv.org/pdf/2610.17354.
- Code: https://github.com/erc-caravel/pytorch-mid (Apache 2.0,
pip install pytorch-mid, checked 15 October 2026). - Encoder used in the paper: MedSigLIP (Sellergren et al., 2025); PCA to 128 dims; Fréchet /
W2^2between Gaussians (Dowson and Landau, 1982; FID Heusel et al., 2017). - Vessel ranking cited in the paper: nnU-Net, A2V, SPOCKMIP on the same anatomy/modality.
- Featured image: Fig. 1 of arXiv:2610.17354 (Colon GT vs severe blob-FP; Spleen GT vs severe smooth dilation), as published.