由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

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