Closed sainatarajan closed 3 years ago
Issue solved. Error in the dataset.json
Can you share your experience with solving this problem? Thanks a lot! I meet the same issue.
@sunshinelike I hope this helps. Your folder structure should look something like this:
Task600_Spine/
├── dataset.json
├── imagesTr
│ ├── vert_001_0000.nii.gz
│ ├── vert_002_0000.nii.gz
│ ├── ...
└── labelsTr
├── vert_001.nii.gz
├── vert_002.nii.gz
├── ...
And your dataset.json should look something like this:
{
"name": "Vertebra Segmentation",
"description": "Vertebra Segmentation",
"reference": "NCSD 2013",
"licence": "CC-BY-SA 4.0",
"relase": "1.0 04/05/2018",
"tensorImageSize": "3D",
"modality": {
"0": "CT"
},
"labels": {
"0": "background",
"1": "Vertebra"
},
"numTraining": 30,
"test": [],
"training": [
{
"image": "./imagesTr/Vert_001.nii.gz",
"label": "./labelsTr/Vert_001.nii.gz"
},...,
{
"image": "./imagesTr/Vert_030.nii.gz",
"label": "./labelsTr/Vert_030.nii.gz"
}
]
}
oh ,I see. Thank you very much.😊 Thank you for your quick response.
Hi Fabian,
Thanks for this repo. I'm trying to run the nnUNet for my custom dataset and I encounter some errors when I run the
plan_and_preprocess
script.My dataset has the following structure:
Note that in the above volumes, there are no suffixes
0000
or0001
. Thedataset.json
has the modality of 0. The code searches for the filevert_003_0000.nii.gz
, and it throws the above error since the file doesn't exist.Now when I rename all the volumes and append the suffixes to their original filenames, for eg: changing
vert_003.nii.gz
tovert_003_0000.nii.gz
, the code searches for the filevert_003_0000_0000.nii.gz
which is not available and again throws the above error.When I started debugging, I found this line that adds the suffix
0000
to the filenames irrespective of whether the filename has the suffix or not, and therefore it throws the above error.Do you have any solutions for this? Or is there any step that I'm doing wrong?
Thanks!