Skip to content

A lightweight face recognition, high accuracy, real-time, cross-platform

License

Notifications You must be signed in to change notification settings

FaceRecognitionOrg/EasyFace

Repository files navigation

logo

简体中文 | English

EasyFace

A light weight face recognition project, high accuracy, real-time, cross-platform.

一个轻量级人脸识别项目,准确率高,实时运行,跨平台。在酷睿i7 CPU上耗时410ms。人脸检测模型RetinaFace在WIDER Face Hard上的准确率为0.791,人脸识别模型MobileFacenet在LFW上的准确率为99.55%。

result

特性

  • 纯C++代码
  • 与ncnn、opencv一样,可跨平台部署
  • 可以使用自己的数据集重新训练人脸检测模型与人脸表征模型
  • 方便集成各种的人脸检测模型和人脸表征模型
  • 已集成的人脸检测算法:RetinaFace
  • 已集成的人脸表征算法:MobileFacenet

人脸识别原理

face_theory

实现细节

使用RetinaFace进行人脸检测,然后用SimilarTransformOpenCV Affine Transformations获取对齐的人脸图像,再用MobileFacenet提取128维的特征向量,最后用余弦相似度计算人脸相似度。

依赖

编译依赖库,并修改CMakeLists.txt

编译

Linux

./build_linux.sh

aarch64 Linux

./build_aarch64-linux-gnu.sh

运行

Linux

./run_demo.sh

运行结果

Start face register... 
filename: images/register/huge.jpg
username: huge
filename: images/register/liuyifei.jpg
username: liuyifei
Finish face register. 
Start face identify 
identify result: liuyifei, 0.55
save result to: images/identify/liuyifei.result.jpg
blank frame grabbed
Finish face identify.

Total time is about 410ms on Core i7 CPU.

time_comsume_cpu_i7.jpg

aarch64 Linux

./build-linux/bin/face_system_demo models/retinaface/ models/mobilefacenet/ images/register/ images/identify/img1.jpg

效果演示

已注册人脸:huge、liuyifei

未注册人脸:unknown

cp1 cp2 cp3

TODO

  • 人脸质量评估
  • 人脸活体检测
  • 性别年龄预测

高效的人脸搜索

联系方式

Email:[email protected]

CSDN技术博客: https://blog.csdn.net/zhongqianli

EasyFace人脸技术交流群:1070763980

qqgroup

许可证书

BSD 3 Clause

致谢

insightface

SeetaFace

ncnn

ncnn_example

opencv

About

A lightweight face recognition, high accuracy, real-time, cross-platform

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published