MIC-DKFZ / nnUNet

Apache License 2.0
5.9k stars 1.76k forks source link

Could you explain file pickle of each case preprocessed by nnUNet? #2024

Closed hdnminh closed 6 months ago

hdnminh commented 8 months ago

Hi Team,

  1. What is class_locations, crop_bbox, use_nonzero_mask_for_norm?

  2. What is class_locations, crop_bbox, use_nonzero_mask_for_norm, size_after_cropping, size_after_resampling used for?

  3. Why does "classes": [ -1.0, 0.0, 1.0] have 3 values while my dataset has only 2 labels: background and the main organ.

    
    {
    "original_size_of_raw_data": [
        29,
        384,
        384
    ],
    "original_spacing": [
        3.0002601146698,
        0.4687559902667999,
        0.46875065565109253
    ],
    "list_of_data_files": [
        "/home/hdnminh/Documents/context-based-continual-learning/data/nnUNet_raw_data_base/nnUNet_raw_data/Task121_UCL/imagesTr/Case01_0000.nii.gz"
    ],
    "seg_file": "/home/hdnminh/Documents/context-based-continual-learning/data/nnUNet_raw_data_base/nnUNet_raw_data/Task121_UCL/labelsTr/Case01_0000.nii.gz",
    "itk_origin": [
        -93.0374984741211,
        -64.0438003540039,
        -138.27000427246094
    ],
    "itk_spacing": [
        0.46875065565109253,
        0.4687559902667999,
        3.0002601146698
    ],
    "itk_direction": [
        0.999997891895637,
        -9.691366181747261e-05,
        0.0020510514814995316,
        0.0011280354364155353,
        0.8605794796495506,
        -0.5093149312863127,
        -0.0017157331773990214,
        0.5093161589954228,
        0.8605777675240273
    ],
    "crop_bbox": [
        [
            0,
            29
        ],
        [
            0,
            384
        ],
        [
            0,
            384
        ]
    ],
    "classes": [
        -1.0,
        0.0,
        1.0
    ],
    "size_after_cropping": [
        29,
        384,
        384
    ],
    "use_nonzero_mask_for_norm": {
        "0": false
    },
    "size_after_resampling": [
        29,
        346,
        346
    ],
    "spacing_after_resampling": [
        3.0002601146698,
        0.5208333134651184,
        0.5208333134651184
    ],
    "class_locations": {
        "1": [[],[],....[]]
        }
    }
FabianIsensee commented 8 months ago

Hey, I'd like to encourage you to find such answers in the code. That is certainly faster than for one of us to step in and explain it :-)

Best, Fabian