npinto/felzenszwalb_cvpr2008 — comment on commit df4860c14a8714be9c3294c814b5fbba7593a2a0
File:  line 0
By quantombone:

There have been many late-nights hour discussion with my and my fellow vision hackers at CMU about this strange asymmetry in Felzenszwalb et al's nms.m (which doesn't actually use the standard overlap score criterion). At first I thought this was a bug, but I found in my experiments it doesn't really matter whether you set the divisor as the "correct value" or Pedro's value.

I think this was done based on observing how objects of the same category occlude each other. Think of group of people. If a smaller object region occludes a larger object region, then we expect the smaller object to be on the foreground (with a high recognition score) and the larger object to the behind it (and have a lower score). nms.m will reject the configuration two detections where one is "background/larger/high-scoring" and the other is "foreground/smaller/low-scoring", but glady keeps "background/larger/low-scoring" with "foreground/smaller/high-scoring"

You can confirm:

b = [1 1 100 100 1.0; 40 40 70 70 0.8]
nms(b)
>> ans = [1 1 100 100 1.0]
"here the code doesn't want to keep this configuration of two boxes, so it removes the low scoring detection"

b = [1 1 100 100 0.8; 40 40 70 70 1.0]
nms(b,0.5)
>> ans = [40 40 70 70 1.0; 1 1 100 100 0.8]
"here the code is willing to keep this configuration of boxes, so it returns both (sorted)"