Skip to content

The implementation of focal loss proposed on "Focal Loss for Dense Object Detection" by KM He.

License

Notifications You must be signed in to change notification settings

DeepRRL/Focal-Loss-implement-on-Tensorflow

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Focal-Loss-implement-on-Tensorflow

This is the implementation(unofficial version) of focal loss proposed on Focal Loss for Dense Object Detection by KM He. After implement focal loss formular I have tested on SSD_MobileNet Network on COCO datasets. The following is about the tensorboard results and analysis:

  1. The [email protected] of focal loss implementation(num_hard_example=20000, max_neg_per_pos=1000, max_total_detection=20000) are about 3% higher than original model(num_hard_example=2000, max_neg_per_pos=100, max_total_detection=100), about 29% and 26% respectively.

MAP and Loss MAP of some cates

 2. However, why do focal loss can achive so much improvement? Here we show some evaluation images and then we may find the answer. Focal loss do not detect the low percentage object, this may have a good precision but bad recall. But the core viewpoint of the paper is focals on the hard examples while ignore the easy examples. I don't know the reason.

Eval image result comp

 Conclusion: Maybe Focal loss can have a better precision(MAP) but may have worse recall.(personal opinion)

About

The implementation of focal loss proposed on "Focal Loss for Dense Object Detection" by KM He.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • Python 100.0%