MIC-DKFZ / nnUNet

Apache License 2.0
5.99k stars 1.78k forks source link

0000 Additional issues #2616

Open Batwan01 opened 1 week ago

Batwan01 commented 1 week ago

Hello "nnUNet_plan_and_preprocess -t 1 --verify_dataset_integrity" An error occurred while using this command.

dataset.json image

image

rep

image

terminal

image

Both json and rep are in the 0000_0000 format, but when you enter the nnUNet_plan_and_preprocess -t 1 --verify_dataset_integrity command, a problem occurs because it is looking for a file with 0000_0000 with 0000 added.

AssertionError: some image files are missing for case case_0000_0000. Expected files:

['/data/ephemeral/home/nnUNet_raw_data_base/nnUNet_raw_data/Task001_HandBone/imagesTr/case_0000_0000_0000.nii.gz']

Batwan01 commented 6 days ago

expected_imagefiles = [join(folder, "imagesTr", c + "%04.0d.nii.gz" % i) for i in range(num_modalities)]

Expect_image_files = [join(folder, "imagesTr", c + ".nii.gz") for i in range(num_modalities)]

I changed it and it works!

Batwan01 commented 6 days ago

utils.py

for mod in range(num_modalities):

cur_pat.append(join(base_folder_splitted, "imagesTr", tr['image'].split("/")[-1][:-7] +

#                    "_%04.0d.nii.gz" % mod))
cur_pat.append(join(base_folder_splitted, "imagesTr", tr['image'].split("/")[-1][:-7] + ".nii.gz"))

After modifying the contents of _%04.0d.nii.gz, even the train worked properly.

I wonder what part I made a mistake in