MedNeXt-B + DistMap (auxiliary SDT loss) — BraTS 2023 GLI (5-fold CV)
3D segmentation of brain tumor regions (NCR, edema, enhancing tumor) on multi-modal MRI (T1, T1ce, T2, FLAIR), trained on the BraTS 2023 GLI challenge dataset using nnU-Net v2 with the MedNeXt-B backbone (Roy et al., MICCAI 2023).
This repository ships the 5 cross-validation folds of the model. Use the same fold-of-the-patient at inference, or ensemble all 5 folds for higher robustness (BraTS-style soft voting).
Per-fold validation Dice (best EMA, foreground-mean)
| Fold | Best EMA Dice | Trained epochs |
|---|---|---|
| fold 0 | 0.9341 | 291 |
| fold 1 | 0.9367 | 298 |
| fold 2 | 0.9400 | 247 |
| fold 3 | 0.9351 | 291 |
| fold 4 | 0.9336 | 262 |
Mean across folds : 0.9359.
Files
fold_{0..4}/model.safetensors— network weights (weights-only, no optimizer state)fold_{0..4}/metadata.json— trainer name, best EMA Dice, allowed mirroring axes, configurationfold_{0..4}/plans.json— nnU-Net architecture plan (patch size 128³, BS 2, MedNeXt-B)
Usage
import torch
from safetensors.torch import load_file
from huggingface_hub import hf_hub_download
# Pick a fold (0–4), or load all 5 for ensembling
fold = 0
weights_path = hf_hub_download(repo_id="guillaume-cassez/mednext-distmap-brats2023gli", filename=f"fold_{fold}/model.safetensors")
plans_path = hf_hub_download(repo_id="guillaume-cassez/mednext-distmap-brats2023gli", filename=f"fold_{fold}/plans.json")
state_dict = load_file(weights_path)
# Build the MedNeXt model with nnU-Net v2 (see https://github.com/MIC-DKFZ/nnUNet)
# and load the state_dict :
# model.load_state_dict(state_dict)
For the full inference pipeline (preprocessing, sliding-window prediction, TTA) you need :
- nnU-Net v2 : https://github.com/MIC-DKFZ/nnUNet
- MedNeXt trainers : https://github.com/MIC-DKFZ/MedNeXt
- The patient should be preprocessed with the same
nnUNetPlans_96GB_mednextplan (plans.json).
Training details
- Backbone : MedNeXt-B (Roy et al., MICCAI 2023)
- Framework : nnU-Net v2 with custom trainer
- Input : 4-modality MRI (T1, T1ce, T2, FLAIR), patch 128³, BS 2, BF16
- Loss : Dice + cross-entropy + λ × MSE on Signed Distance Transform (auxiliary head)
- Hardware : RTX PRO 6000 Blackwell (96 GB)
- Schedule : 300 epochs per fold, ~13 h 30 wall-clock
- Cross-validation : 5-fold stratified by patient ID over 1196 patients
Auxiliary head
On top of the standard segmentation output, this model has an auxiliary head that regresses a Signed Distance Transform (SDT) for each tumor class (NCR, ED, ET). Architecture : Conv3D(32 → 3, kernel 1×1×1) + tanh. Loss : Dice + CE + λ × MSE(SDT), λ = 1. Reference : Ma 2020 (MIDL), Xue 2020 (AAAI).
Important characterised side-effect : the SDT auxiliary head produces spurious isolated connected components ("fragments"), particularly on NCR (×1.5 vs Baseline). This artefact is invisible to Dice but visible via topological CC counts and HD95. The companion paper proposes a parameter-free post-hoc CC-consensus filter that eliminates 66 % of NCR fragments at no Dice cost and improves NCR HD95 from 4.86 to 4.48 mm (p = 5.7 × 10⁻¹⁴).
Companion artefacts
- 📄 Companion paper (v10, 2026-09-22) : Two Models That Agree Beat the Best of Them Alone: Parameter-Free Connected-Component Consensus That Beats the Baseline under the Official BraTS-2023 Metrics — Guillaume Cassez, Stanislas Larnier · CC-BY-4.0 · complete official BraTS-2023 metric set, 5-fold cross-validation, n = 1196 patients. Concept DOI (always resolves to the latest version) : 10.5281/zenodo.19695263 · current version v10 : 10.5281/zenodo.22904810
- 🌐 Paper page + PDF : https://guillaume-cassez.fr/imagerie-medicale/brats/2023-distance-map/
- 🏥 Medical imaging hub : https://guillaume-cassez.fr/imagerie-medicale/
- 🧠 Interactive 3D viewer : https://guillaume-cassez.fr/imagerie-medicale/brats/2023-distance-map/viewer/ — 1196 patients, four experts and the consensus operators side by side with ground truth (WebGL, nothing to install)
- 📊 Per-patient metrics : https://guillaume-cassez.fr/imagerie-medicale/brats/2023-distance-map/ranking/ — Dice and HD95 for each of the validation cases, sortable and filterable
- 💻 Code repository : https://github.com/guillaume-cassez/brats-moe-distmap-fusion-1
- 🤝 Sister models (same programme, same folds, same evaluation code path) :
- guillaume-cassez/mednext-baseline-brats2023gli
- guillaume-cassez/mednext-kervadec-brats2023gli — Paper 2 boundary-loss expert (λ = 0.05)
- guillaume-cassez/mednext-moe-v3-brats2023gli — Paper 3 patch-wise MoE V3 (winning arm)
Related publications (same research programme, BraTS 2023 GLI)
Both are open-access Zenodo preprints evaluated under the same official lesion-wise metrics:
- Precision Pays: A Fixed-Weight Boundary Loss Anchors the Precision End of a Recall–Precision Axis and Wins as the Consensus Veto under the Official BraTS-2023 Metrics (v2.6, 2026-09-22) — 10.5281/zenodo.22906446 · paper page
- The Gate Does Not Choose: An Expert-Initialised Mixture-of-Experts Outperforms Training-Free Consensus under the Official BraTS-2023 Metrics (v0.13, 2026-09-22) — 10.5281/zenodo.22776410 — 29 arms scored by one code path on five disjoint folds · paper page
License
MIT (weights and code). Raw BraTS 2023 GLI imaging data is not redistributed (challenge license).
Citation
@misc{cassez2026ccconsensus,
title = {Two Models That Agree Beat the Best of Them Alone: Parameter-Free
Connected-Component Consensus That Beats the Baseline under the
Official BraTS-2023 Metrics},
author = {Cassez, Guillaume and Larnier, Stanislas},
year = {2026},
version = {v10},
publisher = {Zenodo},
doi = {10.5281/zenodo.19695263},
url = {https://guillaume-cassez.fr/imagerie-medicale/brats/2023-distance-map/}
}
Acknowledgments
The author thanks Stanislas Larnier for methodological guidance, feedback on the framing of research questions, and careful reviews of successive drafts of the companion paper.
Model card reviewed 2026-09-24: companion citation realigned on the published v10 deposit, sister-model link repaired, viewer/ranking URLs pointed at their canonical paths. Per-fold weights and the Dice table above are untouched.