Highly concurrent face recognition technology with Insightface and Faiss
-
摘要: 在高并发、多实例等业务模拟场景下,测试人脸检测与对齐、特征提取、特征匹配检索过程,并进行人脸识别算法效率和精度的优化。利用MTCNN及改进的Insightface算法、Faiss框架,基于LFW数据集,以Face++提供的API做参照。分析结果表明,特征提取1v1比对精度达99.76%,1vN比对精度达95.23%,特征提取效率每秒事务处理量达7.84,特征匹配效率较传统算法提升2个数量级。该项人脸识别技术的研究为铁路未来实施超大规模人像库的动态安防布控提供技术支撑。
-
关键词:
- 人脸识别 /
- MTCNN /
- Insightface算法 /
- Faiss框架 /
- 高并发
Abstract: In highconcurrency, multiinstance and other business simulation scenarios,this paper tested the process of face detection, feature extraction, feature matching retrieval, and optimized the efficiency and accuracy of face recognition algorithm. The paper used MTCNN, improved Insightface algorithm and Faiss frame, based on LFW data set, compared the extracted features with the API provided by Face++. The analysis results show that the precision of feature extraction is 99.76% for 1v1 and 95.23% for 1v N. The efficiency of feature extraction is 7.84 per second. The efficiency of feature matching is two orders of magnitude higher than that of traditional algorithms. The research on this face recognition technology provides technical support for railway to carry out the dynamic security control of super scale person image database in the future.-
Keywords:
- facerecognition /
- MTCNN /
- Insightface algorithm /
- Faiss framework /
- high concurrency
-
-
表 1 Insightface性能测试情况
模拟线程
(用户)数模拟
连接数实例个数 TPS/个 平均响应时间/ms CPU
使用率1 1 1 7.84 128 28 1 2 1 9.19 217 28 1 4 1 9.19 431 28 1 1 2 8.24 120 28 1 2 2 11.54 173 51 1 4 2 12.19 326 53 1 10 2 11.99 818 53 1 1 3 7.79 128 28 1 2 3 11.64 170 51 1 4 3 8.29 478 45 表 2 Insightface与Face++的特征提取效率对比
算法 耗时/ms Insightface 128 Face++ 300~400 表 3 1v1情况下Insightface与Face++测试结果对比
算法 精度 Insightface 0.99767±0.00281 Face++ [0.99283333, 0.99733333, 0.997, 0.99416667] 表 4 1vN情况下Insightface与Face++测试结果对比
算法 阈值 精度 Insightface [0.24,0.44,0.64,0.84,1.04,
1.24,1.44,1.64,1.84,2.04][0.0305,0.3181,0.6927,0.8887,0.9383,
0.9504,0.9523,0.9523,0.9523,0.9523]Face++ [70,72,74,76,78,80,82,84,
86,88][0.9619,0.9619,0.9619,0.9619,0.9619,
0.9619,0.9619,0.9619,0.9619,0.9595]表 5 Faiss与kd-tree搜索性能对比测试
搜索方法 底库大小 搜索数量 耗时/s kd-tree 10000 1000 8.35 Faiss 10000 1000 0.05 -
[1] K. Zhang, Z. Zhang, Z. Li, et al. Joint Face Detection and Alignment Using Multitask Cascaded Convolutional Networks [J]. IEEE Signal Processing Letters, 2016, 23(10): 1499-1503. DOI: 10.1109/LSP.2016.2603342
[2] K. He, X. Zhang, S. Ren, et al. Deep residual learning for image recognition[C]// IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas. 2016:770-778.
[3] Ouyang W, Zeng X, Wang X, et al. DeepID-Net: Object Detection with Deformable Part Based Convolutional Neural Networks [J]. IEEE Transactions on Pattern Analysis & Machine Intelligence, 2017, 39(7): 1320-1334.
[4] F. Schroff, D. Kalenichenko, J. Philbin. FaceNet: A unified embedding for face recognition and clustering[C]//IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Boston. 2015: 815-823.
[5] W. Liu, Y. Wen, Z. Yu, et al. SphereFace: Deep Hypersphere Embedding for Face Recognition[C]// 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu. 2017: 6738-6746.
[6] J. Deng, J. Guo, N. Xue, S. Zafeiriou. ArcFace: Additive Angular Margin Loss for Deep Face Recognition[C]//2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Long Beach. 2019: 4685-4694.
[7] W. Hunt, W. R. Mark, G. Stoll. Fast kd-tree Construction with an Adaptive Error-Bounded Heuristic[C]//2006 IEEE Symposium on Interactive Ray Tracing, Salt Lake City. 2006: 81-88.
[8] D. Lowe. Distinctive image features from scale-invariant key points [J]. International Journal of Computer Vision, 2004, 60(2): 91-110. DOI: 10.1023/B:VISI.0000029664.99615.94
[9] Bay H, Tuytelaars T, Van Gool L. Surf: Speeded up robust features[C]//European conference on computer vision. Springer, Berlin, Heidelberg, 2006: 404-417.
[10] E. Rublee, V. Rabaud, K. Konolige, et al. ORB: An efficient alternative to SIFT or SURF[C]// 2011 International Conference on Computer Vision, Barcelona. 2011: 2564-2571.
[11] 贾成强,戴琳琳,徐海涛,等. 基于人脸识别技术的铁路实名制进站核验系统研究及设计 [J]. 铁路计算机应用,2018,27(7):49-53, 63. DOI: 10.3969/j.issn.1005-8451.2018.07.012 -
期刊类型引用(14)
1. 李博,朱建生,戴琳琳,景辉,黄植正. 铁路客运场景下基于图像搜索的遗失物品查找方法. 铁道运输与经济. 2024(05): 89-99 . 百度学术
2. 武凌,黄淑芹,陈劲松,周健. 基于深度学习语义匹配的通用智能问答系统的设计与实现. 安庆师范大学学报(自然科学版). 2024(02): 84-89 . 百度学术
3. 周巧扣. 基于BERT模型的自动问答系统的设计与实现. 现代信息科技. 2024(20): 83-86 . 百度学术
4. 景辉,戴琳琳,候亚伟,朱宇豪,随玉腾. 基于光照自适应调节和模糊分类的人脸图像质量提升算法研究. 铁路计算机应用. 2023(02): 1-6 . 本站查看
5. 吕占民,李士达,戴琳琳,宋春晓,董兴芝. 基于AR智能眼镜的免打扰列车验票应用研究. 铁路计算机应用. 2023(05): 64-67 . 本站查看
6. 董亚蕾,张师宁,武旭聪. 基于小人脸识别的高校课堂考勤系统研究. 现代信息科技. 2023(12): 62-65 . 百度学术
7. 傅荟瑾,史天运,王瑞,马祯,张万鹏. 基于改进ByteTrack的高铁周界入侵监测方法研究. 仪器仪表学报. 2023(04): 61-71 . 百度学术
8. 朱宇豪,李平,戴琳琳,景辉,董兴芝. 基于知识迁移的旅客人脸图像异常检测方法研究. 铁路计算机应用. 2023(06): 7-13 . 本站查看
9. 王彪,毋涛. 基于卷积神经网络的面料检索系统. 计算机技术与发展. 2023(09): 52-56 . 百度学术
10. 刘瑞昊,于振中,孙强. 基于深度学习的织物图像检索系统研究. 棉纺织技术. 2022(05): 42-47 . 百度学术
11. 李贝贝,朱建生,阎志远,戴琳琳,候亚伟. 铁路客票系统人像检索平台构建与关键技术研究. 铁道运输与经济. 2021(05): 58-63+91 . 百度学术
12. 王雪峰,董兴芝,原非凡. 京张高铁旅客全行程智慧信息服务技术研究与应用. 铁路计算机应用. 2021(07): 50-55 . 本站查看
13. 王仲林,王卫民,朱乐俊. Siamese-ELECTRA网络结合对抗训练的FAQ问答模型研究. 软件导刊. 2021(08): 58-64 . 百度学术
14. 单杏花,张志强,宁斐,李士达,戴琳琳. 中国铁路电子客票关键技术应用与系统实现. 中国铁道科学. 2021(05): 162-173 . 百度学术
其他类型引用(7)