sfzhang15 / ATSS

Bridging the Gap Between Anchor-based and Anchor-free Detection via Adaptive Training Sample Selection, CVPR, Oral, 2020
Other
1.08k stars 162 forks source link

A small bug. #90

Open aa1234241 opened 3 years ago

aa1234241 commented 3 years ago

Hello, Thanks for your excellent work! I found that the ATSS threshold may not work when using private dataset. The ATSS threshold used in the paper is defined as mean(IOU)+std(IOU). This works perfectly for coco dataset. However, when using other dataset, it is possible that no anchor's IOU could above this threshold. The core is, there are some distributions in which the maximum value is smaller than (std+mean) value.

For instance, when testing my dataset, an instance on an image I get these candidate anchors IOU:[0.5354, 0.5354, 0.5354, 0.5354, 0.5354, 0.5354, 0.4831, 0.4668, 0.4831,0.4670, 0.4670, 0.4670, 0.4670, 0.4460, 0.4670, 0.4670, 0.4460, 0.4460,0.1167, 0.1167, 0.1167, 0.1167, 0.1167, 0.1167, 0.1167, 0.1167, 0.1167]. And the std+mean is larger than the maximum value. Thus no pos_ind will be selected for this instance.

A toy example for this is: x=(1,5,5,5) mean(x)+std(x) 5.73 To solve my issue, when no pos_ind is selected, I replace the threshold by the (max IOU value-0.01).