experiencor / keras-yolo2

Easy training on custom dataset. Various backends (MobileNet and SqueezeNet) supported. A YOLO demo to detect raccoon run entirely in brower is accessible at https://git.io/vF7vI (not on Windows).
MIT License
1.73k stars 785 forks source link

Modify the loss function to Focal Loss #174

Open PythonImageDeveloper opened 6 years ago

PythonImageDeveloper commented 6 years ago

Hi, is it possible to modify this function to focal loss ? if so , please add this loss.

experiencor commented 6 years ago

@zeynali Yes, it's possible. The code of focal loss in pytorch is here https://github.com/marvis/pytorch-yolo2. Would love if you can contribute.

PythonImageDeveloper commented 6 years ago

@huaijin-chen,@experiencor. Hi, I'm new in keras and DL , If possible you add this scripts to these code.

https://github.com/mkocabas/focal-loss-keras/blob/master/focal_loss.py