3DUNet-Pytorch icon indicating copy to clipboard operation
3DUNet-Pytorch copied to clipboard

TypeError: Caught TypeError in DataLoader worker process 0.

Open wxr521314 opened this issue 3 years ago • 1 comments

Hi lee-zp Thanks for sharing your code.When I was training my own data, I had the following problem.My data is the data of MRI rectum, and I want to see the dice of tumor.

image

I tried some online methods, but nothing worked.Can you help me ? Best wish

wxr521314 avatar Jul 17 '20 12:07 wxr521314

In line 33 of the file ./utils/common.py: “ if random_x_max < 0 or random_y_max < 0 or random_z_max < 0: return None”. That means when crop size is larger than the image size, the func will return None. One unpack to two variable will cause TypeError: cannot unpack non-iterable NoneType object Please check your data's shape, ensure that the image is read correctly. (I will modify the code to throw the suitable error message )

lee-zq avatar Aug 06 '20 09:08 lee-zq