Mehrdad-Noori / Brain-Tumor-Segmentation

Attention-Guided Version of 2D UNet for Automatic Brain Tumor Segmentation
207 stars 37 forks source link

IndexError: list index out of range in modalities_dir when executing prepare_data #3

Closed rezababaee759 closed 4 years ago

rezababaee759 commented 4 years ago

hi i got this error when executing prepare_data

thanks

Mehrdad-Noori commented 4 years ago

Hi Reza, Please make sure your data_dir is something like:

cfg['data_dir']              = './BRATS19/MICCAI_BraTS_2019_Data_Training/*/*'
MICCAI_BraTS_2019_Data_Training
├── HGG
│   ├── BraTS19_2013_10_1
│   │   ├── BraTS19_2013_10_1_flair.nii.gz
│   │   ├── BraTS19_2013_10_1_seg.nii.gz
│   │   ├── BraTS19_2013_10_1_t1ce.nii.gz
│   │   ├── BraTS19_2013_10_1_t1.nii.gz
│   │   └── BraTS19_2013_10_1_t2.nii.gz
│   ├── BraTS19_2013_11_1
│   │   ├── BraTS19_2013_11_1_flair.nii.gz
│   │   ├── BraTS19_2013_11_1_seg.nii.gz
│   │   ├── BraTS19_2013_11_1_t1ce.nii.gz
│   │   ├── BraTS19_2013_11_1_t1.nii.gz
│   │   └── BraTS19_2013_11_1_t2.nii.gz
:   :   
:   :
│   │
└── LGG
    ├── BraTS19_2013_0_1
    │   ├── BraTS19_2013_0_1_flair.nii.gz
    │   ├── BraTS19_2013_0_1_seg.nii.gz
    │   ├── BraTS19_2013_0_1_t1ce.nii.gz
    │   ├── BraTS19_2013_0_1_t1.nii.gz
    │   └── BraTS19_2013_0_1_t2.nii.gz
    ├── BraTS19_2013_1_1
    │   ├── BraTS19_2013_1_1_flair.nii.gz
    │   ├── BraTS19_2013_1_1_seg.nii.gz
    │   ├── BraTS19_2013_1_1_t1ce.nii.gz
    │   ├── BraTS19_2013_1_1_t1.nii.gz
    │   └── BraTS19_2013_1_1_t2.nii.gz
    :
    :
rezababaee759 commented 4 years ago

oh, i fixed it and it worked thanks for your reponse