Help with RandCropByPosNegLabeld #6949
-
|
Hello, I'm a novice in AI and image segmentation. I've added the 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,
),which dictates 4x(96, 96, 96) cropped images to be fed to the network as one image (as I've been reading here); which results in 192 by 192 by 192 images. Thanks in advance, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
Hi @Kiarashdnsh, you can use |
Beta Was this translation helpful? Give feedback.
Hi @Kiarashdnsh, you can use
SlidingWindowInfererto infer andInvertto invert the previously applied transforms.Here are some useful links:
https://github.com/Project-MONAI/tutorials/blob/main/3d_segmentation/spleen_segmentation_3d.ipynb
https://github.com/Project-MONAI/tutorials/blob/main/modules/inverse_transforms_and_test_time_augmentations.ipynb
Thanks!