fix box iou rotated - #2964
Open
grimoire wants to merge 2 commits into
Open
Conversation
grimoire
marked this pull request as draft
October 14, 2023 08:18
grimoire
marked this pull request as ready for review
October 18, 2023 02:17
yuki-inaho
added a commit
to yuki-inaho/mmcv
that referenced
this pull request
May 29, 2026
Port open-mmlab#2964 (fixes open-mmlab#2933): the Graham-scan angular sort compared raw cross-products whose magnitude scales with point distance, mis-ordering hull points and yielding wrong rotated-polygon area / IoU. Normalize each vector by its length (sqrt(dot)+1e-6) before the cross-product on both the CUDA/MUSA and CPU paths, and store dist as magnitude. Rotated IoU feeds the RTMDet-OBB assigner (positive-sample selection + loss weighting) and nms_rotated, so this improves training quality. Adapted to the fork's `__CUDACC__ || __MUSACC__` guard. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
#2933 (comment)