由yolov3启发搭建的人脸检测模型

最近看了些yolov3和ssd的水文,感觉有些收获,所以基于自己的理解搭建了个人脸检测的模型,在winderface数据集上进行尝试性训练.有一点效果,但还有很大的训练和改进空间.这里把工程share出来,希望有相同爱好的可以一起优化,训练出一个state of art的人脸检测模型.

源码地址(github):

face_detect

如果对你有帮助,给他star鼓励下,谢谢!!!

我的模型

说明:

基于resnet,Bottleneck是一个resnet单元.

在三个特征map上检测人脸,分别是13*13, 26*26, 52*52,因此,每张图片最多能检测13*13+ 26*26+ 52*52个人脸.

损失函数借鉴了yolov2

 

train

首先,修改dataset.py中的数据集所在的路劲,修改为你的winderface所在路劲:

TRAIN_IMG_PATH = "/home/javer/work/dataset/widerface/WIDER_train/images/"
VAL_IMG_PATH = "/home/javer/work/dataset/widerface/WIDER_val/images/"
SPLIT_PATH = "/home/javer/work/dataset/widerface/wider_face_split"

训练命令:

python3.6 train.py -l 0.001 -e 10 -b 5


detailes: -l for learning rate, -e for epoes, -b for batch.
if you want train from last model, add -p True, like this: python3.6 train.py -l 0.001 -e 10 -b 5 -p True

test

python3.6 test.py

eval

python3.6 eval.py -c 0.6 -t 0.5


details: -c for the confidence of box that contains face.
-t for thresh of IOU

shows

 

写在最后

I am still training and optimizing the model, Welcome to do it better together!

communicate with:
QQ group: 704153141

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章