dbolya / tide

A General Toolbox for Identifying Object Detection Errors
https://dbolya.github.io/tide
MIT License
702 stars 115 forks source link

FIX #7 : BoxError and ClassError can match with used detections #8

Closed 0phoff closed 3 years ago

0phoff commented 3 years ago

Hey,

I gave a quick shot at fixing the error discussed in #7. Basically, it involves changing the IoU matrix in 3 different places: BoxError, ClassError, BackgroundError.

BoxError:
Here we use gt_unused_cls instead of gt_cls_iou, because we only want to match for localisation errors with unmatched annotations.

ClassError: Here we use gt_unused_noncls instead of gt_noncls_iou, because we only want to match for classification errors with unmatched annotations.

BackgroundError: Here we use gt_unused_iou instead of gt_iou, because we want to have BackgroundErrors when there is no suiteable unmatched annotation. If we would leave this to gt_iou, it would cause detections that failed the BoxError/ClassError because we know only match with unused annotations to become OtherErrors, while they should in fact be BackgroundErrors (IMO).

0phoff commented 3 years ago

Closing PR, because this is more a case of semantics and not really a mistake in the original code!