YunYang1994 / tensorflow-yolov3

🔥 TensorFlow Code for technical report: "YOLOv3: An Incremental Improvement"
https://yunyang1994.gitee.io/2018/12/28/YOLOv3-算法的一点理解/
MIT License
3.63k stars 1.36k forks source link

Loss function, conf_focal #197

Open Taruio opened 5 years ago

Taruio commented 5 years ago

In function loss_layer(), I find out that you use a coefficient conf_focal. I would like to know is this a Focal Loss? Why alpha in focal loss is always 1? Thanks

RubenS02 commented 5 years ago

Good question, moreover shouldn't we use gamma=0 since the author advised not to use focal loss? Things We tried that didn't work: Focal loss. We tried using focal loss. It dropped our mAP about 2 points. YOLOv3 may already be robust to the problem focal loss is trying to solve because it has separate objectness predictions and conditional class predictions. Thus for most examples there is no loss from the class predictions? Or something? We aren’t totally sure. (https://arxiv.org/abs/1804.02767)

Taruio commented 5 years ago

@RubenS02 I saw that in YOLOv3 article too. And alpha=1 means it just use a half of focal loss. I'm traing both gamma=0 and gamma=2 model. If I get something I'll write it here

RubenS02 commented 5 years ago

@Taruio Thanks I would appreciate that a lot