isyanan1024 / FaceBoxes

A PyTorch implementation of FaceBoxes: A CPU Real-time Face Detector with High Accuracy.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FaceBoxes in PyTorch

严安

PyTorch 实现的 FaceBoxes: A CPU Real-time Face Detector with High Accuracy

安装

  1. PyTorch版本大雨1.0.0

  2. 编译nms:

./make.sh

代码基于Python3+实现

训练

  1. 将图片和voc格式的xml文件分别放到/data/WIDER_FACE/images和/data/WIDER_FACE/annotations下(标注数据最好是正方形,anchor设定的是1:1)
  2. 运行/data/WIDER_FACE/select_samples.py文件,将数据分成训练集和数据集
python select_samples.py -i ./images -s 0.1 -t ./test -c 1
  1. 生成文件列表文件
python img_list.py --imgPath ./images
  1. 根据任务修改类别和具体的类别名称

修改data/wider_voc.py WIDER_CLASSES = ( 'background', 'face','face_mask')

和train.py目录下的classes

  1. 训练模型
python train.py
  1. 只测试人脸一类运行python test.py,否则运行python test2.py

评估

参考目标检测评估程序

About

A PyTorch implementation of FaceBoxes: A CPU Real-time Face Detector with High Accuracy.

License:MIT License


Languages

Language:Python 92.7%Language:Cuda 6.9%Language:C++ 0.2%Language:Shell 0.1%