-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Hi scientists,
I encounter a problem regarding random crop when I'm implementing your tutorial of UNETR.
My image size is(80,80,80), and roi size is (48,48,48)
but it raises a error
raise ValueError("The size of the proposed random crop ROI is larger than the image size.")
ValueError: The size of the proposed random crop ROI is larger than the image size.
I am confused because it is actually smaller.
Could you please help me ?
Thanks!
The changes I have done:
model = UNETR(
in_channels=1,
out_channels=5,
img_size=(80, 80, 80),
feature_size=16,
hidden_size=768,
mlp_dim=3072,
num_heads=12,
pos_embed="perceptron",
norm_name="instance",
res_block=True,
dropout_rate=0.0,
).to(device)
RandCropByPosNegLabeld(
keys=["image", "label"],
label_key="label",
spatial_size=(48, 48, 48),
pos=1,
neg=1,
num_samples=4,
image_key="image",
image_threshold=0,
),