-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Fix _parallelogram_to_bounding_boxes
#9181
New issue
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
Fix _parallelogram_to_bounding_boxes
#9181
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/vision/9181
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New FailureAs of commit 9fcf281 with merge base 64666c7 ( NEW FAILURE - The following job has failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
@AntoineSimoulin has imported this pull request. If you are a Meta employee, you can view this in D80916035. |
@AntoineSimoulin has imported this pull request. If you are a Meta employee, you can view this in D80916035. |
Hey @AntoineSimoulin! You merged this PR, but no labels were added. |
This PR adjust the behavior of
_parallelogram_to_bounding_boxes
. Instead of transforming a parallelogram into a rectangle based on the largest input diagonal, the function returns the minimum area rectangle covering the initial parallelogram. When applying transforms to input rotated bounding boxes, the output tend to be closer to the original boxes and therefore more consistent.We illustrate below the impact when applying the transforms
v2.RandomPerspective(distortion_scale=0.6, p=1.0)
in the tutorial to transforms on Rotated Bounding Boxes.Before fix:

After fix:

cc @vfdev-5