MRSegmentator-KonfAI
KonfAI-accelerated adaptation of MRSegmentator — multi-organ MRI segmentation (40 structures), built with KonfAI.
🧩 Model
| Model | Modality | Labels | Ensemble |
|---|---|---|---|
MRSegmentator |
MRI | 40 | 5 |
3D residual UNet · patch [96, 128, 160] · resampled to 1.5 mm.
🚀 Usage
pip install mrsegmentator-konfai
mrsegmentator-konfai segment -i input_mr.nii.gz -o output/
- Generic runner:
konfai-apps infer VBoussot/MRSegmentator-KonfAI:MRSegmentator -i input_mr.nii.gz -o output/ - Interactive: SlicerKonfAI — the ⚙ Advanced dialog overrides patch size and batch size.
⚡ Performance & VRAM
Same input, the five folds ensembled on both sides (-f 5), same PyTorch build (2.12.1, cu13.0), single NVIDIA RTX PRO 5000 (24 GB), MRSegmentator 2.0.0. Peak RAM = process-tree resident set; peak VRAM = over baseline. Measured with KonfAI's benchmarks/perf/bench_apps.py (2026-09-09).
| Case (voxels) | Tool | Time | Peak RAM | Peak VRAM |
|---|---|---|---|---|
| S (248 × 246 × 141) | KonfAI | 15 s | 5.2 GB | 18.2 GB |
| Original | 19 s | 7.2 GB | 3.0 GB | |
| M (249 × 246 × 246) | KonfAI | 21 s | 5.3 GB | 16.3 GB |
| Original | 24 s | 8.5 GB | 3.8 GB | |
| L (512 × 512 × 531) | KonfAI | 86 s | 6.9 GB | 20.6 GB |
| Original | 143 s | 37.4 GB | 14.9 GB |
1.2–1.7× faster, 1.4–5.4× less host RAM, the gap widening with the volume. The GPU-resident accumulator trades more VRAM for the speed and low host RAM, while streaming keeps it bounded: on the large case host RAM stays at 6.9 GB where the original grows to 37.4 GB. The default -f 2 ensembles two folds and runs faster than the table. The batch size is auto-selected from your free VRAM; override with --patch-size / --batch-size.
🔗 Links
- 🧠 Original MRSegmentator: github.com/hhaentze/MRSegmentator
- 🧠 KonfAI: github.com/vboussot/KonfAI
- 📦 PyPI: mrsegmentator-konfai