Skip to content

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

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

AshAnand34
Copy link

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:

  • Added the use_oriented_boxes parameter to the from_detections, from_tensors, and evaluate_detection_batch methods, allowing users to toggle between axis-aligned and oriented bounding box IoU calculations.
  • Updated the IoU computation logic to use oriented_box_iou_batch when use_oriented_boxes is set to True. This ensures accurate IoU calculations for OBBs.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

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

  • Docs updated? What were the changes:
  • Enhanced the example in the from_detections method's docstring to demonstrate how to use the use_oriented_boxes parameter with both axis-aligned and oriented bounding boxes.

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

Successfully merging this pull request may close these issues.

1 participant