Skip to content
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

Add box_area_center and box_iou_center functions for cxcywh format with tests #8992

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

alperenunlu
Copy link

Related #8961

This pull request introduces new utility functions for handling bounding boxes and adds corresponding tests. The main changes include the addition of box_area_center and box_iou_center functions, as well as comprehensive tests to ensure their correctness.

New utility functions:

  • torchvision/ops/boxes.py: Added box_area_center function to compute the area of bounding boxes specified by their center coordinates.
  • torchvision/ops/boxes.py: Added box_iou_center function to compute the intersection-over-union (IoU) for bounding boxes specified by their center coordinates.

Documentation updates:

  • docs/source/ops.rst: Updated the documentation to include box_area_center and box_iou_center.

Test additions:

  • test/test_ops.py: Added TestBoxAreaCenter class with tests for box_area_center function.
  • test/test_ops.py: Added TestBoxIouCenter class with tests for box_iou_center function.

Module initialization:

Copy link

pytorch-bot bot commented Mar 22, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/vision/8992

Note: Links to docs will display an error until the docs builds have been completed.

This comment was automatically generated by Dr. CI and updates every 15 minutes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants