soeaver / caffe-model

Caffe models (including classification, detection and segmentation) and deploy files for famouse networks
MIT License
1.28k stars 626 forks source link

About focal loss for det #43

Closed zhanglonghao1992 closed 6 years ago

zhanglonghao1992 commented 7 years ago

Hi:) Have you tried focal loss on FPN or other one-stage networks for detection? I dont have the FPN code,so I use RON, which is very similar to FPN.I just delete the rpn and add a python target_layer to generate anchor target and labels for every layer used to predict. Focal loss is used to replace softmax loss for cls. But when i begin to train ,the loss is very small and weird, i think maybe sth wrong with my target_layer or my network. I'm wondering how to change a two-stage net to a one-stage net and how to design the python layer to generate bbox_target,bbox inside outside weight and labels? Have you change the FPN?