focal loss
Sun-Fan opened this issue · comments
Thanks for releasing the code .Firstly,I want to ask if you have tried the focal loss and if it works. Then i want to ask if you achieve the same map with the refineDet paper. By your table , I see the map is 0.4% higher and i want to ask the reason. And if the inference time is the same as the paper. Thanks again.
It seems to no improvement using the focal loss, 0.4%map is just fluctuation in experiment results. And I did't test the speed very strictly. @Sun-Fan
@yqyao sigmoid focal loss implement seems not right.
origin code:
loss_neg = -1. * torch.pow(1 - P, self.gamma) * torch.log(1 - P) * (
1 - targets) * (1 - alpha_mask)
but according to paper, I think it should be:
loss_neg = -1. * torch.pow(P, self.gamma) * torch.log(1 - P) * (
1 - targets) * (1 - alpha_mask)
@yqyao Please help to confirm it.
Thanks a lot!