dlunion / DBFace

DBFace is a real-time, single-stage detector for face detection, with faster speed and higher accuracy
1.35k stars 301 forks source link

Any training tricks? #3

Open lishiyuwhu opened 4 years ago

lishiyuwhu commented 4 years ago

I trained your model, but the performance is not so goods. On widerFace Hard set it reached 0.792(yours is 0.847 ).

Could you please show some traning tricks, or upload your train.py?

dlunion commented 4 years ago

0.792 is right number, you could check table here, DBFace-MobileNetV3 (Ours) HardSet. Usually we will use the WiderFace evaluation method, using 0.5IoU as the evaluation matching threshold.

0.847 is calculated for some evaluation methods using 0.4IoU (eg CenterFace). It is not recommended.

The training code and detailed instructions will be announced in the near future, please wait for a while

tfygg commented 4 years ago

0.792 is right number, you could check table here, DBFace-MobileNetV3 (Ours) HardSet. Usually we will use the WiderFace evaluation method, using 0.5IoU as the evaluation matching threshold.

0.847 is calculated for some evaluation methods using 0.4IoU (eg CenterFace). It is not recommended.

The training code and detailed instructions will be announced in the near future, please wait for a while

Why u said centerface used 0.4IoU for widerface evaluation? I tested centerface early and used 0.5IoU, the acc is not problem.

dlunion commented 4 years ago

0.792 is right number, you could check table here, DBFace-MobileNetV3 (Ours) HardSet. Usually we will use the WiderFace evaluation method, using 0.5IoU as the evaluation matching threshold. 0.847 is calculated for some evaluation methods using 0.4IoU (eg CenterFace). It is not recommended. The training code and detailed instructions will be announced in the near future, please wait for a while

Why u said centerface used 0.4IoU for widerface evaluation? I tested centerface early and used 0.5IoU, the acc is not problem.

Ask the author of CenterFace to know that it uses the Python Code for WiderFace evaluation, but no specific code is provided. When evaluating through third-party reproduction code, the author's OIS results are basically reproduced, but the python code used is IoU0.4. When we evaluated using the official Matlab code of WiderFace, the results of CenterFace were seriously mismatched, and HardSet was around 0.70.

If our conclusion is not rigorous, or there is indeed a mistake, thank you for your correction, I will amend the wrong report and apologize.

tfygg commented 4 years ago

0.792 is right number, you could check table here, DBFace-MobileNetV3 (Ours) HardSet. Usually we will use the WiderFace evaluation method, using 0.5IoU as the evaluation matching threshold. 0.847 is calculated for some evaluation methods using 0.4IoU (eg CenterFace). It is not recommended. The training code and detailed instructions will be announced in the near future, please wait for a while

Why u said centerface used 0.4IoU for widerface evaluation? I tested centerface early and used 0.5IoU, the acc is not problem.

Ask the author of CenterFace to know that it uses the Python Code for WiderFace evaluation, but no specific code is provided. When evaluating through third-party reproduction code, the author's OIS results are basically reproduced, but the python code used is IoU0.4. When we evaluated using the official Matlab code of WiderFace, the results of CenterFace were seriously mismatched, and HardSet was around 0.70.

If our conclusion is not rigorous, or there is indeed a mistake, thank you for your correction, I will amend the wrong report and apologize.

I used the this code to get results of Widerface val&test dataset, and used the official Matlab code of WiderFace to evaluated. And the accuracy is no problem. https://github.com/Star-Clouds/CenterFace/blob/c932596bcb6015acf73fb7eb26f95d40acb11666/prj-python/demo.py#L70

There's something wrong with the old version. And you can use the lasted verison to evaluate.

dlunion commented 4 years ago

I may have something wrong, and I am confirming it. Thank you

tfygg commented 4 years ago

I may have something wrong, and I am confirming it. Thank you

I don't know where the problem is, and waiting for your confirmation Is there any result?

dlunion commented 4 years ago

我发现了问题所在,原因是centerFace做评估时,只做了nms0.3和threshold0.05,并没有做maxpool这类局部极值并且取topk的操作,这导致了很多的不同。尤其是密集的hard set时,是很不一样的。 我们的测试方法都是基于maxpool3x3+topk1000来做的。这是与作者不同的地方 也因此,我暂时去掉对centerFace误导的部分readme,谢谢提醒

因为centerFace的评估方式造成框贼多,运行速度很慢,因此没有很快得到结论,还在确认中。

tfygg commented 4 years ago

以下是论文原文的摘取: Furthermore, we also test on WIDER FACE not only with the original image but also with a single inference, our CenterFace also produces the good average precision (AP) in all the subsets of both validation sets, i.e., 92.2% (Easy), 91.1% (Medium) and 78.2% (Hard) for validation set.

dlunion commented 4 years ago

嗯嗯嗯,因此后处理的不同,也就造成了结果的不同

nttstar commented 4 years ago

I believe the number of 0.4 means the NMS IOU threshold, instead of evaluation IOU.

dlunion commented 4 years ago

I believe the number of 0.4 means the NMS IOU threshold, instead of evaluation IOU.

他的nms阈值是0.3,confidence=0.05,并且后处理做法是尽可能得分高的方式(没有取局部极值),实际使用并不会这么做,而且评估速度异常的慢(因为产生的框极其多)

dlunion commented 4 years ago

所以是我错误的理解了他的评估方法造成的误解。抱歉。

dlunion commented 4 years ago

当我使用同样的评估方法评测dbface时,得分是能够提升1个点,在hardset上

SyGoing commented 4 years ago

那dbface的confidence阈值时多少呢 0.5,0.2,还是0.4,我直接在centernet框架下训练人脸检测,和centerface不同;wilderface上测试640x640输入,iou=0.5,confidence=0.2, 模型是基于mobilenetv2设计的结构上和centerface也不太一样,最后的评测结果: easy:0.897 medium:0.874 hard:0.753; 后处理我完全按照centernet来 有maxpooling . 之前对于centerface的指标如何测试得到的感到困惑,现在貌似明白了。。。。。