MS-DETR icon indicating copy to clipboard operation
MS-DETR copied to clipboard

Question about o2m matcher?

Open chenzyhust opened this issue 11 months ago • 4 comments

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

chenzyhust avatar Mar 26 '24 06:03 chenzyhust

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.

ZhaoChuyang avatar Mar 27 '24 03:03 ZhaoChuyang

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.

How to compute the loss of GT A in this condition? ignoring or any other operation?

yuanqianguang avatar Aug 19 '24 02:08 yuanqianguang

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.

How to compute the loss of GT A in this condition? ignoring or any other operation?

Hi, in this case, the loss of GT A is ignoring, treating as the case where no predictions are matched for GT A.

ZhaoChuyang avatar Aug 19 '24 02:08 ZhaoChuyang

Thks so much ^_^

yuanqianguang avatar Aug 19 '24 02:08 yuanqianguang