Atten4Vis / MS-DETR

[CVPR 2024] The official implementation for "MS-DETR: Efficient DETR Training with Mixed Supervision"
Apache License 2.0
64 stars 3 forks source link

Question about o2m matcher? #3

Open chenzyhust opened 3 months ago

chenzyhust commented 3 months ago

o2m matcher can guarante that each GT will have at least 1 prediction matching?

ZhaoChuyang commented 3 months ago

Hi, it cannot, but this case is rare. The o2m matcher initially computes the matching score between all GTs and all predictions, then assigns each prediction to the GT with the highest score (if the score is above the threshold). When a GT has no predictions with a matching score above the threshold, the matcher assigns the prediction with the highest score to it. This is controlled by the allow_low_quality_matches parameter in Matcher (in matcher_o2m.py), which is set to True by default.

However, there are cases where a GT A has no matched predictions, and the prediction p with the highest score to it is assigned to a different GT B. In this scenario, prediction p remains assigned to B, leaving GT A without any matched predictions.