VBoussot commited on
Commit
4e72f71
·
verified ·
1 Parent(s): 982b8c4

Update model card, app.json (patch size + VRAM plan) and inference configs

Browse files
Files changed (2) hide show
  1. README.md +54 -0
  2. body/app.json +101 -35
README.md ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ library_name: konfai
4
+ pipeline_tag: image-segmentation
5
+ tags:
6
+ - medical-imaging
7
+ - segmentation
8
+ - multimodal
9
+ - ct
10
+ - mri
11
+ - cbct
12
+ - konfai
13
+ ---
14
+
15
+ # ImpactSeg — Multimodal Body Segmentation
16
+
17
+ Multimodal (**CBCT / MR / CT**) anatomical **body segmentation** (11 structures), built with
18
+ [**KonfAI**](https://github.com/vboussot/KonfAI). One model handles all three modalities.
19
+
20
+ ## 🧩 Model
21
+
22
+ | Model | Input | Output | Labels | Ensemble |
23
+ |:--|:--|:--|:--:|:--:|
24
+ | `body` | Volume (CT / MR / CBCT) | Segmentation | 11 | 1 |
25
+
26
+ 2.5D residual-encoder UNet · patch `[1, 192, 192]` · resampled to 3 mm.
27
+
28
+ ## 🚀 Usage
29
+
30
+ ```bash
31
+ pip install impact_seg_konfai
32
+ impact-seg-konfai segment body -i input.nii.gz -o output/
33
+ ```
34
+
35
+ - **Generic runner:** `konfai-apps infer VBoussot/ImpactSeg:body -i input.nii.gz -o output/`
36
+ - **Interactive:** [**SlicerKonfAI**](https://github.com/vboussot/SlicerKonfAI) — the ⚙ *Advanced* dialog overrides patch size and batch size.
37
+
38
+ ## ⚡ Performance & VRAM
39
+
40
+ Benchmarked on an **NVIDIA RTX PRO 5000 (24 GB)**. The batch size is **auto-selected from your free GPU VRAM**.
41
+
42
+ | Free VRAM | Batch (auto) | Peak VRAM |
43
+ |:--|:--|:--|
44
+ | 8 GB | 160 | ~7 GB |
45
+ | 16 GB | 320 | ~14 GB |
46
+ | 24 GB | 512 | ~22 GB |
47
+
48
+ ≈ **16 s / case** on the benchmark volume (scales with case size). Override with `--patch-size` / `--batch-size`.
49
+
50
+ ## 🔗 Links
51
+
52
+ - 🧠 **KonfAI:** [github.com/vboussot/KonfAI](https://github.com/vboussot/KonfAI)
53
+ - 📦 **PyPI:** [impact_seg_konfai](https://pypi.org/project/impact_seg_konfai/)
54
+ - 📄 **Paper:** [arXiv:2510.21358](https://arxiv.org/abs/2510.21358)
body/app.json CHANGED
@@ -4,48 +4,114 @@
4
  "description": "<b>Description:</b><br><b>IMPACTSeg</b> is a multimodal anatomical segmentation model packaged for inference with <b>KonfAI</b>. It is designed for <b>CBCT, MR, and CT</b> scans and produces a consistent set of <b>11 labels</b> across modalities.<br><br><b>Training cohort:</b><br><b>232 CBCT + 282 MR + 955 CT</b> cases.<br><br><b>Use case:</b><br>Automated multimodal segmentation for downstream analysis, quantitative workflows, and clinical research pipelines.",
5
  "tta": 0,
6
  "mc_dropout": 0,
7
- "models": ["Body.pt"],
 
 
8
  "inputs": {
9
- "Volume": {
10
- "display_name": "Input Volume",
11
- "volume_type": "VOLUME",
12
- "required": true
13
- }
14
  },
15
  "outputs": {
16
- "Segmentation": {
17
- "display_name": "Segmentation",
18
- "volume_type": "SEGMENTATION",
19
- "required": true
20
- }
21
  },
22
  "inputs_evaluations": {
23
- "Image": {
24
- "Evaluation.yml": {
25
- "Segmentation": {
26
- "display_name": "Output Segmentation",
27
- "volume_type": "VOLUME",
28
- "required": true
29
- },
30
- "GT_Segmentation": {
31
- "display_name": "GT Segmentation",
32
- "volume_type": "VOLUME",
33
- "required": true
34
- }
 
35
  }
36
- }
37
  },
38
  "terminology": {
39
- "1": { "name": "subcutaneous_tissue", "color": "#F4A261" },
40
- "2": { "name": "muscle", "color": "#E76F51" },
41
- "3": { "name": "abdominal_cavity", "color": "#2A9D8F" },
42
- "4": { "name": "thoracic_cavity", "color": "#264653" },
43
- "5": { "name": "bones", "color": "#E9C46A" },
44
- "6": { "name": "gland_structure", "color": "#8AB17D" },
45
- "7": { "name": "pericardium", "color": "#C8553D" },
46
- "8": { "name": "prosthetic_breast_implant", "color": "#B56576" },
47
- "9": { "name": "mediastinum", "color": "#577590" },
48
- "10": { "name": "spinal_cord", "color": "#6D597A" },
49
- "11": { "name": "brain", "color": "#43AA8B" }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
  }
51
  }
 
4
  "description": "<b>Description:</b><br><b>IMPACTSeg</b> is a multimodal anatomical segmentation model packaged for inference with <b>KonfAI</b>. It is designed for <b>CBCT, MR, and CT</b> scans and produces a consistent set of <b>11 labels</b> across modalities.<br><br><b>Training cohort:</b><br><b>232 CBCT + 282 MR + 955 CT</b> cases.<br><br><b>Use case:</b><br>Automated multimodal segmentation for downstream analysis, quantitative workflows, and clinical research pipelines.",
5
  "tta": 0,
6
  "mc_dropout": 0,
7
+ "models": [
8
+ "Body.pt"
9
+ ],
10
  "inputs": {
11
+ "Volume": {
12
+ "display_name": "Input Volume",
13
+ "volume_type": "VOLUME",
14
+ "required": true
15
+ }
16
  },
17
  "outputs": {
18
+ "Segmentation": {
19
+ "display_name": "Segmentation",
20
+ "volume_type": "SEGMENTATION",
21
+ "required": true
22
+ }
23
  },
24
  "inputs_evaluations": {
25
+ "Image": {
26
+ "Evaluation.yml": {
27
+ "Segmentation": {
28
+ "display_name": "Output Segmentation",
29
+ "volume_type": "VOLUME",
30
+ "required": true
31
+ },
32
+ "GT_Segmentation": {
33
+ "display_name": "GT Segmentation",
34
+ "volume_type": "VOLUME",
35
+ "required": true
36
+ }
37
+ }
38
  }
 
39
  },
40
  "terminology": {
41
+ "1": {
42
+ "name": "subcutaneous_tissue",
43
+ "color": "#F4A261"
44
+ },
45
+ "2": {
46
+ "name": "muscle",
47
+ "color": "#E76F51"
48
+ },
49
+ "3": {
50
+ "name": "abdominal_cavity",
51
+ "color": "#2A9D8F"
52
+ },
53
+ "4": {
54
+ "name": "thoracic_cavity",
55
+ "color": "#264653"
56
+ },
57
+ "5": {
58
+ "name": "bones",
59
+ "color": "#E9C46A"
60
+ },
61
+ "6": {
62
+ "name": "gland_structure",
63
+ "color": "#8AB17D"
64
+ },
65
+ "7": {
66
+ "name": "pericardium",
67
+ "color": "#C8553D"
68
+ },
69
+ "8": {
70
+ "name": "prosthetic_breast_implant",
71
+ "color": "#B56576"
72
+ },
73
+ "9": {
74
+ "name": "mediastinum",
75
+ "color": "#577590"
76
+ },
77
+ "10": {
78
+ "name": "spinal_cord",
79
+ "color": "#6D597A"
80
+ },
81
+ "11": {
82
+ "name": "brain",
83
+ "color": "#43AA8B"
84
+ }
85
+ },
86
+ "patch_size": [
87
+ 1,
88
+ 192,
89
+ 192
90
+ ],
91
+ "vram_plan": {
92
+ "8": {
93
+ "patch_size": [
94
+ 1,
95
+ 192,
96
+ 192
97
+ ],
98
+ "batch_size": 160
99
+ },
100
+ "16": {
101
+ "patch_size": [
102
+ 1,
103
+ 192,
104
+ 192
105
+ ],
106
+ "batch_size": 320
107
+ },
108
+ "24": {
109
+ "patch_size": [
110
+ 1,
111
+ 192,
112
+ 192
113
+ ],
114
+ "batch_size": 512
115
+ }
116
  }
117
  }