supervision/tests/metrics
Panagiota Moraiti acbaf4ff25
Correct confusion matrix calculation-function `evaluate_detection_batch` (#1853)
* Correct confusion matrix calculation-function evaluate_detection_batch
* Correct confusion matrix computation
* Add 3 more tests for empty Detections-GTs
* Minor changes in too-long lines corrected
* Replace deprecated mock_detections with _create_detections
* Fix indentation in test assertions and add missing `self` parameter in `test_confusion_matrix`.
* Update metric computations to improve numerical stability and replace deprecated NumPy functions
* Add IoU+class matching tests and synthetic dataset fixtures for detection metrics
* Use `Optional` for type hinting `classes` parameter in `_yolo_dataset_factory`. Import `Optional` from `typing`.
* Refactor detection metric tests to simplify confusion matrix assertions and enhance IoU+class matching validation.
* Apply suggestions from code review
* fix(pre_commit): 🎨 auto format pre-commit hooks

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Jirka Borovec <6035284+Borda@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-12 18:54:00 +09:00
..
__init__.py refactor: reorganize project structure and update module imports (#2112) 2026-02-03 15:24:47 +01:00
conftest.py Correct confusion matrix calculation-function `evaluate_detection_batch` (#1853) 2026-02-12 18:54:00 +09:00
test_detection.py Correct confusion matrix calculation-function `evaluate_detection_batch` (#1853) 2026-02-12 18:54:00 +09: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 refactor: reorganize project structure and update module imports (#2112) 2026-02-03 15:24:47 +01:00
test_mean_average_precision_area.py refactor: reorganize project structure and update module imports (#2112) 2026-02-03 15:24:47 +01:00
test_mean_average_recall.py Correct confusion matrix calculation-function `evaluate_detection_batch` (#1853) 2026-02-12 18:54:00 +09: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