Open valosekj opened 7 months ago
Thanks for opening the issue, Jan!
create SC seg GT for dcm-zurich-lesions-20231115
Regarding this, I pushed a script for generating QC for both SC and lesions for dcm-zurich-*
datasets. Once the GT SC seg is generated, please use/update that script for QC visualization!
double-check if there is overlap in subjects between both datasets (should not be the case)
As for this, Patrick confirmed in an email on Nov 15th 2023 that the original dcm-zurich
dataset was used in the neurology paper by Scheuren et al. and does not overlap with the latest cohort dcm-zurich-lesions-20231115
.
run training
and lastly, for this, I noticed that the dcm-zurich
dataset also contains the compression label for all subjects. How are these labels obtained? I was thinking of also including this in the model's prediction so it outputs lesion seg, compression label (and possibly SC seg). It seems that the identification of compression site is important for DCM subjects ...
Regarding this, I pushed a script for generating QC for both SC and lesions for
dcm-zurich-*
datasets. Once the GT SC seg is generated, please use/update that script for QC visualization!
SCIseg worked well -- only 5 subjects needed corrections; labels are pushed.
Great, thanks for the script! The script worked perfectly! Maybe we could create a folder under duke/projects
and copy QC there?
As for this, Patrick confirmed in an email on Nov 15th 2023 that the original
dcm-zurich
dataset was used in the neurology paper by Scheuren et al. and does not overlap with the latest cohortdcm-zurich-lesions-20231115
.
Great, thanks for confirmation!
and lastly, for this, I noticed that the
dcm-zurich
dataset also contains the compression label for all subjects. How are these labels obtained?
Compression labels are single pixels with a value 1
at the level of compression (details). They were created manually by me or Sandrine.
I was thinking of also including this in the model's prediction so it outputs lesion seg, compression label (and possibly SC seg). It seems that the identification of compression site is important for DCM subjects ...
Yes, this would be super relevant! We have discussed this idea many times with Julien and Sandrine; context here. Note that we have compression labels also for >100 subjects in dcm-zurich
. But, dcm-zurich
does not contain lesion GTs.
Maybe we could create a folder under duke/projects and copy QC there?
Sounds good!
Compression labels are single pixels with a value 1 at the level of compression
Right, usually there are more than 1 levels of compression, right? I think for sub-02
I only saw 1 slice labeled despite seeing more compressions, hence my confusion!
Note that we have compression labels also for >100 subjects in dcm-zurich. But, dcm-zurich does not contain lesion GTs.
Nice! at least the model could be pre-trained for detecting compression sites, which, hypothetically could be useful for lesion segmentation (i.e. hyperintensities most likely appear around compressions, if I'm not wrong)
Maybe we could create a folder under duke/projects and copy QC there?
Sounds good!
SC seg and lesion QC copied to ~/duke/projects/ml_dcm_seg/dcm-zurich-lesions-20231115_QC_2024-02-02/qc
Right, usually there are more than 1 levels of compression, right? I think for
sub-02
I only saw 1 slice labeled despite seeing more compressions, hence my confusion!
Yes, usually, DCM patients have so-called multi-level compression, i.e., compressions at several levels (e.g., disc C4/C5 and disc C5/C6). So far, we label each compression with a single pixel, meaning that for two compressions, we would have two pixels with the value 1
.
Nice! at least the model could be pre-trained for detecting compression sites, which, hypothetically could be useful for lesion segmentation (i.e. hyperintensities most likely appear around compressions, if I'm not wrong)
Correct, indeed, I believe that hyperintensities most likely appear around compressions. We can verify this with clinicians during a future meeting.
This comment summarizes training progress.
Note: all folds below were trained using the default nnUNetTrainer
trainer (i.e., the sum of Cross Entropy Loss and Dice Loss with the smoothing term).
Since all folds trained with the default nnUNetTrainer
trainer collapsed to zero (see comment above), I am now trying nnUNetTrainerDiceCELoss_noSmooth
(i.e., without the smoothing term of the Dice loss) (relevant issues here and here).
nnUNetTrainerDiceCELoss_noSmooth
seems to be working (at least, the model is not collapsing to zero)!
nnUNetTrainerDiceCELoss_noSmooth__nnUNetPlans__3d_fullres/fold_1
This issue summarizes experiments related to
Dataset601_DCMlesions
(region-based model trained to using a single input channel (T2w_ax) to segment both SC and lesions).dataset.json
:nnUNetPlans.json:
```json { "dataset_name": "Dataset601_DCMlesions", "plans_name": "nnUNetPlans", "original_median_spacing_after_transp": [ 3.5999999046325684, 0.5, 0.5 ], "original_median_shape_after_transp": [ 15, 320, 319 ], "image_reader_writer": "SimpleITKIO", "transpose_forward": [ 0, 1, 2 ], "transpose_backward": [ 0, 1, 2 ], "configurations": { "2d": { "data_identifier": "nnUNetPlans_2d", "preprocessor_name": "DefaultPreprocessor", "batch_size": 31, "patch_size": [ 320, 320 ], "median_image_size_in_voxels": [ 320.0, 319.0 ], "spacing": [ 0.5, 0.5 ], "normalization_schemes": [ "ZScoreNormalization" ], "use_mask_for_norm": [ false ], "UNet_class_name": "PlainConvUNet", "UNet_base_num_features": 32, "n_conv_per_stage_encoder": [ 2, 2, 2, 2, 2, 2, 2 ], "n_conv_per_stage_decoder": [ 2, 2, 2, 2, 2, 2 ], "num_pool_per_axis": [ 6, 6 ], "pool_op_kernel_sizes": [ [ 1, 1 ], [ 2, 2 ], [ 2, 2 ], [ 2, 2 ], [ 2, 2 ], [ 2, 2 ], [ 2, 2 ] ], "conv_kernel_sizes": [ [ 3, 3 ], [ 3, 3 ], [ 3, 3 ], [ 3, 3 ], [ 3, 3 ], [ 3, 3 ], [ 3, 3 ] ], "unet_max_num_features": 512, "resampling_fn_data": "resample_data_or_seg_to_shape", "resampling_fn_seg": "resample_data_or_seg_to_shape", "resampling_fn_data_kwargs": { "is_seg": false, "order": 3, "order_z": 0, "force_separate_z": null }, "resampling_fn_seg_kwargs": { "is_seg": true, "order": 1, "order_z": 0, "force_separate_z": null }, "resampling_fn_probabilities": "resample_data_or_seg_to_shape", "resampling_fn_probabilities_kwargs": { "is_seg": false, "order": 1, "order_z": 0, "force_separate_z": null }, "batch_dice": true }, "3d_fullres": { "data_identifier": "nnUNetPlans_3d_fullres", "preprocessor_name": "DefaultPreprocessor", "batch_size": 2, "patch_size": [ 16, 320, 320 ], "median_image_size_in_voxels": [ 15.0, 320.0, 319.0 ], "spacing": [ 3.5999979972839355, 0.5, 0.5 ], "normalization_schemes": [ "ZScoreNormalization" ], "use_mask_for_norm": [ false ], "UNet_class_name": "PlainConvUNet", "UNet_base_num_features": 32, "n_conv_per_stage_encoder": [ 2, 2, 2, 2, 2, 2, 2 ], "n_conv_per_stage_decoder": [ 2, 2, 2, 2, 2, 2 ], "num_pool_per_axis": [ 2, 6, 6 ], "pool_op_kernel_sizes": [ [ 1, 1, 1 ], [ 1, 2, 2 ], [ 1, 2, 2 ], [ 2, 2, 2 ], [ 2, 2, 2 ], [ 1, 2, 2 ], [ 1, 2, 2 ] ], "conv_kernel_sizes": [ [ 1, 3, 3 ], [ 1, 3, 3 ], [ 3, 3, 3 ], [ 3, 3, 3 ], [ 3, 3, 3 ], [ 3, 3, 3 ], [ 3, 3, 3 ] ], "unet_max_num_features": 320, "resampling_fn_data": "resample_data_or_seg_to_shape", "resampling_fn_seg": "resample_data_or_seg_to_shape", "resampling_fn_data_kwargs": { "is_seg": false, "order": 3, "order_z": 0, "force_separate_z": null }, "resampling_fn_seg_kwargs": { "is_seg": true, "order": 1, "order_z": 0, "force_separate_z": null }, "resampling_fn_probabilities": "resample_data_or_seg_to_shape", "resampling_fn_probabilities_kwargs": { "is_seg": false, "order": 1, "order_z": 0, "force_separate_z": null }, "batch_dice": false } }, "experiment_planner_used": "ExperimentPlanner", "label_manager": "LabelManager", "foreground_intensity_properties_per_channel": { "0": { "max": 2102.0, "mean": 312.2383728027344, "median": 304.0, "min": 0.0, "percentile_00_5": 100.0, "percentile_99_5": 654.0, "std": 92.65310668945312 } } } ```Dataset601_DCMlesions
will be trained ondcm-zurich-lesions
anddcm-zurich-lesions-20231115
datasets using nnUNetv2 region-based approach (i.e., segmenting both SC and lesions).Manual lesion GTs are available for both datasets.
TODO
dcm-zurich-lesions-20231115
- run inference using the SCIseg model using segment_sc.sh - done; SCIseg worked relatively well -- only 5 of 38 SC segs needed slight manual corrections. Labels are now pushedsct_maths -add
) - not needed; see here