# FaceBoxes **Repository Path**: srx-coco/FaceBoxes ## Basic Information - **Project Name**: FaceBoxes - **Description**: FaceBoxes: A CPU Real-time Face Detector with High Accuracy - **Primary Language**: C++ - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2018-08-13 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## Faceboxes 完整复现 + 经作者同意,我们更新了完整复现 @[lippman1125](https://github.com/lippman1125) + [原始不需要修改caffe版本参见](https://github.com/zeusees/FaceBoxes/tree/master/faceboxes-without-dense),该版本没有做稠密化。 + 更新了一版人脸识别windows demo, 链接: https://pan.baidu.com/s/1rKgUWtj3AIfHqjn_yARQHg 密码: xksi ### 1. CAFFE安装:
--- Makefile.config已经修改了好了,使用GPU的方式
所以直接使用下面的命令编译:
```C make -j8 # Make sure to include $CAFFE_ROOT/python to your PYTHONPATH. make pycaffe make test -j8 # (Optional) make runtest -j8 ``` ### 2. 数据处理:
--- >>(1) 利用脚本wider_face_2_voc.py脚本把wider_face数据转换成VOC格式。并遮盖掉小于20x20的人脸。
>> 脚本的位置在: ![script](https://github.com/lippman1125/github_images/blob/master/faceboxes_images/wider_2_voc_script.jpg) >>(2) 在wider_face_2_voc.py的同一级目录中创建wider_face文件夹,放解压好下载的wider数据,如图:
![data](https://github.com/lippman1125/github_images/blob/master/faceboxes_images/wider_2_voc.jpg) >>(3) 运行wider_face_2_voc.py脚本,在wider_face文件夹中会生成VOC格式的数据,如图:
![data](https://github.com/lippman1125/github_images/blob/master/faceboxes_images/wider_2_voc_data.jpg) >>(4) 生成的图片会把小于20x20的人脸用图像均值覆盖掉,因为太小的人脸,训练时不容易收敛,如图:
![mask](https://github.com/lippman1125/github_images/blob/master/faceboxes_images/wider_small_face_mask.jpg) >>(5) 利用data/FACE文件中的脚本,把VOC格式转换成LMDB格式,如图:
![lmdb](https://github.com/lippman1125/github_images/blob/master/faceboxes_images/wider_voc_2_lmdb.jpg) >>在caffe/data目录下创建faces_database文件夹,拷贝wider_face文件夹(前面生成的VOC格式数据),layout如图:
![database](https://github.com/lippman1125/github_images/blob/master/faceboxes_images/faces_database.bmp) >> ```C cd caffe \# Create the trainval.txt, test.txt, and test_name_size.txt in data/FACE/ ./data/FACE/create_list.sh \# You can modify the parameters in create_data.sh if needed. \# It will create lmdb files for trainval and test with encoded original image: \# data/faces_database/FACE/lmdb/FACE_trainval_lmdb \# data/faces_database/FACE/lmdb/FACE_test_lmdb \# and make soft links at examples/FACE/ ./data/FACE/create_data.sh ``` ### 3. 训练:
--- >> 训练需要的参数文件和网络文件位置如图: >>![train](https://github.com/lippman1125/github_images/blob/master/faceboxes_images/faceboxes_train.jpg) >> 运行以下命令开始训练:
>> ./build/tools/caffe train --solver examples/faceboxes/solver.prototxt ### 4. 测评:
--- >> 测评脚本以及模型文件位置如图: ![test](https://github.com/lippman1125/github_images/blob/master/faceboxes_images/faceboxes_demo.jpg) >> FDDB上的测评结果(discontinuous)如图:
![result](https://github.com/lippman1125/github_images/blob/master/faceboxes_images/faceboxes_roc_train.jpg) >> 论文中的结果:
![origin](https://github.com/lippman1125/github_images/blob/master/faceboxes_images/faceboxes_roc_origin.jpg) >> 效果图:
![demo](https://github.com/lippman1125/github_images/blob/master/faceboxes_images/img_demo.jpg) ### 5. 参考:
--- >>参考的仓库:https://github.com/lsy17096535/faceboxes ### 6. 优化:
--- >>train.prototxt支持Anchor densification strategy