TotalSegmentator-KonfAI
KonfAI-accelerated adaptation of TotalSegmentator β whole-body multi-organ CT / MRI segmentation, built with KonfAI.
π§© Models
| Task | Modality | Labels | Ensemble | Notes |
|---|---|---|---|---|
total |
CT | 117 | 5 | full accuracy |
total-3mm |
CT | 117 | 1 | fast (3 mm) |
total_mr |
MRI | 50 | 2 | |
total_mr-3mm |
MRI | 50 | 1 | fast (3 mm) |
3D residual UNet Β· patch [96, 128, 160] Β· resampled to 1.5 mm.
π Usage
pip install totalsegmentator-konfai
totalsegmentator-konfai segment total -i input_ct.nii.gz -o output/
- Generic runner:
konfai-apps infer VBoussot/TotalSegmentator-KonfAI:total -i input_ct.nii.gz -o output/ - Interactive: SlicerKonfAI β the β Advanced dialog overrides patch size and batch size.
β‘ Performance & VRAM
Same input, same weights (Datasets 291β295, 1.5 mm, 5-model total), same PyTorch build (cu13.0), single NVIDIA RTX PRO 5000 (24 GB). Peak RAM = process-tree resident set; peak VRAM = over baseline.
| Case (voxels) | Tool | Time | Peak RAM | Peak VRAM |
|---|---|---|---|---|
| S β 240 Γ 220 Γ 200 | KonfAI | 12 s | 6.0 GB | 12.0 GB |
| Original | 35 s | 21 GB | 3.7 GB | |
| M β 533 Γ 390 Γ 177 | KonfAI | 17 s | 6.5 GB | 12.9 GB |
| Original | 61 s | 26.5 GB | 5.1 GB | |
| L β 512 Γ 512 Γ 531 | KonfAI | 314 s | 19.3 GB | 10.4 GB |
| Original | 459 s | 51.8 GB | 23.3 GB |
1.5β3.5Γ faster, 2.7β4.1Γ less host RAM. KonfAI trades more VRAM on small/medium cases (larger patches, GPU accumulation) for the speed-up while staying inside 24 GB; on large cases streaming bounds VRAM (10.4 GB) where the original nears the card limit (23.3 GB) β then lighter on both RAM and VRAM. The batch size is auto-selected from your free VRAM; on cards below 24 GB use total-3mm (1 model, 3 mm). Override with --patch-size / --batch-size.
π Links
- π§ Original TotalSegmentator: github.com/wasserth/TotalSegmentator
- π§ KonfAI: github.com/vboussot/KonfAI
- π¦ PyPI: totalsegmentator-konfai