crop image in UNETR #4125
Replies: 2 comments
-
Hi @Ouyuxuan623 , The About the Thanks in advance. |
Beta Was this translation helpful? Give feedback.
-
If random crop is not used, then the input will be same as the original image size, whether re-sampled or not, which can be problematic for UNETR, since it expects a fixed size resolution due to its patch embedding layer. I recommend using random crop. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I am a little confused about this "allow smaller" in Monai.transforms, does it mean some of the image, especially the margin parts won' t be used in training?
Besides, in my last attempt of UNETR , I tried not to use the random crop, with a image size of 646464 , will the data be loaded in the model still be of the same size?
I deleted these two: (https://github.com/Project-MONAI/tutorials/blob/master/3d_segmentation/unetr_btcv_segmentation_3d.ipynb)
CropForegroundd(keys=["image", "label"], source_key="image"),
RandCropByPosNegLabeld(
keys=["image", "label"],
label_key="label",
spatial_size=(96, 96, 96),
pos=1,
neg=1,
num_samples=4,
image_key="image",
image_threshold=0,
),
Thanks!
I really appreciate your help!
Beta Was this translation helpful? Give feedback.
All reactions