nnUNet icon indicating copy to clipboard operation
nnUNet copied to clipboard

Problem on prepocessing

Open mikami520 opened this issue 2 years ago • 5 comments

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?

IMG_2374

mikami520 avatar Mar 07 '22 20:03 mikami520

Hello @mikami520 Can you please post the command you've used?

duytq99 avatar Mar 08 '22 02:03 duytq99

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

mikami520 avatar Mar 08 '22 02:03 mikami520

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.

duytq99 avatar Mar 08 '22 08:03 duytq99

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.

When I insert that line, do I need to re-install the nnUnet library?

mikami520 avatar Mar 08 '22 15:03 mikami520

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.

duytq99 avatar Mar 09 '22 02:03 duytq99

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 :)

TaWald avatar Aug 09 '23 07:08 TaWald