-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Add box_area_center
and box_iou_center
functions for cxcywh format with tests
#8992
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
Open
alperenunlu
wants to merge
17
commits into
pytorch:main
Choose a base branch
from
alperenunlu:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
cf93d9e
Add box_area_center and box_iou_center for cxcywh format
alperenunlu eac9869
Merge branch 'pytorch:main' into main
alperenunlu 29c5147
Update boxes.py
alperenunlu 14a8fbe
Dispatch style box_area and box_iou
alperenunlu be86a7b
Merge branch 'main' into main
alperenunlu 966108a
Update boxes.py
alperenunlu 09ae6a0
Update boxes.py
alperenunlu 3651f9e
Remove dispatcher
AntoineSimoulin f664b5e
Merge branch 'main' into main
AntoineSimoulin e6a0c09
fix hinting
AntoineSimoulin 55193f2
lint
AntoineSimoulin 7b6a3ea
fix `_box_inter_union` for "xywh" format
AntoineSimoulin adcc878
Re-order with original file structure
AntoineSimoulin 8bc72b6
Keep batch dimension
AntoineSimoulin c509b11
Keep batch dimension (2/2)
AntoineSimoulin 107d2cd
Fix f-string boxes.py
alperenunlu b6e7a4c
Fix docstring boxes.py
alperenunlu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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.
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.
Thanks a lot for the PR and for the benchmarks @alperenunlu !
I agree with @AntoineSimoulin 's suggestion in #8961 (comment) to not expose the new
_center()
functions, and instead just add a newfmt
(orin_fmt
) parameter to the existingbox_area()
andbox_iou()
functions.This will reduce surface area of the API, so it'll be easier to find for users, and easier for us to maintain as well!
For the rest I will let @AntoineSimoulin take a look