unsky / focal-loss

Focal loss for Dense Object Detection
483 stars 124 forks source link

About the focal loss layer #6

Open suzhenghang opened 7 years ago

suzhenghang commented 7 years ago

Hi @unsky , The performance in your experiment is amazing. By the way, did you only replace the SoftmaxWithLoss with the focal loss layer in RPN layer or in both RPN and Fast RCNN?

unsky commented 7 years ago

just fast rcnn

suzhenghang commented 7 years ago

@unsky Thanks, did you try to replace the SoftmaxWithLoss in RPN with the focal loss (2 class, fore/back ground)? As the focal loss is used to process the unbalanced foreground-backgroind class.

twmht commented 6 years ago

@unsky and @suzhenghang

I have tried focal loss to rpn, the loss converges very quickly. but the rpn's recall is very low.

I think the problem is that the loss is very low at the beginning (the loss drops 10e-3 within 2k iterations).

thus cause the gradient is very low when doing backward propagation.

here is the loss historgram

_030

Does anyone who applies focal loss to rpn network and works well?