YonghaoHe / LFFD-A-Light-and-Fast-Face-Detector-for-Edge-Devices

A light and fast one class detection framework for edge devices. We provide face detector, head detector, pedestrian detector, vehicle detector......
MIT License
1.32k stars 329 forks source link

box loss #14

Closed QingL0218 closed 3 years ago

QingL0218 commented 5 years ago

hi Yonghao, i realize your work on pytorch , but when i run my code, the training box loss is too small i.e 5e-02 at beginning, I think the values are wrong. I just to want to know the common range for box loss and conf loss.

YonghaoHe commented 5 years ago

@QingL0218 The concrete values of loss do not matter. In our implemented version, the computation of metric is combined with loss layer. In our view, if the values can reflect the loss trend, the values are valid for metric.

Dreamgang commented 5 years ago

@YonghaoHe 我在训练的时候,会出现loss为nan的情况,请问这是咋回事,我是用自己的数据集去训练的

YonghaoHe commented 5 years ago

@Dreamgang 我们在训练的过程中几乎没有出现过nan,印象里就出现过几次nan. 给你几个建议: 1,把学习率调小,比如从0.1->0.05,还有适当增加batchsize(32是我们常用的) 2,查看数据集里面是否有严重噪声数据,一些严重噪声数据会瞬间破坏参数的学习

Wenstery commented 5 years ago

@YonghaoHe 我在用V2训练时,batch_size设置32,学习率设0.1-0.05间,并且用release出来的v2 10-320 model做pre-train(其实不做pre_train loss 基本也都是nan),一开始只有clc_loss_score0和clc_loss_score1有value,其他loss均为nan, 没有更改过其他代码,data也是用的release出来的widerface pkl文件,请问这问题该怎么解决呀?

YonghaoHe commented 5 years ago

@Wenstery 那这个现象很奇怪,你能把config的设置给我看一眼么.

Wenstery commented 5 years ago

@YonghaoHe 感谢回复!现在重新核对了一些和原始文件的改动,training loss正常了

mifan0208 commented 5 years ago

@Wenstery 你好,请问我在loss回传的时候也遇到了跟你一样的问题,在cls_loss回传中,会出现Nan的现象而且bbox loss下降的比较快,请问遇到这个问题你是怎么解决的呢?

YonghaoHe commented 3 years ago

@QingL0218 @Wenstery PyTorch 版本的LFD已经发布了,详情请关注我的主页,谢谢。