Open manvirvirk opened 4 years ago
Hello! Mehrdad-Noori. Thanks for your code! I want to train my own data, how do I put my own dataset into the folder 'data'? What are the data format requirements? I'm looking forward to your reply.
I used BraTS dataset that is in nii.gz format. It also contains 4 image types/channels (flair, t1, t1_ce, t2) + label. Something like:
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
:
:
You can modify the prepare_data.py
with respect to your data structure. I have also done some cropping on images with x0, x1, y0, y1, z0, z1
parameters. You can comment them out or find the cropping values of your dataset.
我按您的格式进行放置他报错了
C:\ProgramData\Anaconda3\envs\tensorflow\python.exe E:/Brats/prepare_data.py
0%| | 0/1 [00:00<?, ?it/s]
Traceback (most recent call last):
File "E:/Brats/prepare_data.py", line 168, in
You can easily modify the
prepare_data.py
to make it fit to your own problem. If you have any problems please let me know.