ValueError: The size of the proposed random crop ROI is larger than the image size. #706
-
Hi everyone! I am working with the KiTS21 dataset, and is now just testing another method by using the MONAI pipeline. Only 10 cases of kidney CT scan images are used, where it includes the raw images as well as the segmentation masks. It was working just fine yesterday when I directly implemented the spleen 3D segmentation .ipynb code for it. I attempted to adjust the parameters to my own application, setting the below:
Take note on 3), where I believe is the source of the issue. Can anyone explain why? https://colab.research.google.com/drive/1C0SKDczZGu6JwXX8lZHx5H6tmczRcd5Z#scrollTo=wYc5d-w6YttR This is my code if anyone would want to view it. Note ValueError: The size of the proposed random crop ROI is larger than the image size. My original image size is 512 x 512 x A number of slices, while the proposed spatial size in RandCropByPosNegLabeld is 128,128,64. I am unsure why this error pops up |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @dannyhow12 , Thanks for your interest and experiments here. Thanks. |
Beta Was this translation helpful? Give feedback.
Hi @dannyhow12 ,
Thanks for your interest and experiments here.
I think the root cause is that: your crop ROI is
spatial_size=(128, 128, 64)
, but some of your images afterspacing
transform is smaller than the ROI size. Could you please help pad the image or reduce the ROI?Thanks.