Назад к подготовке

IoU-метрики детекции и one-to-one matching

IoU-метрики детекции и one-to-one matching

Ответить самому

Сначала сформулируйте ответ как на собеседовании, затем откройте разбор и оцените себя.

Загрузка

Короткий ответ

Naive averages ignore duplicate predictions and missed objects. Use confidence thresholds and one-to-one matching by IoU, then count TP/FP/FN or compute AP across thresholds.

Полный разбор

A metric that simply averages IoU over all pairs, or takes the best IoU for every ground truth without penalizing extra predictions, can be gamed by emitting many boxes. The model may get a high maximum somewhere while creating many false positives.

For a fixed confidence threshold, build candidate matches between predictions and ground truth using an IoU threshold. Then enforce one-to-one matching: each prediction and each ground-truth object can participate in at most one match. Matched pairs are true positives, unmatched predictions are false positives and unmatched ground truth objects are false negatives. Depending on the product, matching can be greedy, Hungarian or another assignment strategy.

Average Precision extends the idea across confidence thresholds and is useful when predictions have scores. For a final production threshold, TP/FP/FN, precision, recall and mean matched IoU are often easier to reason about.

Теория

Detection evaluation combines localization quality with counting and duplicate-control through matching.

Типичные ошибки

  • Ignore extra predicted boxes.
  • Allow one prediction to match multiple ground-truth objects.
  • Use AP when there are no scores or thresholds to sweep.

Как отвечать на собеседовании

  • State what happens to unmatched predictions and unmatched ground truth.
  • Mention that the right matching policy depends on the product.