-
Notifications
You must be signed in to change notification settings - Fork 7k
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
[proto] Speed-up h/v bboxes flip ops #6877
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking great Victor, just one more optimization:
c79ff5a
to
9fb431c
Compare
bounding_box = convert_format_bounding_box( | ||
bounding_box.clone(), old_format=format, new_format=features.BoundingBoxFormat.XYXY, inplace=True | ||
).reshape(-1, 4) | ||
bounding_box = bounding_box.clone().reshape(-1, 4) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, there is an implicit "bug fix" or feature when previously we were transforming CXCYWH into XYXY and back with long dtype we had +/- 1 data loss. This does not happen here anymore...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Hey @vfdev-5! You merged this PR, but no labels were added. The list of valid labels is available at https://github.com/pytorch/vision/blob/main/.github/process_commit.py |
Summary: * [proto][tests] Added ref functions for h/v flips * Better dtype handling in reference_affine_bounding_box_helper * [proto] Speed-up h/v bboxes flip ops * Use more inplace ops * Removed _old methods * Fixed jit issue using a bit slower version Reviewed By: datumbox Differential Revision: D41020548 fbshipit-source-id: de13c57a20c3dd7c3c6c41f6ad16fd59499bcb86
Depends on #6876
cc @datumbox @bjuncek @pmeier