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>
P
Panagiota Moraiti committed
acbaf4ff25ae728751f4d2df783ac89abc3daa9b
Parent: 124be19
Committed by GitHub <noreply@github.com>
on 2/12/2026, 9:54:00 AM