mundanePeo / faceRecognition

MIT License
15 stars 1 forks source link

基于京东AI实现的人脸识别系统

项目简介

本项目基于京东AI的人脸识别框架工具集FaceX-Zoo所实现的人脸识别系统项目。

本项目以ArcFace为基本模型,采用半孪生训练法(SSL)。能够实现在现实场景下高质量的人脸检测-人脸识别的端到端系统。主要功能有:

优势介绍

SSL介绍

Semi-Siamese Training for Shallow Face Learning

作者:Hang Du, Hailin Shi, Yuchi Liu, Jun Wang, Zhen Lei, Dan Zeng, Tao Mei

单位:上海大学;京东AI;中科院自动化研究所

论文:https://arxiv.org/abs/2007.08398

代码:https://github.com/dituu/Semi-Siamese-Training

解读:详细解读浅表人脸学习-Semi-Siamese Training for Shallow Face Learning

会议:ECCV 2020 Spotlight

FaceX-Zoo介绍

FaceX-Zoo is a PyTorch toolbox for face recognition. It provides a training module with various supervisory heads and backbones towards state-of-the-art face recognition, as well as a standardized evaluation module which enables to evaluate the models in most of the popular benchmarks just by editing a simple configuration. Also, a simple yet fully functional face SDK is provided for the validation and primary application of the trained models. Rather than including as many as possible of the prior techniques, we enable FaceX-Zoo to easilyupgrade and extend along with the development of face related domains. Please refer to the technical report for more detailed information about this project.

About the name:

"Face" - this repo is mainly for face recognition. "X" - we also aim to provide something beyond face recognition, e.g. face parsing, face lightning. "Zoo" - there include a lot of algorithms and models in this repo. image

FaceX-Zoo架构图

代码:https://github.com/JDAI-CV/FaceX-Zoo.git

论文:https://arxiv.org/pdf/2101.04407.pdf

使用指南

1.克隆本项目到本地

git clone https://github.com/mundanePeo/faceRecognition.git

2.安装相应的python依赖

切换到虚拟环境
cd FaceRecognize
pip install -r requirements.txt

3.安装并启动mysql:mysql可以不要求root权限

4.修改配置文件

cd FaceRecognize/config
vim config.yaml
    1.配置mysql信息
    2.选择启动模式
    3.填写旷世人脸识别API的信息

5.修改启动信息

vim FaceRecognize/controll.sh
host= '0.0.0.0' # 接口启动的主机地址
port=10091 # 接口启动端口

user=apps # 用户名
mysql_path=/home/$user/mysql # mysql的存放路径

6.启动接口

cd FaceRecognize
sh controll.sh start 

结果演示

1.注册

修改restoreData.py中的图片路径
python restoreData.py

result_1

2.识别

修改demo中的图片路径
python demo.py

result_2

3.线上测试结果

日期 准确率 误识率
2021-04-15 0.857 0.143
2021-04-16 1.000 0.000
2021-04-17 1.000 0.000
2021-04-19 0.944 0.056
2021-04-20 0.726 0.274
2021-04-21 0.916 0.084
2021-04-22 0.972 0.028
2021-04-23 0.971 0.029
2021-04-24 1.000 0.000
2021-04-25 1.000 0.000
2021-04-26 0.976 0.024
2021-04-27 0.902 0.098
2021-04-28 1.000 0.000
2021-04-29 1.000 0.000
2021-05-07 1.000 0.000

指令介绍

所属文件 指令 作用
controll start 启动系统
controll stop 终止系统
controll init 系统初始化
validate 验证识别结果

注意: