Current Situation
there is no way to operate rotated bbox IoU at scale.
Expected Situation
Implement and export the torch/vision ops : https://github.com/pytorch/vision/tree/main/torchvision/csrc/ops :
- Implemented Rotated box iou calculation backend using C++ on CPU.
- Implemented rotated_box_iou function to compute Intersection over Union (IoU) between rotated bounding boxes.
- The public API follows the existing box_iou pattern and supports all three rotated box formats: cxcywhr, xywhr, and xyxyxyxy.
Proposed Test Plan: see (pytorch/vision#9379)
Added TestRotatedBoxIou test class with comprehensive tests:
Core IoU test with 4 boxes (including 45° rotated box) across all three formats
Rotation behavior tests (90°, 180°, 45°, negative angles)
Edge case tests (containment, zero area)
API contract tests (output shape, invalid format, format consistency)
Current Situation
there is no way to operate rotated bbox IoU at scale.
Expected Situation
Implement and export the torch/vision ops : https://github.com/pytorch/vision/tree/main/torchvision/csrc/ops :
Proposed Test Plan: see (pytorch/vision#9379)
Added TestRotatedBoxIou test class with comprehensive tests:
Core IoU test with 4 boxes (including 45° rotated box) across all three formats
Rotation behavior tests (90°, 180°, 45°, negative angles)
Edge case tests (containment, zero area)
API contract tests (output shape, invalid format, format consistency)