tztztztztz / eqlv2

The official implementation of Equalization Loss v1 & v2 (CVPR 2020, 2021) based on MMDetection. https://arxiv.org/abs/2012.08548 https://arxiv.org/abs/2003.05176
Apache License 2.0
155 stars 22 forks source link

About use_sigmoid and softmax cross_entropy #20

Closed Never-Walk-Away closed 2 years ago

Never-Walk-Away commented 2 years ago

Hi, there is have a question about the the loss_cls of bbox_head of roi_head. i think the final calssifier is a Multi classification. why choose sigmoid function instead of softmax function.

tztztztztz commented 2 years ago

I use the sigmoid loss function to model the detection problem as a set of independent tasks, that is: for each proposal, we estimated the probability of being each category, then output all those boxes.

In fact, even with softmax loss, instead of outputting a single box with the highest probability, we output boxes with the corresponding prob.

If you just want to output a single box for a single proposal, you can choose the box with the highest probability, which you can do it in sigmoid as well.

Never-Walk-Away commented 2 years ago

Thank you for your reply! Best wishes for you~~~