Preprocessing - nntrongnghia/TDSI21-Shoulder-Muscle-Segmentation GitHub Wiki
General steps
- Crop image w.r.t. non-zero region
- Analyze dataset
- Plan 2D/3D experiments -> https://github.com/MIC-DKFZ/nnUNet/blob/master/documentation/tutorials/edit_plans_files.md
- Preprocess (optional, enable by default)
Analyze dataset
-
Get size and spacing
- image-size (number of voxel per spatial dimension) before and after cropping 'original_size_of_raw_data':array([180, 384, 384]) -----> 'size_after_cropping':(180, 384, 384). So, there is no cropping in our case (TDSI21-ShoulderMuscle)
- voxel spacing (physical size of voxels) 'original_spacing':array([0.66666669, 0.6875 , 0.6875 ]) How can they get this information ?
-
Get classes
-
Get modalities (read from metadata) -> LINK
-
No collect_intensity_properties because our data is not CT modality.
-
Save data properties in a pickle file -> https://stackoverflow.com/questions/24906126/how-to-unpack-pkl-file
Plan 2D:
Preprocessing | Value |
---|---|
batch_size | 44 |
num_pool_per_axis | [5, 6] |
patch_size | array([192, 384]) |
median_patient_size_in_voxels | array([384, 180, 384]) |
current_spacing | array([0.6875 , 0.66666669, 0.6875 ]) |
original_spacing | array([0.6875 , 0.66666669, 0.6875 ]) |
pool_op_kernel_sizes | [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [1, 2] |
conv_kernel_sizes | [3, 3], [3, 3], [3, 3], [3, 3], [3, 3], [3, 3], [3, 3] |
do_dummy_2D_data_aug | False |
Plan 3D stage 0
Preprocessing | Value |
---|---|
batch_size | 2 |
num_pool_per_axis | [5, 4, 5] |
patch_size | array([192, 80, 160]) |
median_patient_size_in_voxels | array([274, 128, 274] |
current_spacing | array([0.96427168, 0.93505135, 0.96427168]) -> First stage of 3D cascade = low resolution |
original_spacing | array([0.6875 , 0.66666669, 0.6875 ]) |
pool_op_kernel_sizes | [2, 2, 2], [2, 2, 2], [2, 2, 2], [2, 2, 2], [2, 1, 2] |
conv_kernel_sizes | [3, 3, 3], [3, 3, 3], [3, 3, 3], [3, 3, 3], [3, 3, 3], [3, 3, 3] |
do_dummy_2D_data_aug | True |
Plan 3D stage 1
Preprocessing | Value |
---|---|
batch_size | 2 |
num_pool_per_axis | [5, 4, 5] |
patch_size | array([192, 80, 160]) |
median_patient_size_in_voxels | array([384, 180, 384]) |
current_spacing | array([0.6875 , 0.66666669, 0.6875 ] |
original_spacing | array([0.6875 , 0.66666669, 0.6875 ]) |
pool_op_kernel_sizes | [2, 2, 2], [2, 2, 2], [2, 2, 2], [2, 2, 2], [2, 1, 2] |
conv_kernel_sizes | [3, 3, 3], [3, 3, 3], [3, 3, 3], [3, 3, 3], [3, 3, 3], [3, 3, 3] |
do_dummy_2D_data_aug | True |
Preprocess
-Image resampling : IF anisotropic : in-plane with third-order spline and you can chose how to resample the z axis -> (third-order spline or nearest neighbour) ELSE third-order spline on every axis
-Image spacing : IF anisotropic : lowest resolution axis tenth percentile, other axes median. ELSE: target image spacing are median spacing for each axis computed based on spacings found in training cases