lee-zq / 3DUNet-Pytorch

3DUNet implemented with pytorch
484 stars 108 forks source link

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 #3

Open zzddmmzzdzd opened 4 years ago

zzddmmzzdzd commented 4 years ago

When I load the dataset......

lee-zq commented 4 years ago

Maybe your path of dataset is wrong, please check it

zzddmmzzdzd commented 4 years ago

OK, thanks

zzddmmzzdzd commented 4 years ago

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

lee-zq commented 4 years ago

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

PumayHui commented 4 years ago

The same question…

lee-zq commented 3 years ago

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