APP下载

基于CNN的人脸识别研究与实现

2021-02-19谷广兵沈晓萍王玉婷

现代信息科技 2021年13期

谷广兵 沈晓萍 王玉婷

摘  要:人脸识别技术是人工智能一个典型的应用场景,为了实现基于微信小程序的人脸登录功能,文章对人脸区域检测、人脸特征提取、人脸判别内容进行了研究。人脸区域检测通过tensorflow-ssd 进行模型搭建并采用widerface进行模型参数的训练。人脸特征提取采用facenet进行模型搭建并采用LFW数据集进行模型参数的训练,然后采用欧式距离进行人脸相似度计算,以TensorFlow将训练好的模型以PB格式存储,通过Python完成上述功能模块的封装,并与前端微信小程序完成数据交互。通过测试,系统可以完成人脸注册、人脸登录功能。

关键词:TensorFlow;SSD;facenet;人脸检测;人脸匹配

中图分类号:TP391.4      文献标识码:A文章编号:2096-4706(2021)13-0014-05

Research and Implementation of Face Recognition Based on CNN

GU Guangbing, SHEN Xiaoping, WANG Yuting

(Jiaxing Vocational & Technical College, Jiaxing  314036, China)

Abstract: Face recognition technology is a typical application scenario of artificial intelligence. In order to realize the face login function based on WeChat applet, the paper studies face region detection, face feature extraction and face discrimination. The face region detection model is built by tensorflow-ssd, and the model parameters are trained by wideface. Face feature extraction uses facenet to build the model and LFW data set to train the model parameters, then uses European distance to calculate the face similarity, stores the trained model in Pb format with tensorflow, completes the packaging of the above functional modules through python, and completes the data interaction with the front-end WeChat applet. Through the test, the system can complete the face registration and face login functions.

Keywords: TensorFlow; SSD; facenet; face detection; face matching

0  引  言

人臉识别[1]是人工智能技术落地的一个重要体现。在当今社会中,人脸识别广泛应用在考勤、门禁、医疗诊断、公共安全系统、监视系统等领域,与人脸识别有关的应用智能化最高,相关业务落地更深入。以旷视集团、商汤科技、科大讯飞为代表的一批企业在该方面的研究较为超前,提供了API接口,具备明显的发展优势。总之,人脸识别作为新兴技术,有很好的安全性、可靠性和有效性,并且在很多新兴生物特征识别技术中脱颖而出。

本文以深度学习中的卷积神经网络为基础[2],通过数据集的选取、数据集的清洗与打包、模型的训练与测试、PB模型文件的转化,并最终以微信小程序为客户端,以flask框架为服务端完成系统的实现,完成人脸验证的功能,从而让新兴技术成果能很好地转化。……

登录APP查看全文