Spaces:
Sleeping
Sleeping
FelixzeroSun
commited on
Commit
·
0f107cb
1
Parent(s):
5e87f26
update and debug
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- 260_gt_nnUNetResEncUNetLPlans.json +521 -0
- 262_gt_nnUNetResEncUNetLPlans.json +356 -0
- 264_gt_nnUNetResEncUNetLPlans.json +521 -0
- app.py +7 -7
- app_2.py +283 -0
- nnunetv2/__pycache__/__init__.cpython-312.pyc +0 -0
- nnunetv2/__pycache__/configuration.cpython-312.pyc +0 -0
- nnunetv2/__pycache__/paths.cpython-312.pyc +0 -0
- nnunetv2/analysis/__pycache__/__init__.cpython-312.pyc +0 -0
- nnunetv2/analysis/__pycache__/image_metrics.cpython-312.pyc +0 -0
- nnunetv2/analysis/__pycache__/result_analysis.cpython-312.pyc +0 -0
- nnunetv2/analysis/__pycache__/revert_normalisation.cpython-312.pyc +0 -0
- nnunetv2/evaluation/__pycache__/__init__.cpython-312.pyc +0 -0
- nnunetv2/evaluation/__pycache__/evaluate_predictions.cpython-312.pyc +0 -0
- nnunetv2/imageio/__pycache__/__init__.cpython-312.pyc +0 -0
- nnunetv2/imageio/__pycache__/base_reader_writer.cpython-312.pyc +0 -0
- nnunetv2/imageio/__pycache__/natural_image_reader_writer.cpython-312.pyc +0 -0
- nnunetv2/imageio/__pycache__/nibabel_reader_writer.cpython-312.pyc +0 -0
- nnunetv2/imageio/__pycache__/reader_writer_registry.cpython-312.pyc +0 -0
- nnunetv2/imageio/__pycache__/simpleitk_reader_writer.cpython-312.pyc +0 -0
- nnunetv2/imageio/__pycache__/tif_reader_writer.cpython-312.pyc +0 -0
- nnunetv2/inference/__pycache__/__init__.cpython-312.pyc +0 -0
- nnunetv2/inference/__pycache__/data_iterators.cpython-312.pyc +0 -0
- nnunetv2/inference/__pycache__/export_prediction.cpython-312.pyc +0 -0
- nnunetv2/inference/__pycache__/predict_from_raw_data.cpython-312.pyc +0 -0
- nnunetv2/inference/__pycache__/sliding_window_prediction.cpython-312.pyc +0 -0
- nnunetv2/preprocessing/__pycache__/__init__.cpython-312.pyc +0 -0
- nnunetv2/preprocessing/cropping/__pycache__/__init__.cpython-312.pyc +0 -0
- nnunetv2/preprocessing/cropping/__pycache__/cropping.cpython-312.pyc +0 -0
- nnunetv2/preprocessing/normalization/__pycache__/__init__.cpython-312.pyc +0 -0
- nnunetv2/preprocessing/normalization/__pycache__/default_normalization_schemes.cpython-312.pyc +0 -0
- nnunetv2/preprocessing/normalization/__pycache__/map_channel_name_to_normalization.cpython-312.pyc +0 -0
- nnunetv2/preprocessing/preprocessors/__pycache__/__init__.cpython-312.pyc +0 -0
- nnunetv2/preprocessing/preprocessors/__pycache__/default_preprocessor.cpython-312.pyc +0 -0
- nnunetv2/preprocessing/resampling/__pycache__/__init__.cpython-312.pyc +0 -0
- nnunetv2/preprocessing/resampling/__pycache__/default_resampling.cpython-312.pyc +0 -0
- nnunetv2/preprocessing/resampling/__pycache__/utils.cpython-312.pyc +0 -0
- nnunetv2/training/__pycache__/__init__.cpython-312.pyc +0 -0
- nnunetv2/training/data_augmentation/__pycache__/__init__.cpython-312.pyc +0 -0
- nnunetv2/training/data_augmentation/__pycache__/compute_initial_patch_size.cpython-312.pyc +0 -0
- nnunetv2/training/data_augmentation/custom_transforms/__pycache__/__init__.cpython-312.pyc +0 -0
- nnunetv2/training/data_augmentation/custom_transforms/__pycache__/cascade_transforms.cpython-312.pyc +0 -0
- nnunetv2/training/data_augmentation/custom_transforms/__pycache__/deep_supervision_donwsampling.cpython-312.pyc +0 -0
- nnunetv2/training/data_augmentation/custom_transforms/__pycache__/limited_length_multithreaded_augmenter.cpython-312.pyc +0 -0
- nnunetv2/training/data_augmentation/custom_transforms/__pycache__/masking.cpython-312.pyc +0 -0
- nnunetv2/training/data_augmentation/custom_transforms/__pycache__/region_based_training.cpython-312.pyc +0 -0
- nnunetv2/training/data_augmentation/custom_transforms/__pycache__/transforms_for_dummy_2d.cpython-312.pyc +0 -0
- nnunetv2/training/dataloading/__pycache__/__init__.cpython-312.pyc +0 -0
- nnunetv2/training/dataloading/__pycache__/base_data_loader.cpython-312.pyc +0 -0
- nnunetv2/training/dataloading/__pycache__/data_loader_2d.cpython-312.pyc +0 -0
260_gt_nnUNetResEncUNetLPlans.json
ADDED
|
@@ -0,0 +1,521 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"dataset_name": "Dataset261_synthrad2025_task1_CT_AB_pre_v2r_stitched_masked",
|
| 3 |
+
"plans_name": "nnUNetResEncUNetLPlans",
|
| 4 |
+
"original_median_spacing_after_transp": [
|
| 5 |
+
3.0,
|
| 6 |
+
1.0,
|
| 7 |
+
1.0
|
| 8 |
+
],
|
| 9 |
+
"original_median_shape_after_transp": [
|
| 10 |
+
99,
|
| 11 |
+
442,
|
| 12 |
+
465
|
| 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": 13,
|
| 30 |
+
"patch_size": [
|
| 31 |
+
448,
|
| 32 |
+
512
|
| 33 |
+
],
|
| 34 |
+
"median_image_size_in_voxels": [
|
| 35 |
+
442.0,
|
| 36 |
+
465.0
|
| 37 |
+
],
|
| 38 |
+
"spacing": [
|
| 39 |
+
1.0,
|
| 40 |
+
1.0
|
| 41 |
+
],
|
| 42 |
+
"normalization_schemes": [
|
| 43 |
+
"CTNormalizationClippingSynthrad2025"
|
| 44 |
+
],
|
| 45 |
+
"use_mask_for_norm": [
|
| 46 |
+
false
|
| 47 |
+
],
|
| 48 |
+
"resampling_fn_data": "resample_data_or_seg_to_shape",
|
| 49 |
+
"resampling_fn_seg": "resample_data_or_seg_to_shape",
|
| 50 |
+
"resampling_fn_data_kwargs": {
|
| 51 |
+
"is_seg": false,
|
| 52 |
+
"order": 3,
|
| 53 |
+
"order_z": 0,
|
| 54 |
+
"force_separate_z": null
|
| 55 |
+
},
|
| 56 |
+
"resampling_fn_seg_kwargs": {
|
| 57 |
+
"is_seg": true,
|
| 58 |
+
"order": 1,
|
| 59 |
+
"order_z": 0,
|
| 60 |
+
"force_separate_z": null
|
| 61 |
+
},
|
| 62 |
+
"resampling_fn_probabilities": "resample_data_or_seg_to_shape",
|
| 63 |
+
"resampling_fn_probabilities_kwargs": {
|
| 64 |
+
"is_seg": false,
|
| 65 |
+
"order": 1,
|
| 66 |
+
"order_z": 0,
|
| 67 |
+
"force_separate_z": null
|
| 68 |
+
},
|
| 69 |
+
"architecture": {
|
| 70 |
+
"network_class_name": "dynamic_network_architectures.architectures.unet.ResidualEncoderUNet",
|
| 71 |
+
"arch_kwargs": {
|
| 72 |
+
"n_stages": 7,
|
| 73 |
+
"features_per_stage": [
|
| 74 |
+
32,
|
| 75 |
+
64,
|
| 76 |
+
128,
|
| 77 |
+
256,
|
| 78 |
+
512,
|
| 79 |
+
512,
|
| 80 |
+
512
|
| 81 |
+
],
|
| 82 |
+
"conv_op": "torch.nn.modules.conv.Conv2d",
|
| 83 |
+
"kernel_sizes": [
|
| 84 |
+
[
|
| 85 |
+
3,
|
| 86 |
+
3
|
| 87 |
+
],
|
| 88 |
+
[
|
| 89 |
+
3,
|
| 90 |
+
3
|
| 91 |
+
],
|
| 92 |
+
[
|
| 93 |
+
3,
|
| 94 |
+
3
|
| 95 |
+
],
|
| 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 |
+
"strides": [
|
| 114 |
+
[
|
| 115 |
+
1,
|
| 116 |
+
1
|
| 117 |
+
],
|
| 118 |
+
[
|
| 119 |
+
2,
|
| 120 |
+
2
|
| 121 |
+
],
|
| 122 |
+
[
|
| 123 |
+
2,
|
| 124 |
+
2
|
| 125 |
+
],
|
| 126 |
+
[
|
| 127 |
+
2,
|
| 128 |
+
2
|
| 129 |
+
],
|
| 130 |
+
[
|
| 131 |
+
2,
|
| 132 |
+
2
|
| 133 |
+
],
|
| 134 |
+
[
|
| 135 |
+
2,
|
| 136 |
+
2
|
| 137 |
+
],
|
| 138 |
+
[
|
| 139 |
+
2,
|
| 140 |
+
2
|
| 141 |
+
]
|
| 142 |
+
],
|
| 143 |
+
"n_blocks_per_stage": [
|
| 144 |
+
1,
|
| 145 |
+
3,
|
| 146 |
+
4,
|
| 147 |
+
6,
|
| 148 |
+
6,
|
| 149 |
+
6,
|
| 150 |
+
6
|
| 151 |
+
],
|
| 152 |
+
"n_conv_per_stage_decoder": [
|
| 153 |
+
1,
|
| 154 |
+
1,
|
| 155 |
+
1,
|
| 156 |
+
1,
|
| 157 |
+
1,
|
| 158 |
+
1
|
| 159 |
+
],
|
| 160 |
+
"conv_bias": true,
|
| 161 |
+
"norm_op": "torch.nn.modules.instancenorm.InstanceNorm2d",
|
| 162 |
+
"norm_op_kwargs": {
|
| 163 |
+
"eps": 1e-05,
|
| 164 |
+
"affine": true
|
| 165 |
+
},
|
| 166 |
+
"dropout_op": null,
|
| 167 |
+
"dropout_op_kwargs": null,
|
| 168 |
+
"nonlin": "torch.nn.LeakyReLU",
|
| 169 |
+
"nonlin_kwargs": {
|
| 170 |
+
"inplace": true
|
| 171 |
+
}
|
| 172 |
+
},
|
| 173 |
+
"_kw_requires_import": [
|
| 174 |
+
"conv_op",
|
| 175 |
+
"norm_op",
|
| 176 |
+
"dropout_op",
|
| 177 |
+
"nonlin"
|
| 178 |
+
]
|
| 179 |
+
},
|
| 180 |
+
"batch_dice": true
|
| 181 |
+
},
|
| 182 |
+
"3d_lowres": {
|
| 183 |
+
"data_identifier": "nnUNetResEncUNetLPlans_3d_lowres",
|
| 184 |
+
"preprocessor_name": "DefaultPreprocessor",
|
| 185 |
+
"batch_size": 2,
|
| 186 |
+
"patch_size": [
|
| 187 |
+
64,
|
| 188 |
+
192,
|
| 189 |
+
192
|
| 190 |
+
],
|
| 191 |
+
"median_image_size_in_voxels": [
|
| 192 |
+
99,
|
| 193 |
+
292,
|
| 194 |
+
307
|
| 195 |
+
],
|
| 196 |
+
"spacing": [
|
| 197 |
+
3.0,
|
| 198 |
+
1.512589724855112,
|
| 199 |
+
1.512589724855112
|
| 200 |
+
],
|
| 201 |
+
"normalization_schemes": [
|
| 202 |
+
"CTNormalizationClippingSynthrad2025"
|
| 203 |
+
],
|
| 204 |
+
"use_mask_for_norm": [
|
| 205 |
+
false
|
| 206 |
+
],
|
| 207 |
+
"resampling_fn_data": "resample_data_or_seg_to_shape",
|
| 208 |
+
"resampling_fn_seg": "resample_data_or_seg_to_shape",
|
| 209 |
+
"resampling_fn_data_kwargs": {
|
| 210 |
+
"is_seg": false,
|
| 211 |
+
"order": 3,
|
| 212 |
+
"order_z": 0,
|
| 213 |
+
"force_separate_z": null
|
| 214 |
+
},
|
| 215 |
+
"resampling_fn_seg_kwargs": {
|
| 216 |
+
"is_seg": true,
|
| 217 |
+
"order": 1,
|
| 218 |
+
"order_z": 0,
|
| 219 |
+
"force_separate_z": null
|
| 220 |
+
},
|
| 221 |
+
"resampling_fn_probabilities": "resample_data_or_seg_to_shape",
|
| 222 |
+
"resampling_fn_probabilities_kwargs": {
|
| 223 |
+
"is_seg": false,
|
| 224 |
+
"order": 1,
|
| 225 |
+
"order_z": 0,
|
| 226 |
+
"force_separate_z": null
|
| 227 |
+
},
|
| 228 |
+
"architecture": {
|
| 229 |
+
"network_class_name": "dynamic_network_architectures.architectures.unet.ResidualEncoderUNet",
|
| 230 |
+
"arch_kwargs": {
|
| 231 |
+
"n_stages": 6,
|
| 232 |
+
"features_per_stage": [
|
| 233 |
+
32,
|
| 234 |
+
64,
|
| 235 |
+
128,
|
| 236 |
+
256,
|
| 237 |
+
320,
|
| 238 |
+
320
|
| 239 |
+
],
|
| 240 |
+
"conv_op": "torch.nn.modules.conv.Conv3d",
|
| 241 |
+
"kernel_sizes": [
|
| 242 |
+
[
|
| 243 |
+
3,
|
| 244 |
+
3,
|
| 245 |
+
3
|
| 246 |
+
],
|
| 247 |
+
[
|
| 248 |
+
3,
|
| 249 |
+
3,
|
| 250 |
+
3
|
| 251 |
+
],
|
| 252 |
+
[
|
| 253 |
+
3,
|
| 254 |
+
3,
|
| 255 |
+
3
|
| 256 |
+
],
|
| 257 |
+
[
|
| 258 |
+
3,
|
| 259 |
+
3,
|
| 260 |
+
3
|
| 261 |
+
],
|
| 262 |
+
[
|
| 263 |
+
3,
|
| 264 |
+
3,
|
| 265 |
+
3
|
| 266 |
+
],
|
| 267 |
+
[
|
| 268 |
+
3,
|
| 269 |
+
3,
|
| 270 |
+
3
|
| 271 |
+
]
|
| 272 |
+
],
|
| 273 |
+
"strides": [
|
| 274 |
+
[
|
| 275 |
+
1,
|
| 276 |
+
1,
|
| 277 |
+
1
|
| 278 |
+
],
|
| 279 |
+
[
|
| 280 |
+
2,
|
| 281 |
+
2,
|
| 282 |
+
2
|
| 283 |
+
],
|
| 284 |
+
[
|
| 285 |
+
2,
|
| 286 |
+
2,
|
| 287 |
+
2
|
| 288 |
+
],
|
| 289 |
+
[
|
| 290 |
+
2,
|
| 291 |
+
2,
|
| 292 |
+
2
|
| 293 |
+
],
|
| 294 |
+
[
|
| 295 |
+
2,
|
| 296 |
+
2,
|
| 297 |
+
2
|
| 298 |
+
],
|
| 299 |
+
[
|
| 300 |
+
1,
|
| 301 |
+
2,
|
| 302 |
+
2
|
| 303 |
+
]
|
| 304 |
+
],
|
| 305 |
+
"n_blocks_per_stage": [
|
| 306 |
+
1,
|
| 307 |
+
3,
|
| 308 |
+
4,
|
| 309 |
+
6,
|
| 310 |
+
6,
|
| 311 |
+
6
|
| 312 |
+
],
|
| 313 |
+
"n_conv_per_stage_decoder": [
|
| 314 |
+
1,
|
| 315 |
+
1,
|
| 316 |
+
1,
|
| 317 |
+
1,
|
| 318 |
+
1
|
| 319 |
+
],
|
| 320 |
+
"conv_bias": true,
|
| 321 |
+
"norm_op": "torch.nn.modules.instancenorm.InstanceNorm3d",
|
| 322 |
+
"norm_op_kwargs": {
|
| 323 |
+
"eps": 1e-05,
|
| 324 |
+
"affine": true
|
| 325 |
+
},
|
| 326 |
+
"dropout_op": null,
|
| 327 |
+
"dropout_op_kwargs": null,
|
| 328 |
+
"nonlin": "torch.nn.LeakyReLU",
|
| 329 |
+
"nonlin_kwargs": {
|
| 330 |
+
"inplace": true
|
| 331 |
+
}
|
| 332 |
+
},
|
| 333 |
+
"_kw_requires_import": [
|
| 334 |
+
"conv_op",
|
| 335 |
+
"norm_op",
|
| 336 |
+
"dropout_op",
|
| 337 |
+
"nonlin"
|
| 338 |
+
]
|
| 339 |
+
},
|
| 340 |
+
"batch_dice": false,
|
| 341 |
+
"next_stage": "3d_cascade_fullres"
|
| 342 |
+
},
|
| 343 |
+
"3d_fullres": {
|
| 344 |
+
"data_identifier": "nnUNetPlans_3d_fullres",
|
| 345 |
+
"preprocessor_name": "DefaultPreprocessor",
|
| 346 |
+
"batch_size": 2,
|
| 347 |
+
"patch_size": [
|
| 348 |
+
40,
|
| 349 |
+
192,
|
| 350 |
+
224
|
| 351 |
+
],
|
| 352 |
+
"median_image_size_in_voxels": [
|
| 353 |
+
99.0,
|
| 354 |
+
442.0,
|
| 355 |
+
465.0
|
| 356 |
+
],
|
| 357 |
+
"spacing": [
|
| 358 |
+
3.0,
|
| 359 |
+
1.0,
|
| 360 |
+
1.0
|
| 361 |
+
],
|
| 362 |
+
"normalization_schemes": [
|
| 363 |
+
"CTNormalizationClippingSynthrad2025"
|
| 364 |
+
],
|
| 365 |
+
"use_mask_for_norm": [
|
| 366 |
+
false
|
| 367 |
+
],
|
| 368 |
+
"resampling_fn_data": "resample_data_or_seg_to_shape",
|
| 369 |
+
"resampling_fn_seg": "resample_data_or_seg_to_shape",
|
| 370 |
+
"resampling_fn_data_kwargs": {
|
| 371 |
+
"is_seg": false,
|
| 372 |
+
"order": 3,
|
| 373 |
+
"order_z": 0,
|
| 374 |
+
"force_separate_z": null
|
| 375 |
+
},
|
| 376 |
+
"resampling_fn_seg_kwargs": {
|
| 377 |
+
"is_seg": true,
|
| 378 |
+
"order": 1,
|
| 379 |
+
"order_z": 0,
|
| 380 |
+
"force_separate_z": null
|
| 381 |
+
},
|
| 382 |
+
"resampling_fn_probabilities": "resample_data_or_seg_to_shape",
|
| 383 |
+
"resampling_fn_probabilities_kwargs": {
|
| 384 |
+
"is_seg": false,
|
| 385 |
+
"order": 1,
|
| 386 |
+
"order_z": 0,
|
| 387 |
+
"force_separate_z": null
|
| 388 |
+
},
|
| 389 |
+
"architecture": {
|
| 390 |
+
"network_class_name": "dynamic_network_architectures.architectures.unet.ResidualEncoderUNet",
|
| 391 |
+
"arch_kwargs": {
|
| 392 |
+
"n_stages": 6,
|
| 393 |
+
"features_per_stage": [
|
| 394 |
+
32,
|
| 395 |
+
64,
|
| 396 |
+
128,
|
| 397 |
+
256,
|
| 398 |
+
320,
|
| 399 |
+
320
|
| 400 |
+
],
|
| 401 |
+
"conv_op": "torch.nn.modules.conv.Conv3d",
|
| 402 |
+
"kernel_sizes": [
|
| 403 |
+
[
|
| 404 |
+
1,
|
| 405 |
+
3,
|
| 406 |
+
3
|
| 407 |
+
],
|
| 408 |
+
[
|
| 409 |
+
3,
|
| 410 |
+
3,
|
| 411 |
+
3
|
| 412 |
+
],
|
| 413 |
+
[
|
| 414 |
+
3,
|
| 415 |
+
3,
|
| 416 |
+
3
|
| 417 |
+
],
|
| 418 |
+
[
|
| 419 |
+
3,
|
| 420 |
+
3,
|
| 421 |
+
3
|
| 422 |
+
],
|
| 423 |
+
[
|
| 424 |
+
3,
|
| 425 |
+
3,
|
| 426 |
+
3
|
| 427 |
+
],
|
| 428 |
+
[
|
| 429 |
+
3,
|
| 430 |
+
3,
|
| 431 |
+
3
|
| 432 |
+
]
|
| 433 |
+
],
|
| 434 |
+
"strides": [
|
| 435 |
+
[
|
| 436 |
+
1,
|
| 437 |
+
1,
|
| 438 |
+
1
|
| 439 |
+
],
|
| 440 |
+
[
|
| 441 |
+
1,
|
| 442 |
+
2,
|
| 443 |
+
2
|
| 444 |
+
],
|
| 445 |
+
[
|
| 446 |
+
2,
|
| 447 |
+
2,
|
| 448 |
+
2
|
| 449 |
+
],
|
| 450 |
+
[
|
| 451 |
+
2,
|
| 452 |
+
2,
|
| 453 |
+
2
|
| 454 |
+
],
|
| 455 |
+
[
|
| 456 |
+
2,
|
| 457 |
+
2,
|
| 458 |
+
2
|
| 459 |
+
],
|
| 460 |
+
[
|
| 461 |
+
1,
|
| 462 |
+
2,
|
| 463 |
+
2
|
| 464 |
+
]
|
| 465 |
+
],
|
| 466 |
+
"n_blocks_per_stage": [
|
| 467 |
+
1,
|
| 468 |
+
3,
|
| 469 |
+
4,
|
| 470 |
+
6,
|
| 471 |
+
6,
|
| 472 |
+
6
|
| 473 |
+
],
|
| 474 |
+
"n_conv_per_stage_decoder": [
|
| 475 |
+
1,
|
| 476 |
+
1,
|
| 477 |
+
1,
|
| 478 |
+
1,
|
| 479 |
+
1
|
| 480 |
+
],
|
| 481 |
+
"conv_bias": true,
|
| 482 |
+
"norm_op": "torch.nn.modules.instancenorm.InstanceNorm3d",
|
| 483 |
+
"norm_op_kwargs": {
|
| 484 |
+
"eps": 1e-05,
|
| 485 |
+
"affine": true
|
| 486 |
+
},
|
| 487 |
+
"dropout_op": null,
|
| 488 |
+
"dropout_op_kwargs": null,
|
| 489 |
+
"nonlin": "torch.nn.LeakyReLU",
|
| 490 |
+
"nonlin_kwargs": {
|
| 491 |
+
"inplace": true
|
| 492 |
+
}
|
| 493 |
+
},
|
| 494 |
+
"_kw_requires_import": [
|
| 495 |
+
"conv_op",
|
| 496 |
+
"norm_op",
|
| 497 |
+
"dropout_op",
|
| 498 |
+
"nonlin"
|
| 499 |
+
]
|
| 500 |
+
},
|
| 501 |
+
"batch_dice": true
|
| 502 |
+
},
|
| 503 |
+
"3d_cascade_fullres": {
|
| 504 |
+
"inherits_from": "3d_fullres",
|
| 505 |
+
"previous_stage": "3d_lowres"
|
| 506 |
+
}
|
| 507 |
+
},
|
| 508 |
+
"experiment_planner_used": "nnUNetPlannerResEncL",
|
| 509 |
+
"label_manager": "LabelManager",
|
| 510 |
+
"foreground_intensity_properties_per_channel": {
|
| 511 |
+
"0": {
|
| 512 |
+
"max": 3958.0,
|
| 513 |
+
"mean": -226.3246612548828,
|
| 514 |
+
"median": -81.0,
|
| 515 |
+
"min": -1502.0,
|
| 516 |
+
"percentile_00_5": -1024.0,
|
| 517 |
+
"percentile_99_5": 566.0,
|
| 518 |
+
"std": 396.30517578125
|
| 519 |
+
}
|
| 520 |
+
}
|
| 521 |
+
}
|
262_gt_nnUNetResEncUNetLPlans.json
ADDED
|
@@ -0,0 +1,356 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"dataset_name": "Dataset263_synthrad2025_task1_CT_HN_pre_v2r_stitched_masked",
|
| 3 |
+
"plans_name": "nnUNetResEncUNetLPlans",
|
| 4 |
+
"original_median_spacing_after_transp": [
|
| 5 |
+
3.0,
|
| 6 |
+
1.0,
|
| 7 |
+
1.0
|
| 8 |
+
],
|
| 9 |
+
"original_median_shape_after_transp": [
|
| 10 |
+
89,
|
| 11 |
+
296,
|
| 12 |
+
279
|
| 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": 30,
|
| 30 |
+
"patch_size": [
|
| 31 |
+
320,
|
| 32 |
+
320
|
| 33 |
+
],
|
| 34 |
+
"median_image_size_in_voxels": [
|
| 35 |
+
296.0,
|
| 36 |
+
279.0
|
| 37 |
+
],
|
| 38 |
+
"spacing": [
|
| 39 |
+
1.0,
|
| 40 |
+
1.0
|
| 41 |
+
],
|
| 42 |
+
"normalization_schemes": [
|
| 43 |
+
"CTNormalizationClippingSynthrad2025"
|
| 44 |
+
],
|
| 45 |
+
"use_mask_for_norm": [
|
| 46 |
+
false
|
| 47 |
+
],
|
| 48 |
+
"resampling_fn_data": "resample_data_or_seg_to_shape",
|
| 49 |
+
"resampling_fn_seg": "resample_data_or_seg_to_shape",
|
| 50 |
+
"resampling_fn_data_kwargs": {
|
| 51 |
+
"is_seg": false,
|
| 52 |
+
"order": 3,
|
| 53 |
+
"order_z": 0,
|
| 54 |
+
"force_separate_z": null
|
| 55 |
+
},
|
| 56 |
+
"resampling_fn_seg_kwargs": {
|
| 57 |
+
"is_seg": true,
|
| 58 |
+
"order": 1,
|
| 59 |
+
"order_z": 0,
|
| 60 |
+
"force_separate_z": null
|
| 61 |
+
},
|
| 62 |
+
"resampling_fn_probabilities": "resample_data_or_seg_to_shape",
|
| 63 |
+
"resampling_fn_probabilities_kwargs": {
|
| 64 |
+
"is_seg": false,
|
| 65 |
+
"order": 1,
|
| 66 |
+
"order_z": 0,
|
| 67 |
+
"force_separate_z": null
|
| 68 |
+
},
|
| 69 |
+
"architecture": {
|
| 70 |
+
"network_class_name": "dynamic_network_architectures.architectures.unet.ResidualEncoderUNet",
|
| 71 |
+
"arch_kwargs": {
|
| 72 |
+
"n_stages": 7,
|
| 73 |
+
"features_per_stage": [
|
| 74 |
+
32,
|
| 75 |
+
64,
|
| 76 |
+
128,
|
| 77 |
+
256,
|
| 78 |
+
512,
|
| 79 |
+
512,
|
| 80 |
+
512
|
| 81 |
+
],
|
| 82 |
+
"conv_op": "torch.nn.modules.conv.Conv2d",
|
| 83 |
+
"kernel_sizes": [
|
| 84 |
+
[
|
| 85 |
+
3,
|
| 86 |
+
3
|
| 87 |
+
],
|
| 88 |
+
[
|
| 89 |
+
3,
|
| 90 |
+
3
|
| 91 |
+
],
|
| 92 |
+
[
|
| 93 |
+
3,
|
| 94 |
+
3
|
| 95 |
+
],
|
| 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 |
+
"strides": [
|
| 114 |
+
[
|
| 115 |
+
1,
|
| 116 |
+
1
|
| 117 |
+
],
|
| 118 |
+
[
|
| 119 |
+
2,
|
| 120 |
+
2
|
| 121 |
+
],
|
| 122 |
+
[
|
| 123 |
+
2,
|
| 124 |
+
2
|
| 125 |
+
],
|
| 126 |
+
[
|
| 127 |
+
2,
|
| 128 |
+
2
|
| 129 |
+
],
|
| 130 |
+
[
|
| 131 |
+
2,
|
| 132 |
+
2
|
| 133 |
+
],
|
| 134 |
+
[
|
| 135 |
+
2,
|
| 136 |
+
2
|
| 137 |
+
],
|
| 138 |
+
[
|
| 139 |
+
2,
|
| 140 |
+
2
|
| 141 |
+
]
|
| 142 |
+
],
|
| 143 |
+
"n_blocks_per_stage": [
|
| 144 |
+
1,
|
| 145 |
+
3,
|
| 146 |
+
4,
|
| 147 |
+
6,
|
| 148 |
+
6,
|
| 149 |
+
6,
|
| 150 |
+
6
|
| 151 |
+
],
|
| 152 |
+
"n_conv_per_stage_decoder": [
|
| 153 |
+
1,
|
| 154 |
+
1,
|
| 155 |
+
1,
|
| 156 |
+
1,
|
| 157 |
+
1,
|
| 158 |
+
1
|
| 159 |
+
],
|
| 160 |
+
"conv_bias": true,
|
| 161 |
+
"norm_op": "torch.nn.modules.instancenorm.InstanceNorm2d",
|
| 162 |
+
"norm_op_kwargs": {
|
| 163 |
+
"eps": 1e-05,
|
| 164 |
+
"affine": true
|
| 165 |
+
},
|
| 166 |
+
"dropout_op": null,
|
| 167 |
+
"dropout_op_kwargs": null,
|
| 168 |
+
"nonlin": "torch.nn.LeakyReLU",
|
| 169 |
+
"nonlin_kwargs": {
|
| 170 |
+
"inplace": true
|
| 171 |
+
}
|
| 172 |
+
},
|
| 173 |
+
"_kw_requires_import": [
|
| 174 |
+
"conv_op",
|
| 175 |
+
"norm_op",
|
| 176 |
+
"dropout_op",
|
| 177 |
+
"nonlin"
|
| 178 |
+
]
|
| 179 |
+
},
|
| 180 |
+
"batch_dice": true
|
| 181 |
+
},
|
| 182 |
+
"3d_fullres": {
|
| 183 |
+
"data_identifier": "nnUNetPlans_3d_fullres",
|
| 184 |
+
"preprocessor_name": "DefaultPreprocessor",
|
| 185 |
+
"batch_size": 2,
|
| 186 |
+
"patch_size": [
|
| 187 |
+
56,
|
| 188 |
+
192,
|
| 189 |
+
160
|
| 190 |
+
],
|
| 191 |
+
"median_image_size_in_voxels": [
|
| 192 |
+
89.0,
|
| 193 |
+
296.0,
|
| 194 |
+
279.0
|
| 195 |
+
],
|
| 196 |
+
"spacing": [
|
| 197 |
+
3.0,
|
| 198 |
+
1.0,
|
| 199 |
+
1.0
|
| 200 |
+
],
|
| 201 |
+
"normalization_schemes": [
|
| 202 |
+
"CTNormalizationClippingSynthrad2025"
|
| 203 |
+
],
|
| 204 |
+
"use_mask_for_norm": [
|
| 205 |
+
false
|
| 206 |
+
],
|
| 207 |
+
"resampling_fn_data": "resample_data_or_seg_to_shape",
|
| 208 |
+
"resampling_fn_seg": "resample_data_or_seg_to_shape",
|
| 209 |
+
"resampling_fn_data_kwargs": {
|
| 210 |
+
"is_seg": false,
|
| 211 |
+
"order": 3,
|
| 212 |
+
"order_z": 0,
|
| 213 |
+
"force_separate_z": null
|
| 214 |
+
},
|
| 215 |
+
"resampling_fn_seg_kwargs": {
|
| 216 |
+
"is_seg": true,
|
| 217 |
+
"order": 1,
|
| 218 |
+
"order_z": 0,
|
| 219 |
+
"force_separate_z": null
|
| 220 |
+
},
|
| 221 |
+
"resampling_fn_probabilities": "resample_data_or_seg_to_shape",
|
| 222 |
+
"resampling_fn_probabilities_kwargs": {
|
| 223 |
+
"is_seg": false,
|
| 224 |
+
"order": 1,
|
| 225 |
+
"order_z": 0,
|
| 226 |
+
"force_separate_z": null
|
| 227 |
+
},
|
| 228 |
+
"architecture": {
|
| 229 |
+
"network_class_name": "dynamic_network_architectures.architectures.unet.ResidualEncoderUNet",
|
| 230 |
+
"arch_kwargs": {
|
| 231 |
+
"n_stages": 6,
|
| 232 |
+
"features_per_stage": [
|
| 233 |
+
32,
|
| 234 |
+
64,
|
| 235 |
+
128,
|
| 236 |
+
256,
|
| 237 |
+
320,
|
| 238 |
+
320
|
| 239 |
+
],
|
| 240 |
+
"conv_op": "torch.nn.modules.conv.Conv3d",
|
| 241 |
+
"kernel_sizes": [
|
| 242 |
+
[
|
| 243 |
+
1,
|
| 244 |
+
3,
|
| 245 |
+
3
|
| 246 |
+
],
|
| 247 |
+
[
|
| 248 |
+
3,
|
| 249 |
+
3,
|
| 250 |
+
3
|
| 251 |
+
],
|
| 252 |
+
[
|
| 253 |
+
3,
|
| 254 |
+
3,
|
| 255 |
+
3
|
| 256 |
+
],
|
| 257 |
+
[
|
| 258 |
+
3,
|
| 259 |
+
3,
|
| 260 |
+
3
|
| 261 |
+
],
|
| 262 |
+
[
|
| 263 |
+
3,
|
| 264 |
+
3,
|
| 265 |
+
3
|
| 266 |
+
],
|
| 267 |
+
[
|
| 268 |
+
3,
|
| 269 |
+
3,
|
| 270 |
+
3
|
| 271 |
+
]
|
| 272 |
+
],
|
| 273 |
+
"strides": [
|
| 274 |
+
[
|
| 275 |
+
1,
|
| 276 |
+
1,
|
| 277 |
+
1
|
| 278 |
+
],
|
| 279 |
+
[
|
| 280 |
+
1,
|
| 281 |
+
2,
|
| 282 |
+
2
|
| 283 |
+
],
|
| 284 |
+
[
|
| 285 |
+
2,
|
| 286 |
+
2,
|
| 287 |
+
2
|
| 288 |
+
],
|
| 289 |
+
[
|
| 290 |
+
2,
|
| 291 |
+
2,
|
| 292 |
+
2
|
| 293 |
+
],
|
| 294 |
+
[
|
| 295 |
+
2,
|
| 296 |
+
2,
|
| 297 |
+
2
|
| 298 |
+
],
|
| 299 |
+
[
|
| 300 |
+
1,
|
| 301 |
+
2,
|
| 302 |
+
2
|
| 303 |
+
]
|
| 304 |
+
],
|
| 305 |
+
"n_blocks_per_stage": [
|
| 306 |
+
1,
|
| 307 |
+
3,
|
| 308 |
+
4,
|
| 309 |
+
6,
|
| 310 |
+
6,
|
| 311 |
+
6
|
| 312 |
+
],
|
| 313 |
+
"n_conv_per_stage_decoder": [
|
| 314 |
+
1,
|
| 315 |
+
1,
|
| 316 |
+
1,
|
| 317 |
+
1,
|
| 318 |
+
1
|
| 319 |
+
],
|
| 320 |
+
"conv_bias": true,
|
| 321 |
+
"norm_op": "torch.nn.modules.instancenorm.InstanceNorm3d",
|
| 322 |
+
"norm_op_kwargs": {
|
| 323 |
+
"eps": 1e-05,
|
| 324 |
+
"affine": true
|
| 325 |
+
},
|
| 326 |
+
"dropout_op": null,
|
| 327 |
+
"dropout_op_kwargs": null,
|
| 328 |
+
"nonlin": "torch.nn.LeakyReLU",
|
| 329 |
+
"nonlin_kwargs": {
|
| 330 |
+
"inplace": true
|
| 331 |
+
}
|
| 332 |
+
},
|
| 333 |
+
"_kw_requires_import": [
|
| 334 |
+
"conv_op",
|
| 335 |
+
"norm_op",
|
| 336 |
+
"dropout_op",
|
| 337 |
+
"nonlin"
|
| 338 |
+
]
|
| 339 |
+
},
|
| 340 |
+
"batch_dice": false
|
| 341 |
+
}
|
| 342 |
+
},
|
| 343 |
+
"experiment_planner_used": "nnUNetPlannerResEncL",
|
| 344 |
+
"label_manager": "LabelManager",
|
| 345 |
+
"foreground_intensity_properties_per_channel": {
|
| 346 |
+
"0": {
|
| 347 |
+
"max": 3940.0,
|
| 348 |
+
"mean": -137.8296356201172,
|
| 349 |
+
"median": 12.0,
|
| 350 |
+
"min": -1708.0,
|
| 351 |
+
"percentile_00_5": -1018.0,
|
| 352 |
+
"percentile_99_5": 1349.0,
|
| 353 |
+
"std": 482.0824279785156
|
| 354 |
+
}
|
| 355 |
+
}
|
| 356 |
+
}
|
264_gt_nnUNetResEncUNetLPlans.json
ADDED
|
@@ -0,0 +1,521 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"dataset_name": "Dataset265_synthrad2025_task1_CT_TH_pre_v2r_stitched_masked",
|
| 3 |
+
"plans_name": "nnUNetResEncUNetLPlans",
|
| 4 |
+
"original_median_spacing_after_transp": [
|
| 5 |
+
3.0,
|
| 6 |
+
1.0,
|
| 7 |
+
1.0
|
| 8 |
+
],
|
| 9 |
+
"original_median_shape_after_transp": [
|
| 10 |
+
108,
|
| 11 |
+
476,
|
| 12 |
+
536
|
| 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": 13,
|
| 30 |
+
"patch_size": [
|
| 31 |
+
448,
|
| 32 |
+
512
|
| 33 |
+
],
|
| 34 |
+
"median_image_size_in_voxels": [
|
| 35 |
+
476.0,
|
| 36 |
+
536.0
|
| 37 |
+
],
|
| 38 |
+
"spacing": [
|
| 39 |
+
1.0,
|
| 40 |
+
1.0
|
| 41 |
+
],
|
| 42 |
+
"normalization_schemes": [
|
| 43 |
+
"CTNormalizationClippingSynthrad2025"
|
| 44 |
+
],
|
| 45 |
+
"use_mask_for_norm": [
|
| 46 |
+
false
|
| 47 |
+
],
|
| 48 |
+
"resampling_fn_data": "resample_data_or_seg_to_shape",
|
| 49 |
+
"resampling_fn_seg": "resample_data_or_seg_to_shape",
|
| 50 |
+
"resampling_fn_data_kwargs": {
|
| 51 |
+
"is_seg": false,
|
| 52 |
+
"order": 3,
|
| 53 |
+
"order_z": 0,
|
| 54 |
+
"force_separate_z": null
|
| 55 |
+
},
|
| 56 |
+
"resampling_fn_seg_kwargs": {
|
| 57 |
+
"is_seg": true,
|
| 58 |
+
"order": 1,
|
| 59 |
+
"order_z": 0,
|
| 60 |
+
"force_separate_z": null
|
| 61 |
+
},
|
| 62 |
+
"resampling_fn_probabilities": "resample_data_or_seg_to_shape",
|
| 63 |
+
"resampling_fn_probabilities_kwargs": {
|
| 64 |
+
"is_seg": false,
|
| 65 |
+
"order": 1,
|
| 66 |
+
"order_z": 0,
|
| 67 |
+
"force_separate_z": null
|
| 68 |
+
},
|
| 69 |
+
"architecture": {
|
| 70 |
+
"network_class_name": "dynamic_network_architectures.architectures.unet.ResidualEncoderUNet",
|
| 71 |
+
"arch_kwargs": {
|
| 72 |
+
"n_stages": 7,
|
| 73 |
+
"features_per_stage": [
|
| 74 |
+
32,
|
| 75 |
+
64,
|
| 76 |
+
128,
|
| 77 |
+
256,
|
| 78 |
+
512,
|
| 79 |
+
512,
|
| 80 |
+
512
|
| 81 |
+
],
|
| 82 |
+
"conv_op": "torch.nn.modules.conv.Conv2d",
|
| 83 |
+
"kernel_sizes": [
|
| 84 |
+
[
|
| 85 |
+
3,
|
| 86 |
+
3
|
| 87 |
+
],
|
| 88 |
+
[
|
| 89 |
+
3,
|
| 90 |
+
3
|
| 91 |
+
],
|
| 92 |
+
[
|
| 93 |
+
3,
|
| 94 |
+
3
|
| 95 |
+
],
|
| 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 |
+
"strides": [
|
| 114 |
+
[
|
| 115 |
+
1,
|
| 116 |
+
1
|
| 117 |
+
],
|
| 118 |
+
[
|
| 119 |
+
2,
|
| 120 |
+
2
|
| 121 |
+
],
|
| 122 |
+
[
|
| 123 |
+
2,
|
| 124 |
+
2
|
| 125 |
+
],
|
| 126 |
+
[
|
| 127 |
+
2,
|
| 128 |
+
2
|
| 129 |
+
],
|
| 130 |
+
[
|
| 131 |
+
2,
|
| 132 |
+
2
|
| 133 |
+
],
|
| 134 |
+
[
|
| 135 |
+
2,
|
| 136 |
+
2
|
| 137 |
+
],
|
| 138 |
+
[
|
| 139 |
+
2,
|
| 140 |
+
2
|
| 141 |
+
]
|
| 142 |
+
],
|
| 143 |
+
"n_blocks_per_stage": [
|
| 144 |
+
1,
|
| 145 |
+
3,
|
| 146 |
+
4,
|
| 147 |
+
6,
|
| 148 |
+
6,
|
| 149 |
+
6,
|
| 150 |
+
6
|
| 151 |
+
],
|
| 152 |
+
"n_conv_per_stage_decoder": [
|
| 153 |
+
1,
|
| 154 |
+
1,
|
| 155 |
+
1,
|
| 156 |
+
1,
|
| 157 |
+
1,
|
| 158 |
+
1
|
| 159 |
+
],
|
| 160 |
+
"conv_bias": true,
|
| 161 |
+
"norm_op": "torch.nn.modules.instancenorm.InstanceNorm2d",
|
| 162 |
+
"norm_op_kwargs": {
|
| 163 |
+
"eps": 1e-05,
|
| 164 |
+
"affine": true
|
| 165 |
+
},
|
| 166 |
+
"dropout_op": null,
|
| 167 |
+
"dropout_op_kwargs": null,
|
| 168 |
+
"nonlin": "torch.nn.LeakyReLU",
|
| 169 |
+
"nonlin_kwargs": {
|
| 170 |
+
"inplace": true
|
| 171 |
+
}
|
| 172 |
+
},
|
| 173 |
+
"_kw_requires_import": [
|
| 174 |
+
"conv_op",
|
| 175 |
+
"norm_op",
|
| 176 |
+
"dropout_op",
|
| 177 |
+
"nonlin"
|
| 178 |
+
]
|
| 179 |
+
},
|
| 180 |
+
"batch_dice": true
|
| 181 |
+
},
|
| 182 |
+
"3d_lowres": {
|
| 183 |
+
"data_identifier": "nnUNetResEncUNetLPlans_3d_lowres",
|
| 184 |
+
"preprocessor_name": "DefaultPreprocessor",
|
| 185 |
+
"batch_size": 2,
|
| 186 |
+
"patch_size": [
|
| 187 |
+
64,
|
| 188 |
+
192,
|
| 189 |
+
192
|
| 190 |
+
],
|
| 191 |
+
"median_image_size_in_voxels": [
|
| 192 |
+
98,
|
| 193 |
+
288,
|
| 194 |
+
324
|
| 195 |
+
],
|
| 196 |
+
"spacing": [
|
| 197 |
+
3.278181,
|
| 198 |
+
1.652847632271752,
|
| 199 |
+
1.652847632271752
|
| 200 |
+
],
|
| 201 |
+
"normalization_schemes": [
|
| 202 |
+
"CTNormalizationClippingSynthrad2025"
|
| 203 |
+
],
|
| 204 |
+
"use_mask_for_norm": [
|
| 205 |
+
false
|
| 206 |
+
],
|
| 207 |
+
"resampling_fn_data": "resample_data_or_seg_to_shape",
|
| 208 |
+
"resampling_fn_seg": "resample_data_or_seg_to_shape",
|
| 209 |
+
"resampling_fn_data_kwargs": {
|
| 210 |
+
"is_seg": false,
|
| 211 |
+
"order": 3,
|
| 212 |
+
"order_z": 0,
|
| 213 |
+
"force_separate_z": null
|
| 214 |
+
},
|
| 215 |
+
"resampling_fn_seg_kwargs": {
|
| 216 |
+
"is_seg": true,
|
| 217 |
+
"order": 1,
|
| 218 |
+
"order_z": 0,
|
| 219 |
+
"force_separate_z": null
|
| 220 |
+
},
|
| 221 |
+
"resampling_fn_probabilities": "resample_data_or_seg_to_shape",
|
| 222 |
+
"resampling_fn_probabilities_kwargs": {
|
| 223 |
+
"is_seg": false,
|
| 224 |
+
"order": 1,
|
| 225 |
+
"order_z": 0,
|
| 226 |
+
"force_separate_z": null
|
| 227 |
+
},
|
| 228 |
+
"architecture": {
|
| 229 |
+
"network_class_name": "dynamic_network_architectures.architectures.unet.ResidualEncoderUNet",
|
| 230 |
+
"arch_kwargs": {
|
| 231 |
+
"n_stages": 6,
|
| 232 |
+
"features_per_stage": [
|
| 233 |
+
32,
|
| 234 |
+
64,
|
| 235 |
+
128,
|
| 236 |
+
256,
|
| 237 |
+
320,
|
| 238 |
+
320
|
| 239 |
+
],
|
| 240 |
+
"conv_op": "torch.nn.modules.conv.Conv3d",
|
| 241 |
+
"kernel_sizes": [
|
| 242 |
+
[
|
| 243 |
+
3,
|
| 244 |
+
3,
|
| 245 |
+
3
|
| 246 |
+
],
|
| 247 |
+
[
|
| 248 |
+
3,
|
| 249 |
+
3,
|
| 250 |
+
3
|
| 251 |
+
],
|
| 252 |
+
[
|
| 253 |
+
3,
|
| 254 |
+
3,
|
| 255 |
+
3
|
| 256 |
+
],
|
| 257 |
+
[
|
| 258 |
+
3,
|
| 259 |
+
3,
|
| 260 |
+
3
|
| 261 |
+
],
|
| 262 |
+
[
|
| 263 |
+
3,
|
| 264 |
+
3,
|
| 265 |
+
3
|
| 266 |
+
],
|
| 267 |
+
[
|
| 268 |
+
3,
|
| 269 |
+
3,
|
| 270 |
+
3
|
| 271 |
+
]
|
| 272 |
+
],
|
| 273 |
+
"strides": [
|
| 274 |
+
[
|
| 275 |
+
1,
|
| 276 |
+
1,
|
| 277 |
+
1
|
| 278 |
+
],
|
| 279 |
+
[
|
| 280 |
+
2,
|
| 281 |
+
2,
|
| 282 |
+
2
|
| 283 |
+
],
|
| 284 |
+
[
|
| 285 |
+
2,
|
| 286 |
+
2,
|
| 287 |
+
2
|
| 288 |
+
],
|
| 289 |
+
[
|
| 290 |
+
2,
|
| 291 |
+
2,
|
| 292 |
+
2
|
| 293 |
+
],
|
| 294 |
+
[
|
| 295 |
+
2,
|
| 296 |
+
2,
|
| 297 |
+
2
|
| 298 |
+
],
|
| 299 |
+
[
|
| 300 |
+
1,
|
| 301 |
+
2,
|
| 302 |
+
2
|
| 303 |
+
]
|
| 304 |
+
],
|
| 305 |
+
"n_blocks_per_stage": [
|
| 306 |
+
1,
|
| 307 |
+
3,
|
| 308 |
+
4,
|
| 309 |
+
6,
|
| 310 |
+
6,
|
| 311 |
+
6
|
| 312 |
+
],
|
| 313 |
+
"n_conv_per_stage_decoder": [
|
| 314 |
+
1,
|
| 315 |
+
1,
|
| 316 |
+
1,
|
| 317 |
+
1,
|
| 318 |
+
1
|
| 319 |
+
],
|
| 320 |
+
"conv_bias": true,
|
| 321 |
+
"norm_op": "torch.nn.modules.instancenorm.InstanceNorm3d",
|
| 322 |
+
"norm_op_kwargs": {
|
| 323 |
+
"eps": 1e-05,
|
| 324 |
+
"affine": true
|
| 325 |
+
},
|
| 326 |
+
"dropout_op": null,
|
| 327 |
+
"dropout_op_kwargs": null,
|
| 328 |
+
"nonlin": "torch.nn.LeakyReLU",
|
| 329 |
+
"nonlin_kwargs": {
|
| 330 |
+
"inplace": true
|
| 331 |
+
}
|
| 332 |
+
},
|
| 333 |
+
"_kw_requires_import": [
|
| 334 |
+
"conv_op",
|
| 335 |
+
"norm_op",
|
| 336 |
+
"dropout_op",
|
| 337 |
+
"nonlin"
|
| 338 |
+
]
|
| 339 |
+
},
|
| 340 |
+
"batch_dice": false,
|
| 341 |
+
"next_stage": "3d_cascade_fullres"
|
| 342 |
+
},
|
| 343 |
+
"3d_fullres": {
|
| 344 |
+
"data_identifier": "nnUNetPlans_3d_fullres",
|
| 345 |
+
"preprocessor_name": "DefaultPreprocessor",
|
| 346 |
+
"batch_size": 2,
|
| 347 |
+
"patch_size": [
|
| 348 |
+
40,
|
| 349 |
+
192,
|
| 350 |
+
224
|
| 351 |
+
],
|
| 352 |
+
"median_image_size_in_voxels": [
|
| 353 |
+
107.5,
|
| 354 |
+
476.0,
|
| 355 |
+
536.0
|
| 356 |
+
],
|
| 357 |
+
"spacing": [
|
| 358 |
+
3.0,
|
| 359 |
+
1.0,
|
| 360 |
+
1.0
|
| 361 |
+
],
|
| 362 |
+
"normalization_schemes": [
|
| 363 |
+
"CTNormalizationClippingSynthrad2025"
|
| 364 |
+
],
|
| 365 |
+
"use_mask_for_norm": [
|
| 366 |
+
false
|
| 367 |
+
],
|
| 368 |
+
"resampling_fn_data": "resample_data_or_seg_to_shape",
|
| 369 |
+
"resampling_fn_seg": "resample_data_or_seg_to_shape",
|
| 370 |
+
"resampling_fn_data_kwargs": {
|
| 371 |
+
"is_seg": false,
|
| 372 |
+
"order": 3,
|
| 373 |
+
"order_z": 0,
|
| 374 |
+
"force_separate_z": null
|
| 375 |
+
},
|
| 376 |
+
"resampling_fn_seg_kwargs": {
|
| 377 |
+
"is_seg": true,
|
| 378 |
+
"order": 1,
|
| 379 |
+
"order_z": 0,
|
| 380 |
+
"force_separate_z": null
|
| 381 |
+
},
|
| 382 |
+
"resampling_fn_probabilities": "resample_data_or_seg_to_shape",
|
| 383 |
+
"resampling_fn_probabilities_kwargs": {
|
| 384 |
+
"is_seg": false,
|
| 385 |
+
"order": 1,
|
| 386 |
+
"order_z": 0,
|
| 387 |
+
"force_separate_z": null
|
| 388 |
+
},
|
| 389 |
+
"architecture": {
|
| 390 |
+
"network_class_name": "dynamic_network_architectures.architectures.unet.ResidualEncoderUNet",
|
| 391 |
+
"arch_kwargs": {
|
| 392 |
+
"n_stages": 6,
|
| 393 |
+
"features_per_stage": [
|
| 394 |
+
32,
|
| 395 |
+
64,
|
| 396 |
+
128,
|
| 397 |
+
256,
|
| 398 |
+
320,
|
| 399 |
+
320
|
| 400 |
+
],
|
| 401 |
+
"conv_op": "torch.nn.modules.conv.Conv3d",
|
| 402 |
+
"kernel_sizes": [
|
| 403 |
+
[
|
| 404 |
+
1,
|
| 405 |
+
3,
|
| 406 |
+
3
|
| 407 |
+
],
|
| 408 |
+
[
|
| 409 |
+
3,
|
| 410 |
+
3,
|
| 411 |
+
3
|
| 412 |
+
],
|
| 413 |
+
[
|
| 414 |
+
3,
|
| 415 |
+
3,
|
| 416 |
+
3
|
| 417 |
+
],
|
| 418 |
+
[
|
| 419 |
+
3,
|
| 420 |
+
3,
|
| 421 |
+
3
|
| 422 |
+
],
|
| 423 |
+
[
|
| 424 |
+
3,
|
| 425 |
+
3,
|
| 426 |
+
3
|
| 427 |
+
],
|
| 428 |
+
[
|
| 429 |
+
3,
|
| 430 |
+
3,
|
| 431 |
+
3
|
| 432 |
+
]
|
| 433 |
+
],
|
| 434 |
+
"strides": [
|
| 435 |
+
[
|
| 436 |
+
1,
|
| 437 |
+
1,
|
| 438 |
+
1
|
| 439 |
+
],
|
| 440 |
+
[
|
| 441 |
+
1,
|
| 442 |
+
2,
|
| 443 |
+
2
|
| 444 |
+
],
|
| 445 |
+
[
|
| 446 |
+
2,
|
| 447 |
+
2,
|
| 448 |
+
2
|
| 449 |
+
],
|
| 450 |
+
[
|
| 451 |
+
2,
|
| 452 |
+
2,
|
| 453 |
+
2
|
| 454 |
+
],
|
| 455 |
+
[
|
| 456 |
+
2,
|
| 457 |
+
2,
|
| 458 |
+
2
|
| 459 |
+
],
|
| 460 |
+
[
|
| 461 |
+
1,
|
| 462 |
+
2,
|
| 463 |
+
2
|
| 464 |
+
]
|
| 465 |
+
],
|
| 466 |
+
"n_blocks_per_stage": [
|
| 467 |
+
1,
|
| 468 |
+
3,
|
| 469 |
+
4,
|
| 470 |
+
6,
|
| 471 |
+
6,
|
| 472 |
+
6
|
| 473 |
+
],
|
| 474 |
+
"n_conv_per_stage_decoder": [
|
| 475 |
+
1,
|
| 476 |
+
1,
|
| 477 |
+
1,
|
| 478 |
+
1,
|
| 479 |
+
1
|
| 480 |
+
],
|
| 481 |
+
"conv_bias": true,
|
| 482 |
+
"norm_op": "torch.nn.modules.instancenorm.InstanceNorm3d",
|
| 483 |
+
"norm_op_kwargs": {
|
| 484 |
+
"eps": 1e-05,
|
| 485 |
+
"affine": true
|
| 486 |
+
},
|
| 487 |
+
"dropout_op": null,
|
| 488 |
+
"dropout_op_kwargs": null,
|
| 489 |
+
"nonlin": "torch.nn.LeakyReLU",
|
| 490 |
+
"nonlin_kwargs": {
|
| 491 |
+
"inplace": true
|
| 492 |
+
}
|
| 493 |
+
},
|
| 494 |
+
"_kw_requires_import": [
|
| 495 |
+
"conv_op",
|
| 496 |
+
"norm_op",
|
| 497 |
+
"dropout_op",
|
| 498 |
+
"nonlin"
|
| 499 |
+
]
|
| 500 |
+
},
|
| 501 |
+
"batch_dice": true
|
| 502 |
+
},
|
| 503 |
+
"3d_cascade_fullres": {
|
| 504 |
+
"inherits_from": "3d_fullres",
|
| 505 |
+
"previous_stage": "3d_lowres"
|
| 506 |
+
}
|
| 507 |
+
},
|
| 508 |
+
"experiment_planner_used": "nnUNetPlannerResEncL",
|
| 509 |
+
"label_manager": "LabelManager",
|
| 510 |
+
"foreground_intensity_properties_per_channel": {
|
| 511 |
+
"0": {
|
| 512 |
+
"max": 3867.0,
|
| 513 |
+
"mean": -282.4960632324219,
|
| 514 |
+
"median": -94.0,
|
| 515 |
+
"min": -1607.0,
|
| 516 |
+
"percentile_00_5": -1024.0,
|
| 517 |
+
"percentile_99_5": 630.0,
|
| 518 |
+
"std": 427.12237548828125
|
| 519 |
+
}
|
| 520 |
+
}
|
| 521 |
+
}
|
app.py
CHANGED
|
@@ -3,7 +3,7 @@ import os
|
|
| 3 |
from huggingface_hub import snapshot_download
|
| 4 |
|
| 5 |
from PIL import Image, ImageDraw
|
| 6 |
-
HF_REPO = "
|
| 7 |
LOCAL_WEIGHTS_DIR = os.path.abspath("weights/task1")
|
| 8 |
|
| 9 |
token = os.getenv("HF_TOKEN")
|
|
@@ -19,7 +19,7 @@ repo_dir = snapshot_download(
|
|
| 19 |
token=token,
|
| 20 |
)
|
| 21 |
print(repo_dir)
|
| 22 |
-
os.environ["nnUNet_results"] = repo_dir
|
| 23 |
os.environ.setdefault("nnUNet_raw", "./nnunet_raw")
|
| 24 |
os.environ.setdefault("nnUNet_preprocessed", "./nnunet_preprocessed")
|
| 25 |
os.environ["OPENBLAS_NUM_THREADS"] = "1"
|
|
@@ -29,13 +29,13 @@ import numpy as np
|
|
| 29 |
import SimpleITK as sitk
|
| 30 |
import io
|
| 31 |
|
| 32 |
-
from process import
|
| 33 |
|
| 34 |
st.set_page_config(page_title="SynthRad (nnUNetv2) Demo", layout="wide")
|
| 35 |
st.title("SynthRad (MRI/CBCT + Mask → synthetic CT) — Streamlit Demo")
|
| 36 |
|
| 37 |
if "algo" not in st.session_state:
|
| 38 |
-
st.session_state.algo =
|
| 39 |
if "synth_ct" not in st.session_state:
|
| 40 |
st.session_state.synth_ct = None
|
| 41 |
if "orig_meta" not in st.session_state:
|
|
@@ -76,17 +76,17 @@ SAMPLE_MAP = {
|
|
| 76 |
"Abdomen (sample)": {
|
| 77 |
"region": "Abdomen",
|
| 78 |
"mri": os.path.join(repo_dir, "Abdomen", "cbct.mha"),
|
| 79 |
-
"mask": os.path.join(repo_dir,"Abdomen", "
|
| 80 |
},
|
| 81 |
"Head and Neck (sample)": {
|
| 82 |
"region": "Head and Neck",
|
| 83 |
"mri": os.path.join(repo_dir, "Head and Neck", "cbct.mha"),
|
| 84 |
-
"mask": os.path.join(repo_dir, "Head and Neck", "
|
| 85 |
},
|
| 86 |
"Thorax (sample)": {
|
| 87 |
"region": "Thorax",
|
| 88 |
"mri": os.path.join(repo_dir, "Thorax", "cbct.mha"),
|
| 89 |
-
"mask": os.path.join(repo_dir, "Thorax", "
|
| 90 |
},
|
| 91 |
}
|
| 92 |
c1, c2, c3 = st.columns([2, 2, 1])
|
|
|
|
| 3 |
from huggingface_hub import snapshot_download
|
| 4 |
|
| 5 |
from PIL import Image, ImageDraw
|
| 6 |
+
HF_REPO = "Synthard2025KoalAI/synthrad2025_task1"
|
| 7 |
LOCAL_WEIGHTS_DIR = os.path.abspath("weights/task1")
|
| 8 |
|
| 9 |
token = os.getenv("HF_TOKEN")
|
|
|
|
| 19 |
token=token,
|
| 20 |
)
|
| 21 |
print(repo_dir)
|
| 22 |
+
os.environ["nnUNet_results"] = repo_dir
|
| 23 |
os.environ.setdefault("nnUNet_raw", "./nnunet_raw")
|
| 24 |
os.environ.setdefault("nnUNet_preprocessed", "./nnunet_preprocessed")
|
| 25 |
os.environ["OPENBLAS_NUM_THREADS"] = "1"
|
|
|
|
| 29 |
import SimpleITK as sitk
|
| 30 |
import io
|
| 31 |
|
| 32 |
+
from process import SynthradAlgorithm2
|
| 33 |
|
| 34 |
st.set_page_config(page_title="SynthRad (nnUNetv2) Demo", layout="wide")
|
| 35 |
st.title("SynthRad (MRI/CBCT + Mask → synthetic CT) — Streamlit Demo")
|
| 36 |
|
| 37 |
if "algo" not in st.session_state:
|
| 38 |
+
st.session_state.algo = SynthradAlgorithm2()
|
| 39 |
if "synth_ct" not in st.session_state:
|
| 40 |
st.session_state.synth_ct = None
|
| 41 |
if "orig_meta" not in st.session_state:
|
|
|
|
| 76 |
"Abdomen (sample)": {
|
| 77 |
"region": "Abdomen",
|
| 78 |
"mri": os.path.join(repo_dir, "Abdomen", "cbct.mha"),
|
| 79 |
+
"mask": os.path.join(repo_dir,"Abdomen", "mask2.mha"),
|
| 80 |
},
|
| 81 |
"Head and Neck (sample)": {
|
| 82 |
"region": "Head and Neck",
|
| 83 |
"mri": os.path.join(repo_dir, "Head and Neck", "cbct.mha"),
|
| 84 |
+
"mask": os.path.join(repo_dir, "Head and Neck", "mask2.mha"),
|
| 85 |
},
|
| 86 |
"Thorax (sample)": {
|
| 87 |
"region": "Thorax",
|
| 88 |
"mri": os.path.join(repo_dir, "Thorax", "cbct.mha"),
|
| 89 |
+
"mask": os.path.join(repo_dir, "Thorax", "mask2.mha"),
|
| 90 |
},
|
| 91 |
}
|
| 92 |
c1, c2, c3 = st.columns([2, 2, 1])
|
app_2.py
ADDED
|
@@ -0,0 +1,283 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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y as np
|
| 7 |
+
import SimpleITK as sitk
|
| 8 |
+
import streamlit as st
|
| 9 |
+
|
| 10 |
+
from PIL import Image, ImageDraw
|
| 11 |
+
from huggingface_hub import snapshot_download
|
| 12 |
+
|
| 13 |
+
# =========================
|
| 14 |
+
# 配置:两个任务的模型仓库 & 本地路径
|
| 15 |
+
# =========================
|
| 16 |
+
# 你可以将两个任务分别指向不同的 HF repo;如果都在同一个,也可以都填同一个。
|
| 17 |
+
HF_REPOS = {
|
| 18 |
+
"Task 1 (MR → CT)": "aehrc/Synthrad2025",
|
| 19 |
+
"Task 2 (CBCT → CT)": "aehrc/Synthrad2025", # 如有专门CBCT→CT的repo可在此替换
|
| 20 |
+
}
|
| 21 |
+
LOCAL_WEIGHTS_DIRS = {
|
| 22 |
+
"Task 1 (MR → CT)": os.path.abspath("weights/task1"),
|
| 23 |
+
"Task 2 (CBCT → CT)": os.path.abspath("weights/task2"),
|
| 24 |
+
}
|
| 25 |
+
|
| 26 |
+
# 环境设置(Token)
|
| 27 |
+
token = os.getenv("HF_TOKEN")
|
| 28 |
+
if token is None:
|
| 29 |
+
print("[Warn] HF_TOKEN not set. If the model repo is private, set it in Settings → Variables and secrets.")
|
| 30 |
+
|
| 31 |
+
# 先下载两个任务的权重(如需按需下载,可在选择任务后再下载)
|
| 32 |
+
REPO_DIRS = {}
|
| 33 |
+
for task_name, repo in HF_REPOS.items():
|
| 34 |
+
repo_dir = snapshot_download(
|
| 35 |
+
repo_id=repo,
|
| 36 |
+
repo_type="model",
|
| 37 |
+
local_dir=LOCAL_WEIGHTS_DIRS[task_name],
|
| 38 |
+
local_dir_use_symlinks=False,
|
| 39 |
+
token=token,
|
| 40 |
+
)
|
| 41 |
+
REPO_DIRS[task_name] = repo_dir
|
| 42 |
+
|
| 43 |
+
# nnUNet 环境变量(指向“当前任务”的 results,会在用户切换任务时动态更新)
|
| 44 |
+
os.environ.setdefault("nnUNet_raw", "./nnunet_raw")
|
| 45 |
+
os.environ.setdefault("nnUNet_preprocessed", "./nnunet_preprocessed")
|
| 46 |
+
os.environ["OPENBLAS_NUM_THREADS"] = "1"
|
| 47 |
+
|
| 48 |
+
# 从 process.py 导入两个任务的算法类
|
| 49 |
+
# 确保你在 process.py 中定义了 SynthradAlgorithm1(MR→CT)和 SynthradAlgorithm2(CBCT→CT)
|
| 50 |
+
from process import SynthradAlgorithm2
|
| 51 |
+
|
| 52 |
+
from process_1 import SynthradAlgorithm1
|
| 53 |
+
|
| 54 |
+
# =========================
|
| 55 |
+
# Streamlit UI
|
| 56 |
+
# =========================
|
| 57 |
+
st.set_page_config(page_title="SynthRad (nnUNetv2) Demo", layout="wide")
|
| 58 |
+
st.title("SynthRad — 双任务演示(MRI/CBCT + Mask → synthetic CT)")
|
| 59 |
+
|
| 60 |
+
# 任务选择
|
| 61 |
+
TASKS = ["Task 1 (MR → CT)", "Task 2 (CBCT → CT)"]
|
| 62 |
+
task = st.radio("选择任务", TASKS, index=0, horizontal=True)
|
| 63 |
+
|
| 64 |
+
# 根据任务设置标题/提示
|
| 65 |
+
if task == "Task 1 (MR → CT)":
|
| 66 |
+
vol_label = "MRI volume (.nii/.nii.gz/.mha)"
|
| 67 |
+
else:
|
| 68 |
+
vol_label = "CBCT volume (.nii/.nii.gz/.mha)"
|
| 69 |
+
|
| 70 |
+
# 动态切换 nnUNet 的 results(不同任务使用不同 results 目录)
|
| 71 |
+
os.environ["nnUNet_results"] = REPO_DIRS[task]
|
| 72 |
+
|
| 73 |
+
# session_state 初始化
|
| 74 |
+
if "algos" not in st.session_state:
|
| 75 |
+
st.session_state.algos = {}
|
| 76 |
+
if "synth_ct" not in st.session_state:
|
| 77 |
+
st.session_state.synth_ct = None
|
| 78 |
+
if "orig_meta" not in st.session_state:
|
| 79 |
+
st.session_state.orig_meta = None
|
| 80 |
+
if "vol_np" not in st.session_state:
|
| 81 |
+
st.session_state.vol_np = None
|
| 82 |
+
if "input_vol" not in st.session_state:
|
| 83 |
+
st.session_state.input_vol = None
|
| 84 |
+
if "input_mask" not in st.session_state:
|
| 85 |
+
st.session_state.input_mask = None
|
| 86 |
+
|
| 87 |
+
# 懒加载对应任务的算法实例
|
| 88 |
+
def get_algo(task_name: str):
|
| 89 |
+
if task_name not in st.session_state.algos:
|
| 90 |
+
if task_name == "Task 1 (MR → CT)":
|
| 91 |
+
st.session_state.algos[task_name] = SynthradAlgorithm1()
|
| 92 |
+
else:
|
| 93 |
+
st.session_state.algos[task_name] = SynthradAlgorithm2()
|
| 94 |
+
return st.session_state.algos[task_name]
|
| 95 |
+
|
| 96 |
+
algo = get_algo(task)
|
| 97 |
+
|
| 98 |
+
st.subheader("Input")
|
| 99 |
+
src = st.radio("Source", ["Sample", "Upload"], index=0, horizontal=True)
|
| 100 |
+
|
| 101 |
+
# =========================
|
| 102 |
+
# 样例映射(两任务可共用同一份样例,也可按需区分)
|
| 103 |
+
# 这里假设 repo_dir 下有如下结构:
|
| 104 |
+
# repo_dir/Abdomen/{cbct.mha, mask.mha} 或 {mri.mha, mask.mha}
|
| 105 |
+
# repo_dir/Head and Neck/{cbct.mha or mri.mha, mask.mha}
|
| 106 |
+
# repo_dir/Thorax/{cbct.mha or mri.mha, mask.mha}
|
| 107 |
+
# 如果你的文件名不同,请按需调整。
|
| 108 |
+
# =========================
|
| 109 |
+
|
| 110 |
+
def build_sample_map(task_name: str):
|
| 111 |
+
repo_dir = REPO_DIRS[task_name]
|
| 112 |
+
if task_name == "Task 1 (MR → CT)":
|
| 113 |
+
vol_key = "mri"
|
| 114 |
+
vol_fname = "mri.mha" # 如果你的样例文件名不是 mri.mha,请改成实际名称
|
| 115 |
+
mask_fname = "mask1.mha" # 如果你的样例文件名不是 mri.mha,请改成实际名称
|
| 116 |
+
else:
|
| 117 |
+
vol_key = "cbct"
|
| 118 |
+
vol_fname = "cbct.mha" # 如果你的样例文件名不是 cbct.mha,请改成实际名称
|
| 119 |
+
mask_fname = "mask2.mha" # 如果你的样例文件名不是 mri.mha,请改成实际名称
|
| 120 |
+
sample_map = {
|
| 121 |
+
"Abdomen (sample)": {
|
| 122 |
+
"region": "Abdomen",
|
| 123 |
+
"vol": os.path.join(repo_dir, "Abdomen", vol_fname),
|
| 124 |
+
"mask": os.path.join(repo_dir, "Abdomen", mask_fname),
|
| 125 |
+
},
|
| 126 |
+
"Head and Neck (sample)": {
|
| 127 |
+
"region": "Head and Neck",
|
| 128 |
+
"vol": os.path.join(repo_dir, "Head and Neck", vol_fname),
|
| 129 |
+
"mask": os.path.join(repo_dir, "Head and Neck", mask_fname),
|
| 130 |
+
},
|
| 131 |
+
"Thorax (sample)": {
|
| 132 |
+
"region": "Thorax",
|
| 133 |
+
"vol": os.path.join(repo_dir, "Thorax", vol_fname),
|
| 134 |
+
"mask": os.path.join(repo_dir, "Thorax", mask_fname),
|
| 135 |
+
},
|
| 136 |
+
}
|
| 137 |
+
return sample_map
|
| 138 |
+
|
| 139 |
+
SAMPLE_MAP = build_sample_map(task)
|
| 140 |
+
|
| 141 |
+
# =========================
|
| 142 |
+
# 小工具函数
|
| 143 |
+
# =========================
|
| 144 |
+
def _download_sitk_image(img: sitk.Image, file_name: str, label: str):
|
| 145 |
+
with tempfile.NamedTemporaryFile(suffix=".nii.gz", delete=False) as tmp:
|
| 146 |
+
sitk.WriteImage(img, tmp.name)
|
| 147 |
+
tmp_path = tmp.name
|
| 148 |
+
with open(tmp_path, "rb") as f:
|
| 149 |
+
st.download_button(
|
| 150 |
+
label=label,
|
| 151 |
+
data=f.read(),
|
| 152 |
+
file_name=file_name,
|
| 153 |
+
mime="application/octet-stream",
|
| 154 |
+
)
|
| 155 |
+
try:
|
| 156 |
+
os.remove(tmp_path)
|
| 157 |
+
except Exception:
|
| 158 |
+
pass
|
| 159 |
+
|
| 160 |
+
def _read_sitk_from_uploaded(f):
|
| 161 |
+
suffix = ".nii.gz" if f.name.endswith(".nii.gz") else os.path.splitext(f.name)[1]
|
| 162 |
+
bio = io.BytesIO(f.read())
|
| 163 |
+
with tempfile.NamedTemporaryFile(suffix=suffix, delete=False) as tmp:
|
| 164 |
+
tmp.write(bio.getvalue()); tmp.flush(); path = tmp.name
|
| 165 |
+
img = sitk.ReadImage(path)
|
| 166 |
+
try:
|
| 167 |
+
os.remove(path)
|
| 168 |
+
except Exception:
|
| 169 |
+
pass
|
| 170 |
+
return img
|
| 171 |
+
|
| 172 |
+
def _read_sitk_from_path(path):
|
| 173 |
+
if not os.path.exists(path):
|
| 174 |
+
st.error(f"Sample file missing: {path}")
|
| 175 |
+
st.stop()
|
| 176 |
+
return sitk.ReadImage(path)
|
| 177 |
+
|
| 178 |
+
def _norm2u8(slice2d):
|
| 179 |
+
s = slice2d.astype(np.float32)
|
| 180 |
+
s = (s - np.percentile(s, 1)) / (np.percentile(s, 99) - np.percentile(s, 1) + 1e-6)
|
| 181 |
+
s = np.clip(s, 0, 1)
|
| 182 |
+
return (s * 255).astype(np.uint8)
|
| 183 |
+
|
| 184 |
+
# =========================
|
| 185 |
+
# 输入区域(Upload or Sample)
|
| 186 |
+
# =========================
|
| 187 |
+
c1, c2, c3 = st.columns([2, 2, 1])
|
| 188 |
+
|
| 189 |
+
if src == "Upload":
|
| 190 |
+
with c1:
|
| 191 |
+
vol_file = st.file_uploader(vol_label, type=["nii", "nii.gz", "mha"], key="vol")
|
| 192 |
+
with c2:
|
| 193 |
+
mask_file = st.file_uploader("Mask volume (.nii/.nii.gz/.mha)", type=["nii", "nii.gz", "mha"], key="mask")
|
| 194 |
+
with c3:
|
| 195 |
+
region = st.radio("Region", ["Head and Neck", "Abdomen", "Thorax"], index=1)
|
| 196 |
+
inputs_ready = (vol_file is not None) and (mask_file is not None)
|
| 197 |
+
region_for_run = region
|
| 198 |
+
else:
|
| 199 |
+
with c1:
|
| 200 |
+
sample_key = st.selectbox("Choose a sample", list(SAMPLE_MAP.keys()))
|
| 201 |
+
with c2:
|
| 202 |
+
st.markdown("Region (fixed by sample)")
|
| 203 |
+
st.write(f"**{SAMPLE_MAP[sample_key]['region']}**")
|
| 204 |
+
with c3:
|
| 205 |
+
st.markdown(" ", unsafe_allow_html=True)
|
| 206 |
+
inputs_ready = (sample_key is not None)
|
| 207 |
+
region_for_run = SAMPLE_MAP[sample_key]["region"]
|
| 208 |
+
|
| 209 |
+
run_btn = st.button("Run", type="primary", disabled=not inputs_ready)
|
| 210 |
+
|
| 211 |
+
# =========================
|
| 212 |
+
# 推理
|
| 213 |
+
# =========================
|
| 214 |
+
if run_btn:
|
| 215 |
+
with st.spinner(f"Running nnUNetv2 {('SynthradAlgorithm1' if task=='Task 1 (MR → CT)' else 'SynthradAlgorithm2')}..."):
|
| 216 |
+
if src == "Upload":
|
| 217 |
+
in_vol_img = _read_sitk_from_uploaded(vol_file)
|
| 218 |
+
mask_img = _read_sitk_from_uploaded(mask_file)
|
| 219 |
+
else:
|
| 220 |
+
sample = SAMPLE_MAP[sample_key]
|
| 221 |
+
in_vol_img = _read_sitk_from_path(sample["vol"])
|
| 222 |
+
mask_img = _read_sitk_from_path(sample["mask"])
|
| 223 |
+
|
| 224 |
+
# 保存原始元信息
|
| 225 |
+
st.session_state.orig_meta = (
|
| 226 |
+
in_vol_img.GetSpacing(),
|
| 227 |
+
in_vol_img.GetOrigin(),
|
| 228 |
+
in_vol_img.GetDirection(),
|
| 229 |
+
)
|
| 230 |
+
|
| 231 |
+
# 调用不同任务的算法
|
| 232 |
+
# 约定:算法统一使用 dict 输入:{"image": <sitk.Image>, "mask": <sitk.Image>, "region": <str>}
|
| 233 |
+
out_img = algo.predict({"image": in_vol_img, "mask": mask_img, "region": region_for_run})
|
| 234 |
+
|
| 235 |
+
st.session_state.synth_ct = out_img
|
| 236 |
+
st.session_state.vol_np = sitk.GetArrayFromImage(out_img).astype(np.float32)
|
| 237 |
+
st.session_state.input_vol = in_vol_img
|
| 238 |
+
st.session_state.input_mask = mask_img
|
| 239 |
+
|
| 240 |
+
# =========================
|
| 241 |
+
# 结果与下载
|
| 242 |
+
# =========================
|
| 243 |
+
if st.session_state.vol_np is None:
|
| 244 |
+
st.info("请先选择任务与输入(Upload 或 Sample),然后点击 Run")
|
| 245 |
+
else:
|
| 246 |
+
# 将输出转为 LPS 方向做显示(可选)
|
| 247 |
+
out_lps = sitk.DICOMOrient(st.session_state.synth_ct, "LPS")
|
| 248 |
+
vol = sitk.GetArrayFromImage(out_lps).astype(np.float32)
|
| 249 |
+
D, H, W = vol.shape
|
| 250 |
+
|
| 251 |
+
col_d1, col_d2, col_d3 = st.columns(3)
|
| 252 |
+
|
| 253 |
+
# 下载合成CT
|
| 254 |
+
with col_d3:
|
| 255 |
+
_download_sitk_image(
|
| 256 |
+
st.session_state.synth_ct,
|
| 257 |
+
file_name="synth_ct.nii.gz",
|
| 258 |
+
label="Download synthetic CT",
|
| 259 |
+
)
|
| 260 |
+
|
| 261 |
+
# 下载输入体积(根据任务区分命名)
|
| 262 |
+
with col_d1:
|
| 263 |
+
if st.session_state.input_vol is not None:
|
| 264 |
+
in_name = "input_mri.nii.gz" if task == "Task 1 (MR → CT)" else "input_cbct.nii.gz"
|
| 265 |
+
in_label = "Download input MRI" if task == "Task 1 (MR → CT)" else "Download input CBCT"
|
| 266 |
+
_download_sitk_image(
|
| 267 |
+
st.session_state.input_vol,
|
| 268 |
+
file_name=in_name,
|
| 269 |
+
label=in_label,
|
| 270 |
+
)
|
| 271 |
+
else:
|
| 272 |
+
st.button("Download input", disabled=True)
|
| 273 |
+
|
| 274 |
+
# 下载掩��
|
| 275 |
+
with col_d2:
|
| 276 |
+
if st.session_state.input_mask is not None:
|
| 277 |
+
_download_sitk_image(
|
| 278 |
+
st.session_state.input_mask,
|
| 279 |
+
file_name="input_mask.nii.gz",
|
| 280 |
+
label="Download input Mask",
|
| 281 |
+
)
|
| 282 |
+
else:
|
| 283 |
+
st.button("Download input Mask", disabled=True)
|
nnunetv2/__pycache__/__init__.cpython-312.pyc
CHANGED
|
Binary files a/nnunetv2/__pycache__/__init__.cpython-312.pyc and b/nnunetv2/__pycache__/__init__.cpython-312.pyc differ
|
|
|
nnunetv2/__pycache__/configuration.cpython-312.pyc
CHANGED
|
Binary files a/nnunetv2/__pycache__/configuration.cpython-312.pyc and b/nnunetv2/__pycache__/configuration.cpython-312.pyc differ
|
|
|
nnunetv2/__pycache__/paths.cpython-312.pyc
CHANGED
|
Binary files a/nnunetv2/__pycache__/paths.cpython-312.pyc and b/nnunetv2/__pycache__/paths.cpython-312.pyc differ
|
|
|
nnunetv2/analysis/__pycache__/__init__.cpython-312.pyc
CHANGED
|
Binary files a/nnunetv2/analysis/__pycache__/__init__.cpython-312.pyc and b/nnunetv2/analysis/__pycache__/__init__.cpython-312.pyc differ
|
|
|
nnunetv2/analysis/__pycache__/image_metrics.cpython-312.pyc
CHANGED
|
Binary files a/nnunetv2/analysis/__pycache__/image_metrics.cpython-312.pyc and b/nnunetv2/analysis/__pycache__/image_metrics.cpython-312.pyc differ
|
|
|
nnunetv2/analysis/__pycache__/result_analysis.cpython-312.pyc
CHANGED
|
Binary files a/nnunetv2/analysis/__pycache__/result_analysis.cpython-312.pyc and b/nnunetv2/analysis/__pycache__/result_analysis.cpython-312.pyc differ
|
|
|
nnunetv2/analysis/__pycache__/revert_normalisation.cpython-312.pyc
CHANGED
|
Binary files a/nnunetv2/analysis/__pycache__/revert_normalisation.cpython-312.pyc and b/nnunetv2/analysis/__pycache__/revert_normalisation.cpython-312.pyc differ
|
|
|
nnunetv2/evaluation/__pycache__/__init__.cpython-312.pyc
CHANGED
|
Binary files a/nnunetv2/evaluation/__pycache__/__init__.cpython-312.pyc and b/nnunetv2/evaluation/__pycache__/__init__.cpython-312.pyc differ
|
|
|
nnunetv2/evaluation/__pycache__/evaluate_predictions.cpython-312.pyc
CHANGED
|
Binary files a/nnunetv2/evaluation/__pycache__/evaluate_predictions.cpython-312.pyc and b/nnunetv2/evaluation/__pycache__/evaluate_predictions.cpython-312.pyc differ
|
|
|
nnunetv2/imageio/__pycache__/__init__.cpython-312.pyc
CHANGED
|
Binary files a/nnunetv2/imageio/__pycache__/__init__.cpython-312.pyc and b/nnunetv2/imageio/__pycache__/__init__.cpython-312.pyc differ
|
|
|
nnunetv2/imageio/__pycache__/base_reader_writer.cpython-312.pyc
CHANGED
|
Binary files a/nnunetv2/imageio/__pycache__/base_reader_writer.cpython-312.pyc and b/nnunetv2/imageio/__pycache__/base_reader_writer.cpython-312.pyc differ
|
|
|
nnunetv2/imageio/__pycache__/natural_image_reader_writer.cpython-312.pyc
CHANGED
|
Binary files a/nnunetv2/imageio/__pycache__/natural_image_reader_writer.cpython-312.pyc and b/nnunetv2/imageio/__pycache__/natural_image_reader_writer.cpython-312.pyc differ
|
|
|
nnunetv2/imageio/__pycache__/nibabel_reader_writer.cpython-312.pyc
CHANGED
|
Binary files a/nnunetv2/imageio/__pycache__/nibabel_reader_writer.cpython-312.pyc and b/nnunetv2/imageio/__pycache__/nibabel_reader_writer.cpython-312.pyc differ
|
|
|
nnunetv2/imageio/__pycache__/reader_writer_registry.cpython-312.pyc
CHANGED
|
Binary files a/nnunetv2/imageio/__pycache__/reader_writer_registry.cpython-312.pyc and b/nnunetv2/imageio/__pycache__/reader_writer_registry.cpython-312.pyc differ
|
|
|
nnunetv2/imageio/__pycache__/simpleitk_reader_writer.cpython-312.pyc
CHANGED
|
Binary files a/nnunetv2/imageio/__pycache__/simpleitk_reader_writer.cpython-312.pyc and b/nnunetv2/imageio/__pycache__/simpleitk_reader_writer.cpython-312.pyc differ
|
|
|
nnunetv2/imageio/__pycache__/tif_reader_writer.cpython-312.pyc
CHANGED
|
Binary files a/nnunetv2/imageio/__pycache__/tif_reader_writer.cpython-312.pyc and b/nnunetv2/imageio/__pycache__/tif_reader_writer.cpython-312.pyc differ
|
|
|
nnunetv2/inference/__pycache__/__init__.cpython-312.pyc
CHANGED
|
Binary files a/nnunetv2/inference/__pycache__/__init__.cpython-312.pyc and b/nnunetv2/inference/__pycache__/__init__.cpython-312.pyc differ
|
|
|
nnunetv2/inference/__pycache__/data_iterators.cpython-312.pyc
CHANGED
|
Binary files a/nnunetv2/inference/__pycache__/data_iterators.cpython-312.pyc and b/nnunetv2/inference/__pycache__/data_iterators.cpython-312.pyc differ
|
|
|
nnunetv2/inference/__pycache__/export_prediction.cpython-312.pyc
CHANGED
|
Binary files a/nnunetv2/inference/__pycache__/export_prediction.cpython-312.pyc and b/nnunetv2/inference/__pycache__/export_prediction.cpython-312.pyc differ
|
|
|
nnunetv2/inference/__pycache__/predict_from_raw_data.cpython-312.pyc
CHANGED
|
Binary files a/nnunetv2/inference/__pycache__/predict_from_raw_data.cpython-312.pyc and b/nnunetv2/inference/__pycache__/predict_from_raw_data.cpython-312.pyc differ
|
|
|
nnunetv2/inference/__pycache__/sliding_window_prediction.cpython-312.pyc
CHANGED
|
Binary files a/nnunetv2/inference/__pycache__/sliding_window_prediction.cpython-312.pyc and b/nnunetv2/inference/__pycache__/sliding_window_prediction.cpython-312.pyc differ
|
|
|
nnunetv2/preprocessing/__pycache__/__init__.cpython-312.pyc
CHANGED
|
Binary files a/nnunetv2/preprocessing/__pycache__/__init__.cpython-312.pyc and b/nnunetv2/preprocessing/__pycache__/__init__.cpython-312.pyc differ
|
|
|
nnunetv2/preprocessing/cropping/__pycache__/__init__.cpython-312.pyc
CHANGED
|
Binary files a/nnunetv2/preprocessing/cropping/__pycache__/__init__.cpython-312.pyc and b/nnunetv2/preprocessing/cropping/__pycache__/__init__.cpython-312.pyc differ
|
|
|
nnunetv2/preprocessing/cropping/__pycache__/cropping.cpython-312.pyc
CHANGED
|
Binary files a/nnunetv2/preprocessing/cropping/__pycache__/cropping.cpython-312.pyc and b/nnunetv2/preprocessing/cropping/__pycache__/cropping.cpython-312.pyc differ
|
|
|
nnunetv2/preprocessing/normalization/__pycache__/__init__.cpython-312.pyc
CHANGED
|
Binary files a/nnunetv2/preprocessing/normalization/__pycache__/__init__.cpython-312.pyc and b/nnunetv2/preprocessing/normalization/__pycache__/__init__.cpython-312.pyc differ
|
|
|
nnunetv2/preprocessing/normalization/__pycache__/default_normalization_schemes.cpython-312.pyc
CHANGED
|
Binary files a/nnunetv2/preprocessing/normalization/__pycache__/default_normalization_schemes.cpython-312.pyc and b/nnunetv2/preprocessing/normalization/__pycache__/default_normalization_schemes.cpython-312.pyc differ
|
|
|
nnunetv2/preprocessing/normalization/__pycache__/map_channel_name_to_normalization.cpython-312.pyc
CHANGED
|
Binary files a/nnunetv2/preprocessing/normalization/__pycache__/map_channel_name_to_normalization.cpython-312.pyc and b/nnunetv2/preprocessing/normalization/__pycache__/map_channel_name_to_normalization.cpython-312.pyc differ
|
|
|
nnunetv2/preprocessing/preprocessors/__pycache__/__init__.cpython-312.pyc
CHANGED
|
Binary files a/nnunetv2/preprocessing/preprocessors/__pycache__/__init__.cpython-312.pyc and b/nnunetv2/preprocessing/preprocessors/__pycache__/__init__.cpython-312.pyc differ
|
|
|
nnunetv2/preprocessing/preprocessors/__pycache__/default_preprocessor.cpython-312.pyc
CHANGED
|
Binary files a/nnunetv2/preprocessing/preprocessors/__pycache__/default_preprocessor.cpython-312.pyc and b/nnunetv2/preprocessing/preprocessors/__pycache__/default_preprocessor.cpython-312.pyc differ
|
|
|
nnunetv2/preprocessing/resampling/__pycache__/__init__.cpython-312.pyc
CHANGED
|
Binary files a/nnunetv2/preprocessing/resampling/__pycache__/__init__.cpython-312.pyc and b/nnunetv2/preprocessing/resampling/__pycache__/__init__.cpython-312.pyc differ
|
|
|
nnunetv2/preprocessing/resampling/__pycache__/default_resampling.cpython-312.pyc
CHANGED
|
Binary files a/nnunetv2/preprocessing/resampling/__pycache__/default_resampling.cpython-312.pyc and b/nnunetv2/preprocessing/resampling/__pycache__/default_resampling.cpython-312.pyc differ
|
|
|
nnunetv2/preprocessing/resampling/__pycache__/utils.cpython-312.pyc
CHANGED
|
Binary files a/nnunetv2/preprocessing/resampling/__pycache__/utils.cpython-312.pyc and b/nnunetv2/preprocessing/resampling/__pycache__/utils.cpython-312.pyc differ
|
|
|
nnunetv2/training/__pycache__/__init__.cpython-312.pyc
CHANGED
|
Binary files a/nnunetv2/training/__pycache__/__init__.cpython-312.pyc and b/nnunetv2/training/__pycache__/__init__.cpython-312.pyc differ
|
|
|
nnunetv2/training/data_augmentation/__pycache__/__init__.cpython-312.pyc
CHANGED
|
Binary files a/nnunetv2/training/data_augmentation/__pycache__/__init__.cpython-312.pyc and b/nnunetv2/training/data_augmentation/__pycache__/__init__.cpython-312.pyc differ
|
|
|
nnunetv2/training/data_augmentation/__pycache__/compute_initial_patch_size.cpython-312.pyc
CHANGED
|
Binary files a/nnunetv2/training/data_augmentation/__pycache__/compute_initial_patch_size.cpython-312.pyc and b/nnunetv2/training/data_augmentation/__pycache__/compute_initial_patch_size.cpython-312.pyc differ
|
|
|
nnunetv2/training/data_augmentation/custom_transforms/__pycache__/__init__.cpython-312.pyc
CHANGED
|
Binary files a/nnunetv2/training/data_augmentation/custom_transforms/__pycache__/__init__.cpython-312.pyc and b/nnunetv2/training/data_augmentation/custom_transforms/__pycache__/__init__.cpython-312.pyc differ
|
|
|
nnunetv2/training/data_augmentation/custom_transforms/__pycache__/cascade_transforms.cpython-312.pyc
CHANGED
|
Binary files a/nnunetv2/training/data_augmentation/custom_transforms/__pycache__/cascade_transforms.cpython-312.pyc and b/nnunetv2/training/data_augmentation/custom_transforms/__pycache__/cascade_transforms.cpython-312.pyc differ
|
|
|
nnunetv2/training/data_augmentation/custom_transforms/__pycache__/deep_supervision_donwsampling.cpython-312.pyc
CHANGED
|
Binary files a/nnunetv2/training/data_augmentation/custom_transforms/__pycache__/deep_supervision_donwsampling.cpython-312.pyc and b/nnunetv2/training/data_augmentation/custom_transforms/__pycache__/deep_supervision_donwsampling.cpython-312.pyc differ
|
|
|
nnunetv2/training/data_augmentation/custom_transforms/__pycache__/limited_length_multithreaded_augmenter.cpython-312.pyc
CHANGED
|
Binary files a/nnunetv2/training/data_augmentation/custom_transforms/__pycache__/limited_length_multithreaded_augmenter.cpython-312.pyc and b/nnunetv2/training/data_augmentation/custom_transforms/__pycache__/limited_length_multithreaded_augmenter.cpython-312.pyc differ
|
|
|
nnunetv2/training/data_augmentation/custom_transforms/__pycache__/masking.cpython-312.pyc
CHANGED
|
Binary files a/nnunetv2/training/data_augmentation/custom_transforms/__pycache__/masking.cpython-312.pyc and b/nnunetv2/training/data_augmentation/custom_transforms/__pycache__/masking.cpython-312.pyc differ
|
|
|
nnunetv2/training/data_augmentation/custom_transforms/__pycache__/region_based_training.cpython-312.pyc
CHANGED
|
Binary files a/nnunetv2/training/data_augmentation/custom_transforms/__pycache__/region_based_training.cpython-312.pyc and b/nnunetv2/training/data_augmentation/custom_transforms/__pycache__/region_based_training.cpython-312.pyc differ
|
|
|
nnunetv2/training/data_augmentation/custom_transforms/__pycache__/transforms_for_dummy_2d.cpython-312.pyc
CHANGED
|
Binary files a/nnunetv2/training/data_augmentation/custom_transforms/__pycache__/transforms_for_dummy_2d.cpython-312.pyc and b/nnunetv2/training/data_augmentation/custom_transforms/__pycache__/transforms_for_dummy_2d.cpython-312.pyc differ
|
|
|
nnunetv2/training/dataloading/__pycache__/__init__.cpython-312.pyc
CHANGED
|
Binary files a/nnunetv2/training/dataloading/__pycache__/__init__.cpython-312.pyc and b/nnunetv2/training/dataloading/__pycache__/__init__.cpython-312.pyc differ
|
|
|
nnunetv2/training/dataloading/__pycache__/base_data_loader.cpython-312.pyc
CHANGED
|
Binary files a/nnunetv2/training/dataloading/__pycache__/base_data_loader.cpython-312.pyc and b/nnunetv2/training/dataloading/__pycache__/base_data_loader.cpython-312.pyc differ
|
|
|
nnunetv2/training/dataloading/__pycache__/data_loader_2d.cpython-312.pyc
CHANGED
|
Binary files a/nnunetv2/training/dataloading/__pycache__/data_loader_2d.cpython-312.pyc and b/nnunetv2/training/dataloading/__pycache__/data_loader_2d.cpython-312.pyc differ
|
|
|