jshtok / RepMet

Few-shot detection for visual categories
Apache License 2.0
108 stars 18 forks source link

about output probability #6

Closed liyangliu closed 4 years ago

liyangliu commented 4 years ago

Hi, @jshtok,

In the paper the foreground probability and background probability are computed as follows, image image And actually in the code you seem to output another probability by adding a softmax activation after the above probability scaled by cfg.network.SOFTMAX_MUL during training https://github.com/jshtok/RepMet/blob/d5b13e01940bbb7ed59dd1ff073e03c0808f76c0/fpn/symbols/resnet_v1_101_fpn_dcn_rcnn_oneshot_v3.py#L1159-L1160 and in testing you output two sets of probability, one is the original one as in the paper cls_score_orig, and the other is scaled by cfg.network.SOFTMAX_MUL cls_prob. https://github.com/jshtok/RepMet/blob/d5b13e01940bbb7ed59dd1ff073e03c0808f76c0/fpn/symbols/resnet_v1_101_fpn_dcn_rcnn_oneshot_v3.py#L1253-L1261 So what probability do you use for the final output detection results? Thanks.

jshtok commented 4 years ago

Dear Liyang,

There is a parameter '--scores_field', with default='cls_prob_reshape', which is the cls_prob before the rescaling. This is the one used in experiments. We experimented with the scaled scores, but their performance was lower.