nnUNet
nnUNet copied to clipboard
Problem on prepocessing
Hi all, I started doing the registration on multiple segmentations (.seg.nrrd) and save it as (nii.gz). Then I used the nnUnet to preprocess the dataset. It gave me errors when cropping the images. As I checked my segmentations and training CTs, they are all 3D images. I have no idea about this issue. Here is the screenshot, could anyone help me with this issue?
Hello @mikami520 Can you please post the command you've used?
Hello @mikami520 Can you please post the command you've used?
Hi @duytq99 Thanks for your response. I use "nnUNet_plan_and_preprocess -t 004 --verify_dataset_integrity" for preprocessing dataset, where 004 is the task id
Hi,
Could you insert the line print(data.shape)
to inspect data dimension at https://github.com/MIC-DKFZ/nnUNet/blob/a7d1d875e8fc3f4e93ca7b51b1ba206711844d92/nnunet/preprocessing/cropping.py#L94 and provide the output?
Thank you.
Hi, Could you insert the line
print(data.shape)
to inspect data dimension athttps://github.com/MIC-DKFZ/nnUNet/blob/a7d1d875e8fc3f4e93ca7b51b1ba206711844d92/nnunet/preprocessing/cropping.py#L94
and provide the output? Thank you.
When I insert that line, do I need to re-install the nnUnet library?
Yes. You need to do !pip install -e .
otherwise you can run the script directly using python nnunet/experiment_planning/nnUNet_plan_and_preprocess.py -t 004 --verify_dataset_integrity
That data.shape should have 4 elements. If not, I guess there something wrong and you need to trace back more. I usually inspect the value or shape of variable. Hope this can help you figure out what's wrong.
Due to the thread being stale and the release of nnUNetV2, I'll close this issue for now. Should the issue still remain @mikami520, or someone else run into a similar issues, feel free to create a new issue or reopen this one.
Also thanks a lot @duytq99 for the support :)