-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Enhancement/add obb support confusion matrix #1845
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
base: develop
Are you sure you want to change the base?
Enhancement/add obb support confusion matrix #1845
Conversation
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.
Hi @AshAnand34, thanks for the PR!
Please make sure the tests are passing and not broken.
from supervision.metrics.detection import ConfusionMatrix | ||
|
||
|
||
def test_confusion_matrix_with_obb(): |
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.
This test case is not passing with the current code.
classes: List[str], | ||
conf_threshold: float = 0.3, | ||
iou_threshold: float = 0.5, | ||
use_oriented_boxes: bool = False, |
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.
This option should also be supported for ConfusionMatrix.benchmark
.
Excellent initiative on adding OBB support to confusion matrix evaluation! This enhancement addresses a critical gap for oriented object detection benchmarking. The implementation approach is solid and follows good software engineering practices. Technical Assessment:
Technical Recommendations:
This enhancement will significantly benefit the computer vision community working with oriented detection tasks. The approach aligns well with modern evaluation practices. Best regards, |
Description
This pull request introduces support for evaluating oriented bounding boxes (OBBs) in the confusion matrix calculations within the
supervision
library. The changes include adding a new parameter to enable OBB support, modifying the IoU calculation logic, and adding comprehensive tests to validate the functionality.Enhancements to IoU and Confusion Matrix Calculations:
use_oriented_boxes
parameter to thefrom_detections
,from_tensors
, andevaluate_detection_batch
methods, allowing users to toggle between axis-aligned and oriented bounding box IoU calculations.oriented_box_iou_batch
whenuse_oriented_boxes
is set toTrue
. This ensures accurate IoU calculations for OBBs.Type of change
Please delete options that are not relevant.
How has this change been tested, please provide a testcase or example of how you tested the change?
Added a new test file,
test/metrics/test_confusion_matrix_obb.py
, to validate the confusion matrix functionality with and without OBB support. These tests include scenarios for perfect matches and slight offsets between predictions and ground truth.Docs
from_detections
method's docstring to demonstrate how to use theuse_oriented_boxes
parameter with both axis-aligned and oriented bounding boxes.