Focal-Loss icon indicating copy to clipboard operation
Focal-Loss copied to clipboard

How about the result of SSD with focal-loss?

Open bailvwangzi opened this issue 7 years ago • 13 comments

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?

bailvwangzi avatar Aug 23 '17 14:08 bailvwangzi

Hi @bailvwangzi,

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

zimenglan-sysu-512 avatar Aug 24 '17 01:08 zimenglan-sysu-512

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

birdwcp avatar Aug 31 '17 07:08 birdwcp

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

bailvwangzi avatar Aug 31 '17 10:08 bailvwangzi

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

zimenglan-sysu-512 avatar Sep 08 '17 07:09 zimenglan-sysu-512

@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 avatar Sep 08 '17 08:09 bailvwangzi

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

bailvwangzi avatar Sep 08 '17 08:09 bailvwangzi

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 avatar Sep 08 '17 15:09 zimenglan-sysu-512

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

zimenglan-sysu-512 avatar Sep 08 '17 15:09 zimenglan-sysu-512

@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.

bailvwangzi avatar Sep 12 '17 09:09 bailvwangzi

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

zimenglan-sysu-512 avatar Sep 12 '17 09:09 zimenglan-sysu-512

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

bailvwangzi avatar Sep 12 '17 09:09 bailvwangzi

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?

cyliu7 avatar Nov 30 '17 06:11 cyliu7

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

zimenglan-sysu-512 avatar Nov 30 '17 10:11 zimenglan-sysu-512