zimenglan-sysu-512 / Focal-Loss

loss layer of implementation
125 stars 41 forks source link

How about the result of SSD with focal-loss? #4

Open bailvwangzi opened 7 years ago

bailvwangzi commented 7 years ago

I try to merge your focal-loss with SSD, the training loss can converge to 1.x, but the testset mAP is not as well as OHEM method. Have you test focal-loss on any dataset?

zimenglan-sysu-512 commented 7 years ago

Hi @bailvwangzi,

I only test focal-loss on my own dataset, found that it drops a little performance. so sad.

birdwcp commented 7 years ago

@bailvwangzi Did you use MinehardExamples() when merged focal-loss with SSD ?

bailvwangzi commented 7 years ago

@birdwcp I just change mining_type to NONE. So MinehardExamples() will not do hard example mining, just compute num_matches.

zimenglan-sysu-512 commented 7 years ago

hi @bailvwangzi, alpha = 1 and gamma=3 can boost 1.4% mAP on pascal voc 2007 testset using pvanet.

bailvwangzi commented 7 years ago

@zimenglan-sysu-512 i have some questions, 1.how many iterations have you trained? In the first few iterations the loss can be very large or NAN? 2.how to initialize the network? just use imagenet to finetune? 3.the final loss = ? thanks!

bailvwangzi commented 7 years ago

@zimenglan-sysu-512 you use the two-stage method pvanet? not ssd?

zimenglan-sysu-512 commented 7 years ago

hi @bailvwangzi, it's my friend's results. yes, use two stages (PVANET), in which we replace the softmax loss with focal loss in Fast RCNN instead of RPN.

zimenglan-sysu-512 commented 7 years ago

@bailvwangzi, since it's my friend's results, so i can't give you the loss, and the hyper-parameters.

bailvwangzi commented 7 years ago

@zimenglan-sysu-512 since pvanet not use OHEM, i think the 1.4% mAP boost is unfair to say focal loss is better than OHEM.

zimenglan-sysu-512 commented 7 years ago

hi @bailvwangzi, here i don't compare it with ohem, i just want to prove focal loss works or not.

bailvwangzi commented 7 years ago

I think focal loss can be better than softmaxWithLoss or sigmoidCrossEntropyLoss , but it's more meaningful to prove focal loss is better than ohem, since the paper get significant improvements. image

cyliu7 commented 6 years ago

hi, @zimenglan-sysu-512 . In two stage network, there are two softmaxloss during training, RPN's softmaxloss and Fast rcnn's softmaxloss. which loss did you replace with focal loss?

zimenglan-sysu-512 commented 6 years ago

hi @liuchy666, i replace the softmax loss of RCNN with focal loss.