MedSegX-code / data /docs /DATA.md
introvoyz043's picture
Migrated from GitHub
137805f verified
|
Raw History Blame Contribute Delete
5.22 kB

MedSegDB Data Structure

When using the data for pre-training and ID evaluation, please organize them in the following structure:

playground/
└── MedSegDB/
    └── ID/
        β”œβ”€β”€ dataset1/
        β”‚   β”œβ”€β”€ modality_task1/
        β”‚   β”‚   β”œβ”€β”€ npy_imgs/                   # preprocessed images in .npy format
        β”‚   β”‚   └── npy_gts/                    # corresponding ground truth labels
        β”‚   β”œβ”€β”€ modality_task2/
        β”‚   β”‚   β”œβ”€β”€ npy_imgs/
        β”‚   β”‚   └── npy_gts/
        β”‚   └── ...                             # other modality-task pairs
        β”œβ”€β”€ dataset2/
        β”‚   β”œβ”€β”€ modality_task1/
        β”‚   β”‚   β”œβ”€β”€ sequence1/                  # if multiple sequences exist
        β”‚   β”‚   β”‚   β”œβ”€β”€ npy_imgs/
        β”‚   β”‚   β”‚   └── npy_gts/
        β”‚   β”‚   β”œβ”€β”€ sequence2/
        β”‚   β”‚   β”‚   β”œβ”€β”€ npy_imgs/
        β”‚   β”‚   β”‚   └── npy_gts/
        β”‚   β”‚   └── ...                         # other sequences if available
        β”‚   └── ...                             # other modality-task pairs
        └── ...                                 # other datasets

For example,

playground/
└── MedSegDB/
    └── ID/
        β”œβ”€β”€ ACDC/
        β”‚   β”œβ”€β”€ MRI_LeftVentricle/
        β”‚   β”‚   β”œβ”€β”€ npy_imgs/
        β”‚   β”‚   └── npy_gts/
        β”‚   β”œβ”€β”€ MRI_MitralValve/
        β”‚   β”‚   β”œβ”€β”€ npy_imgs/
        β”‚   β”‚   └── npy_gts/
        β”‚   └── ...                             # other modality-task pairs
        β”œβ”€β”€ BraTS2020/
        β”‚   β”œβ”€β”€ MRI_BrainCoreTumor/
        β”‚   β”‚   β”œβ”€β”€ FLAIR/
        β”‚   β”‚   β”‚   β”œβ”€β”€ npy_imgs/
        β”‚   β”‚   β”‚   └── npy_gts/
        β”‚   β”‚   β”œβ”€β”€ T1/
        β”‚   β”‚   β”‚   β”œβ”€β”€ npy_imgs/
        β”‚   β”‚   β”‚   └── npy_gts/
        β”‚   β”‚   └── ...                         # other sequences
        β”‚   └── ...                             # other modality-task pairs
        └── ...                                 # other datasets

When using the data for OOD (or real-world) evaluation, please organize them in the following structure:

playground/
└── MedSegDB/
    └── OOD/
        β”œβ”€β”€ cross_site/                         # cross-site shift
        β”‚   β”œβ”€β”€ modality_task1/
        β”‚   β”‚   β”œβ”€β”€ dataset1/
        β”‚   β”‚   β”‚   β”œβ”€β”€ finetune/               # fine-tune data
        β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ npy_imgs/        
        β”‚   β”‚   β”‚   β”‚   └── npy_gts/
        β”‚   β”‚   β”‚   └── inference/              # inference data
        β”‚   β”‚   β”‚       β”œβ”€β”€ npy_imgs/
        β”‚   β”‚   β”‚       └── npy_gts/
        β”‚   β”‚   β”œβ”€β”€ dataset2/
        β”‚   β”‚   └── ...                         # other datasets
        β”‚   β”œβ”€β”€ modality_task2/
        β”‚   β”‚   β”œβ”€β”€ dataset1/
        β”‚   β”‚   β”‚   β”œβ”€β”€ sequence1/              # if multiple sequences exist
        β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ finetune/
        β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ npy_imgs/
        β”‚   β”‚   β”‚   β”‚   β”‚   └── npy_gts/
        β”‚   β”‚   β”‚   β”‚   └── inference/
        β”‚   β”‚   β”‚   β”‚       β”œβ”€β”€ npy_imgs/
        β”‚   β”‚   β”‚   β”‚       └── npy_gts/
        β”‚   β”‚   β”‚   β”œβ”€β”€ sequence2/
        β”‚   β”‚   β”‚   └── ...                     # other sequences if available
        β”‚   β”‚   β”œβ”€β”€ dataset2/
        β”‚   β”‚   └── ...                         # other datasets
        β”‚   └── ...                             # other modality-task pairs
        └── cross_task/                         # cross-task shift

For example,

playground/
└── MedSegDB/
    └── OOD/
        β”œβ”€β”€ cross_site/
        β”‚   β”œβ”€β”€ CT_Liver/
        β”‚   β”‚   β”œβ”€β”€ SLIVER07/
        β”‚   β”‚   β”‚   β”œβ”€β”€ finetune/
        β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ npy_imgs/
        β”‚   β”‚   β”‚   β”‚   └── npy_gts/
        β”‚   β”‚   β”‚   └── inference/
        β”‚   β”‚   β”‚       β”œβ”€β”€ npy_imgs/
        β”‚   β”‚   β”‚       └── npy_gts/
        β”‚   β”‚   └── ...                         # other datasets
        β”‚   β”œβ”€β”€ MRI_Spleen/
        β”‚   β”‚   β”œβ”€β”€ CHAOS/
        β”‚   β”‚   β”‚   β”œβ”€β”€ T2W/
        β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ finetune/
        β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ npy_imgs/
        β”‚   β”‚   β”‚   β”‚   β”‚   └── npy_gts/
        β”‚   β”‚   β”‚   β”‚   └── inference/
        β”‚   β”‚   β”‚   β”‚       β”œβ”€β”€ npy_imgs/
        β”‚   β”‚   β”‚   β”‚       └── npy_gts/
        β”‚   β”‚   β”‚   └── ...                     # other sequences
        β”‚   β”‚   └── ...                         # other datasets
        β”‚   └── ...                             # other modality-task pairs
        └── cross_task/