Skip to content

Train a baseline REGION-BASED model from scratch on dcm-zurich-lesions datasets using nnUNet #1

@valosekj

Description

@valosekj

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:

    "channel_names": {
        "0": "acq-ax_T2w"
    },
    "labels": {
        "background": 0,
        "sc": [
            1,
            2
        ],
        "lesion": 2
    },
    "regions_class_order": [
        1,
        2
    ],
nnUNetPlans.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 on dcm-zurich-lesions and dcm-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

  • create SC seg GT for 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 pushed
  • double-check if there is an overlap in subjects between both datasets (should not be the case) - no overlap, see comment below
  • convert both datasets from BIDS to nnUNet using dataset_conversion/convert_bids_to_nnUNetv2_region-based.py
  • make sure lesions are part of SC (sct_maths -add) - not needed; see here
  • run training

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions