Skip to content
Discussion options

You must be logged in to vote

Hi @ibrahimmanzoor, it's not that RandCropByPosNegLabel can't fix the size for you; it's that your inputs have different sizes, which causes the error to be reported when you get fg and bg indices. Second, it is true that spatial_size does not guarantee that the output will be the same, and you must usually follow it with a ResizeWithPadorCrop.

spatial_size: the spatial size of the crop region e.g. [224, 224, 128].
if a dimension of ROI size is larger than image size, will not crop that dimension of the image.
if its components have non-positive values, the corresponding size of `label` will be …

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@ibrahimmanzoor
Comment options

@KumoLiu
Comment options

@ibrahimmanzoor
Comment options

@KumoLiu
Comment options

Answer selected by ibrahimmanzoor
@ibrahimmanzoor
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #6782 on July 26, 2023 13:50.