Add the HCM segmentation model (nnU-Net v2, 2d, fold 1)

#1
by maxmo2009 - opened
Files changed (4) hide show
  1. README.md +51 -0
  2. hcm/dataset.json +19 -0
  3. hcm/fold_1/checkpoint_final.pth +3 -0
  4. hcm/plans.json +294 -0
README.md CHANGED
@@ -1,3 +1,54 @@
1
  ---
2
  license: mit
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: mit
3
+ library_name: nnunet
4
+ pipeline_tag: image-segmentation
5
+ tags:
6
+ - medical-imaging
7
+ - cardiac-mri
8
+ - segmentation
9
+ - nnunet
10
+ - hypertrophic-cardiomyopathy
11
  ---
12
+
13
+ # OpenHeart segmentation model (HCM)
14
+
15
+ nnU-Net v2 weights that segment short-axis cine cardiac MRI into
16
+ **1 = LV blood pool, 2 = LV myocardium, 3 = RV blood pool**. This is the model used by
17
+ the `Segment` step of [OpenHeart](https://github.com/ImperialCollegeLondon/OpenHeart).
18
+
19
+ | | |
20
+ |---|---|
21
+ | Framework | nnU-Net v2, `nnUNetTrainer`, `2d` configuration |
22
+ | Folds | fold 1 of a five-fold split (`hcm/fold_1/checkpoint_final.pth`): trained on 1,039 volumes, validated on 260 |
23
+ | Input | one short-axis cine volume (NIfTI), one channel |
24
+ | Training data | 1,299 labelled short-axis cine volumes (end-diastole and end-systole) from patients with hypertrophic cardiomyopathy at 5 centres |
25
+
26
+ ## Use with OpenHeart
27
+
28
+ ```python
29
+ from huggingface_hub import snapshot_download
30
+ import openheart as oh
31
+
32
+ model = snapshot_download("ImperialCollegeLondon/OpenHeart") + "/hcm"
33
+ case = oh.Segment(model, folds=[1])(oh.Case.load("cases/subject1", layout="legacy"))
34
+ ```
35
+
36
+ ```bash
37
+ MODEL=$(python -c 'from huggingface_hub import snapshot_download as d; print(d("ImperialCollegeLondon/OpenHeart"))')/hcm
38
+ openheart run cases/ -o out/ --model "$MODEL" --folds 1
39
+ ```
40
+
41
+ `hcm/` is a standard nnU-Net results folder, so it also loads directly with
42
+ `nnUNetPredictor.initialize_from_trained_model_folder(model, use_folds=(1,))`.
43
+
44
+ ## Limitations
45
+
46
+ Trained on hypertrophic cardiomyopathy cohorts; accuracy on other populations has not
47
+ been evaluated here. For research use only, not for clinical decisions.
48
+
49
+ ## Credits
50
+
51
+ Computational Cardiac Imaging Group, MRC Laboratory of Medical Sciences and Imperial
52
+ College London. Built with [nnU-Net](https://github.com/MIC-DKFZ/nnUNet); please cite
53
+ Isensee et al., *nnU-Net: a self-configuring method for deep learning-based biomedical
54
+ image segmentation*, Nature Methods 18, 203–211 (2021).
hcm/dataset.json ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "RBHSHare",
3
+ "description": "larger datatset for cardiac MRI segmentation 9 centers",
4
+ "modality": {
5
+ "0": "MRI"
6
+ },
7
+ "channel_names": {
8
+ "0": "MRI"
9
+ },
10
+ "file_ending": ".nii.gz",
11
+ "dataset_id": 3,
12
+ "labels": {
13
+ "background": 0,
14
+ "left_ventricle": 1,
15
+ "myocardium": 2,
16
+ "right_ventricle": 3
17
+ },
18
+ "numTraining": 1299
19
+ }
hcm/fold_1/checkpoint_final.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:89cbd1bcd95f41101d3090f42bfaa1a87d3ca4e1091f5dfc91198ae01acce946
3
+ size 165572734
hcm/plans.json ADDED
@@ -0,0 +1,294 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "dataset_name": "Dataset003_RBHSHare",
3
+ "plans_name": "nnUNetPlans",
4
+ "original_median_spacing_after_transp": [
5
+ 10.0,
6
+ 1.875,
7
+ 1.875
8
+ ],
9
+ "original_median_shape_after_transp": [
10
+ 11,
11
+ 190,
12
+ 148
13
+ ],
14
+ "image_reader_writer": "SimpleITKIO",
15
+ "transpose_forward": [
16
+ 0,
17
+ 1,
18
+ 2
19
+ ],
20
+ "transpose_backward": [
21
+ 0,
22
+ 1,
23
+ 2
24
+ ],
25
+ "configurations": {
26
+ "2d": {
27
+ "data_identifier": "nnUNetPlans_2d",
28
+ "preprocessor_name": "DefaultPreprocessor",
29
+ "batch_size": 50,
30
+ "patch_size": [
31
+ 224,
32
+ 160
33
+ ],
34
+ "median_image_size_in_voxels": [
35
+ 195.0,
36
+ 150.0
37
+ ],
38
+ "spacing": [
39
+ 1.875,
40
+ 1.875
41
+ ],
42
+ "normalization_schemes": [
43
+ "ZScoreNormalization"
44
+ ],
45
+ "use_mask_for_norm": [
46
+ false
47
+ ],
48
+ "UNet_class_name": "PlainConvUNet",
49
+ "UNet_base_num_features": 32,
50
+ "n_conv_per_stage_encoder": [
51
+ 2,
52
+ 2,
53
+ 2,
54
+ 2,
55
+ 2,
56
+ 2
57
+ ],
58
+ "n_conv_per_stage_decoder": [
59
+ 2,
60
+ 2,
61
+ 2,
62
+ 2,
63
+ 2
64
+ ],
65
+ "num_pool_per_axis": [
66
+ 5,
67
+ 5
68
+ ],
69
+ "pool_op_kernel_sizes": [
70
+ [
71
+ 1,
72
+ 1
73
+ ],
74
+ [
75
+ 2,
76
+ 2
77
+ ],
78
+ [
79
+ 2,
80
+ 2
81
+ ],
82
+ [
83
+ 2,
84
+ 2
85
+ ],
86
+ [
87
+ 2,
88
+ 2
89
+ ],
90
+ [
91
+ 2,
92
+ 2
93
+ ]
94
+ ],
95
+ "conv_kernel_sizes": [
96
+ [
97
+ 3,
98
+ 3
99
+ ],
100
+ [
101
+ 3,
102
+ 3
103
+ ],
104
+ [
105
+ 3,
106
+ 3
107
+ ],
108
+ [
109
+ 3,
110
+ 3
111
+ ],
112
+ [
113
+ 3,
114
+ 3
115
+ ],
116
+ [
117
+ 3,
118
+ 3
119
+ ]
120
+ ],
121
+ "unet_max_num_features": 512,
122
+ "resampling_fn_data": "resample_data_or_seg_to_shape",
123
+ "resampling_fn_seg": "resample_data_or_seg_to_shape",
124
+ "resampling_fn_data_kwargs": {
125
+ "is_seg": false,
126
+ "order": 3,
127
+ "order_z": 0,
128
+ "force_separate_z": null
129
+ },
130
+ "resampling_fn_seg_kwargs": {
131
+ "is_seg": true,
132
+ "order": 1,
133
+ "order_z": 0,
134
+ "force_separate_z": null
135
+ },
136
+ "resampling_fn_probabilities": "resample_data_or_seg_to_shape",
137
+ "resampling_fn_probabilities_kwargs": {
138
+ "is_seg": false,
139
+ "order": 1,
140
+ "order_z": 0,
141
+ "force_separate_z": null
142
+ },
143
+ "batch_dice": true
144
+ },
145
+ "3d_fullres": {
146
+ "data_identifier": "nnUNetPlans_3d_fullres",
147
+ "preprocessor_name": "DefaultPreprocessor",
148
+ "batch_size": 9,
149
+ "patch_size": [
150
+ 12,
151
+ 224,
152
+ 160
153
+ ],
154
+ "median_image_size_in_voxels": [
155
+ 11.0,
156
+ 195.0,
157
+ 150.0
158
+ ],
159
+ "spacing": [
160
+ 9.999977111816406,
161
+ 1.875,
162
+ 1.875
163
+ ],
164
+ "normalization_schemes": [
165
+ "ZScoreNormalization"
166
+ ],
167
+ "use_mask_for_norm": [
168
+ false
169
+ ],
170
+ "UNet_class_name": "PlainConvUNet",
171
+ "UNet_base_num_features": 32,
172
+ "n_conv_per_stage_encoder": [
173
+ 2,
174
+ 2,
175
+ 2,
176
+ 2,
177
+ 2,
178
+ 2
179
+ ],
180
+ "n_conv_per_stage_decoder": [
181
+ 2,
182
+ 2,
183
+ 2,
184
+ 2,
185
+ 2
186
+ ],
187
+ "num_pool_per_axis": [
188
+ 1,
189
+ 5,
190
+ 5
191
+ ],
192
+ "pool_op_kernel_sizes": [
193
+ [
194
+ 1,
195
+ 1,
196
+ 1
197
+ ],
198
+ [
199
+ 1,
200
+ 2,
201
+ 2
202
+ ],
203
+ [
204
+ 1,
205
+ 2,
206
+ 2
207
+ ],
208
+ [
209
+ 2,
210
+ 2,
211
+ 2
212
+ ],
213
+ [
214
+ 1,
215
+ 2,
216
+ 2
217
+ ],
218
+ [
219
+ 1,
220
+ 2,
221
+ 2
222
+ ]
223
+ ],
224
+ "conv_kernel_sizes": [
225
+ [
226
+ 1,
227
+ 3,
228
+ 3
229
+ ],
230
+ [
231
+ 1,
232
+ 3,
233
+ 3
234
+ ],
235
+ [
236
+ 3,
237
+ 3,
238
+ 3
239
+ ],
240
+ [
241
+ 3,
242
+ 3,
243
+ 3
244
+ ],
245
+ [
246
+ 3,
247
+ 3,
248
+ 3
249
+ ],
250
+ [
251
+ 3,
252
+ 3,
253
+ 3
254
+ ]
255
+ ],
256
+ "unet_max_num_features": 320,
257
+ "resampling_fn_data": "resample_data_or_seg_to_shape",
258
+ "resampling_fn_seg": "resample_data_or_seg_to_shape",
259
+ "resampling_fn_data_kwargs": {
260
+ "is_seg": false,
261
+ "order": 3,
262
+ "order_z": 0,
263
+ "force_separate_z": null
264
+ },
265
+ "resampling_fn_seg_kwargs": {
266
+ "is_seg": true,
267
+ "order": 1,
268
+ "order_z": 0,
269
+ "force_separate_z": null
270
+ },
271
+ "resampling_fn_probabilities": "resample_data_or_seg_to_shape",
272
+ "resampling_fn_probabilities_kwargs": {
273
+ "is_seg": false,
274
+ "order": 1,
275
+ "order_z": 0,
276
+ "force_separate_z": null
277
+ },
278
+ "batch_dice": false
279
+ }
280
+ },
281
+ "experiment_planner_used": "ExperimentPlanner",
282
+ "label_manager": "LabelManager",
283
+ "foreground_intensity_properties_per_channel": {
284
+ "0": {
285
+ "max": 1475.0,
286
+ "mean": 199.43031131604656,
287
+ "median": 153.0,
288
+ "min": 0.0,
289
+ "percentile_00_5": 26.0,
290
+ "percentile_99_5": 769.0,
291
+ "std": 143.99936789603177
292
+ }
293
+ }
294
+ }