We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reproducer:
>>> mask = torch.zeros([1, 4, 4]) >>> mask[0, 0:2, 0:2] = torch.ones([2, 2]) >>> mask tensor([[[1., 1., 0., 0.], [1., 1., 0., 0.], [0., 0., 0., 0.], [0., 0., 0., 0.]]]) >>> MaskNodes.MaskToRegion().get_region(mask, 0, 'multiple_of', 2, 2, 0, 0, 'match_ratio') (tensor([[[1., 1., 1., 0.], [1., 1., 1., 0.], [1., 1., 1., 0.], [0., 0., 0., 0.]]]),)
I believe the width/height calculation is wrong? it should rather be:
width = max_x - min_x + 1 height = max_y - min_y + 1
The text was updated successfully, but these errors were encountered:
Also this code should probably clamp max_x/max_y to the mask's max, ie. mask_width - 1 and mask_height - 1.
max_x
max_y
mask_width - 1
mask_height - 1
Sorry, something went wrong.
No branches or pull requests
Reproducer:
I believe the width/height calculation is wrong? it should rather be:
The text was updated successfully, but these errors were encountered: