MIC-DKFZ / nnUNet

Apache License 2.0
5.91k stars 1.76k forks source link

ValueError: invalid literal for int() with base 10 #906

Closed squaresoft2015 closed 1 year ago

squaresoft2015 commented 2 years ago

When running nnUNet_convert_decathlon_task command, the program stuck at:

Please cite the following paper when using nnUNet:

Isensee, F., Jaeger, P.F., Kohl, S.A.A. et al. "nnU-Net: a self-configuring method for deep learning-based biomedical image segmentation." Nat Methods (2020). https://doi.org/10.1038/s41592-020-01008-z

If you have questions or suggestions, feel free to open an issue at https://github.com/MIC-DKFZ/nnUNet

Traceback (most recent call last): File "/home/cloudam/.conda/envs/nnUNet/bin/nnUNet_plan_and_preprocess", line 33, in sys.exit(load_entry_point('nnunet', 'console_scripts', 'nnUNet_plan_and_preprocess')()) File "/home/cloudam/nnUNet/nnunet/experiment_planning/nnUNet_plan_and_preprocess.py", line 100, in main i = int(i) ValueError: invalid literal for int() with base 10: '/home/cloudam/nnUNet_raw/nnUNet_raw_data/Task02_Heart/'

How can I solve this? Does the path need to be set inside the folder of all the source files? Or the path can be set to any location. Now the path is set as follows:

nnUNet_preprocessed=/home/cloudam/nnUNet_preprocessed RESULTS_FOLDER=/home/cloudam/nnUNet_trained_models nnUNet_raw_data_base=/home/cloudam/nnUNet_raw

FabianIsensee commented 2 years ago

What is the exact command you ran?

squaresoft2015 commented 2 years ago

What is the exact command you ran?

nnUNet_convert_decathlon_task -i /my dataset folder/Task04_Hippocampus

FabianIsensee commented 2 years ago

I just re-downloaded the dataset and ran it on my machine. Works fine :-/ Hard to say what's going on when I cannot reproduce the error Does /my dataset folder/Task04_Hippocampus have imagesTr and labelsTr as subfolders? Is it the original dataset as downloaded from medicaldecathlon.org?

squaresoft2015 commented 2 years ago

The Task04 folder does contain imagesTs and imagesTr subfolders. Anyway, I will try to download the dataset again and check the md5 checksum.

FabianIsensee commented 2 years ago

let me know how it goes :-)

devamsheth21 commented 1 year ago

Hi @FabianIsensee I'm getting the same error "ValueError: invalid literal for int() with base 10: 'set002'" while running the command : nnUNetv2_convert_MSD_dataset -i dataset/nnUNet_raw/Dataset002_Heart

Lars-Kraemer commented 1 year ago

Hi @devamsheth21 , the -i already points to a nnUNet Dataset, this raises this error. From the documentation using nnUNetv2_convert_MSD_dataset -h: -i I Downloaded and extracted MSD dataset folder. CANNOT be nnUNetv1 dataset! Example: /home/fabian/Downloads/Task05_Prostate

This means in your case the command should look something like this, where Task02_Heart is the folder you downloaded from the MSD website: nnUNetv2_convert_MSD_dataset -i .../Downloads/Task02_Heart

Best, Lars