[English](https://github.com/Linzaer/Ultra-Light-Fast-Generic-Face-Detector-1MB) | [中文简体](https://github.com/Linzaer/Ultra-Light-Fast-Generic-Face-Detector-1MB/blob/master/README_CN.md )
# Ultra-Light-Fast-Generic-Face-Detector-1MB
# 轻量级人脸检测模型
![img1](https://github.com/Linzaer/Ultra-Light-Fast-Generic-Face-Detector-1MB/blob/master/readme_imgs/27.jpg)
该模型是针对边缘计算设备设计的轻量人脸检测模型。
- 在模型大小上,默认FP32精度下(.pth)文件大小为 **1.04~1.1MB**,推理框架int8量化后大小为 **300KB** 左右。
- 在模型计算量上,320x240的输入分辨率下 **90~109 MFlops**左右。
- 模型有两个版本,version-slim(主干精简速度略快),version-RFB(加入了修改后的RFB模块,精度更高)。
- 提供320x240、640x480不同输入分辨率下使用widerface训练的预训练模型,更好的工作于不同的应用场景。
- 支持onnx导出。
- [提供NCNN C++推理代码](https://github.com/Linzaer/Ultra-Light-Fast-Generic-Face-Detector-1MB/tree/master/ncnn)。
- [提供MNN C++推理代码](https://github.com/Linzaer/Ultra-Light-Fast-Generic-Face-Detector-1MB/tree/master/MNN)、[MNN Python推理代码](https://github.com/Linzaer/Ultra-Light-Fast-Generic-Face-Detector-1MB/tree/master/MNN/python)、[FP32/INT8量化后模型](https://github.com/Linzaer/Ultra-Light-Fast-Generic-Face-Detector-1MB/tree/master/MNN/model)。
- [提供转换后的Caffe model](https://github.com/Linzaer/Ultra-Light-Fast-Generic-Face-Detector-1MB/tree/master/caffe/model) 和 [onnx2caffe 转换代码](https://github.com/Linzaer/Ultra-Light-Fast-Generic-Face-Detector-1MB/tree/master/caffe)。
- [Caffe python 推理代码](https://github.com/Linzaer/Ultra-Light-Fast-Generic-Face-Detector-1MB/blob/master/caffe/ultra_face_caffe_inference.py) 和 [OpencvDNN推理代码](https://github.com/Linzaer/Ultra-Light-Fast-Generic-Face-Detector-1MB/blob/master/caffe/ultra_face_opencvdnn_inference.py)。
## 测试过正常的运行环境
- Ubuntu16.04、Ubuntu18.04、Windows 10(inference)
- Python3.6
- Pytorch1.2
- CUDA10.0 + CUDNN7.6
## 精度、速度、模型大小比较
训练集是使用[Retinaface](https://github.com/deepinsight/insightface/blob/master/RetinaFace/README.md )提供的清理过的widerface标签配合widerface数据集生成VOC训练集(PS:以下测试结果为本人测试,结果可能有部分出入)。
### Widerface测试
- 在WIDER FACE val集测试精度(单尺度