Repository navigation
[utils] Rotate integer points and boxes with a float rotation matrix - #2193
Merged
felixdittrich92 merged 1 commit intoOct 30, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2193 +/- ##
=======================================
Coverage 97.74% 97.74%
=======================================
Files 170 170
Lines 10961 10961
=======================================
Hits 10714 10714
Misses 247 247
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
felixdittrich92
approved these changes
Oct 30, 2026
felixdittrich92
left a comment
Collaborator
There was a problem hiding this comment.
Thanks @RavSinghChandan 👍
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
rotate_abs_pointsandrotate_boxesbuilt the rotation matrix with the dtype of the input. For integer coordinates, the cosine and sine were truncated to 0 or 1, sorotate_abs_points(np.array([[10, 0]]), 30)returned[[0, 0]]androtate_boxes(np.array([[0, 0, 1, 1]]), 30, (1, 1))collapsed the box onto the page center.The matrix is now built in floating point (the input dtype when it is already a float one, so float32 and float64 results are unchanged), and
rotate_boxesconverts the boxes to floating point before rotating them