supervision/tests/metrics
Shahid Ul Islam a549f44792
Add OBB support to ConfusionMatrix via MetricTarget (#2247)
* feat(metrics): OBB support in ConfusionMatrix, MASKS guard, shape validation
* refactor(tests): extract reusable ConfusionMatrix MASKS test cases
* refine(metrics): exclude metric_target from ConfusionMatrix.__eq__
* refactor(metrics): consolidate _assert_supported_target call sites
* fix(metrics): normalise OBB (N,4,2) shape explicitly in detections_to_tensor
* test(metrics): add OBB wrong-target-cols case to validate_input_tensors
* test(metrics): add OBB edge-case parametrize cases to detections_to_tensor
* test(metrics): replace validate_input_tensors with _validate_input_tensors in test_detection
* refactor(metrics): make ConfusionMatrix unhashable
* fix(metrics): add shape validation to evaluate_detection_batch
* fix(metrics): cast class_id to float32 in detections_to_tensor
* test(metrics): fix test_evaluate_detection_batch targets shape

---------

Co-authored-by: jirka <6035284+Borda@users.noreply.github.com>
Co-authored-by: Claude Code <noreply@anthropic.com>
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-06-10 13:29:33 +02:00
..
__init__.py
conftest.py Correct confusion matrix calculation-function `evaluate_detection_batch` (#1853) 2026-02-12 18:54:00 +09:00
test_detection.py Add OBB support to ConfusionMatrix via MetricTarget (#2247) 2026-06-10 13:29:33 +02:00
test_f1_score.py Add `match` arguments to all `pytest.raises` for more precise error validation in tests (#2145) 2026-02-10 21:22:55 +09:00
test_mean_average_precision.py Fix OBB IoU for non-square canvases (#2282) 2026-06-01 09:20:38 +02:00
test_mean_average_precision_area.py
test_mean_average_recall.py Correct confusion matrix calculation-function `evaluate_detection_batch` (#1853) 2026-02-12 18:54:00 +09:00
test_oriented_bounding_box_metrics.py Fix OBB IoU for non-square canvases (#2282) 2026-06-01 09:20:38 +02:00
test_precision.py Add `match` arguments to all `pytest.raises` for more precise error validation in tests (#2145) 2026-02-10 21:22:55 +09:00
test_recall.py Add `match` arguments to all `pytest.raises` for more precise error validation in tests (#2145) 2026-02-10 21:22:55 +09:00