lee-zq/3DUNet-Pytorch

File "E:\paper\zzd\lung\3DUNet-Pytorch-master\dataset\dataset_lits2.py", line 45, in get_train_batch_by_index sub_img, sub_label = random_crop_3d(img, label, crop_size) TypeError: 'NoneType' object is not iterable

Opened this issue · 6 comments

When I load the dataset......

Maybe your path of dataset is wrong, please check it

OK, thanks

I'm sure that the path of my dataset is not wrong

The function sitk_read_row () in /utils/common.py is to read the .nii file from the hard disk, you can debug here to check whether the returned data is empty

The same question…

Please check your data's shape, ensure that the image is read correctly.
I have modified the code to throw the suitable error message.