zylo117 / Yet-Another-EfficientDet-Pytorch

The pytorch re-implement of the official efficientdet with SOTA performance in real time and pretrained weights.
GNU Lesser General Public License v3.0
5.21k stars 1.27k forks source link

zero Reg loss and bad results #543

Open mingcv opened 3 years ago

mingcv commented 3 years ago

I'm training from scratch of EfficientDet-d0 on a dataset which contains 600 images to recognize insulators, which is the only one class. However, when I was both training and evaluating, the Reg loss keeps zero, and the Cls loss first declines then increases and then declines rapidly. Cannot figure out what's happening, is it for lack of data and overfitting happens? But will it bring zero Reg loss? After all, I'm using the minimum version of EfficientDet. Any help, plz! image image

zylo117 commented 3 years ago

reg loss being so low means the anchors config don't fit your targets. You can refer to Q3 here. https://github.com/zylo117/Yet-Another-EfficientDet-Pytorch/issues/386

myarchivedaccount commented 3 years ago

I realize this problem due to unsuitable anchor and IOU. try modifying this line positive_indices = torch.ge(IoU_max, 0.4) --> positive_indices = torch.ge(IoU_max, 0.1) Thanks

zylo117 commented 3 years ago

I realize this problem due to unsuitable anchor and IOU. try modifying this line positive_indices = torch.ge(IoU_max, 0.4) --> positive_indices = torch.ge(IoU_max, 0.1) Thanks

I don't think that's a proper solution, you should instead change anchor ratio to suit your datasets. @buidung2004