| In the context of the big data era of everything connected,face recognition technology based on deep learning has been widely applied in people’s daily lives.With the development of 5G and the Internet of Things(Io T),the deployment of cloud-based deep learning models has faced challenges such as high latency and data privacy concerns.As a result,edge computing has emerged,leading to an increasing number of deep learning applications being deployed at the network edge.The Ascend AI processor is an intelligent acceleration hardware device launched by Huawei for artificial intelligence computing scenarios,with powerful computing power and low power consumption,and has certain advantages in the field of deep learning applications.This paper focuses on building a face detection and recognition system based on the Huawei Ascend AI hardware platform,with the following main work:(1)For edge-side inference scenarios,a lightweight improvement is made to the Retina Face face detection algorithm.Mobile Net V2 lightweight feature extraction network is used as the backbone network of the detection algorithm.Based on the simplified bidirectional feature pyramid structure,a lightweight feature fusion structure is proposed by introducing the coordinate attention mechanism.CIo U Loss is used as the bounding box regression loss in the model training stage to solve the problem that the original Smooth L1 loss function is not equivalent to the actual evaluation standard Io U.Based on the WIDER FACE face database,a series of ablation experiments are designed,and the results prove the feasibility of the above optimization schemes,further accelerating network inference with smaller model parameter and computational complexity while ensuring model accuracy meets application requirements.(2)The post-processing module in the face detection algorithm is added to the model structure,and the stronger computing resource of the Ascend AI processor is used to complete the relevant post-processing operations.By analyzing the process of the post-processing algorithm,this paper develops a non-maximum suppression operator for the detection model implementation in specific scenarios.Through a single-operator inference verification experiment,it is found that the non-maximum suppression operator developed in this paper achieves about 5 times acceleration improvement compared with the original operator library.At the same time,the construction of the post-processing regression decoding module is completed in the computation graph of the face detection model.Compared with the Python implementation of post-processing decoding on the CPU side,it achieved about 8 times speedup improvement.This optimization direction effectively improves deployment and operation efficiency.(3)Based on the Huawei Atlas200 DK hardware computing platform,this paper introduces the model deployment work from the aspects of face detection and face recognition,and compares the inference time and detection accuracy of the face detection algorithm before and after improvement on CPU,GPU and Atlas200 DK development board,validating the effectiveness of lightweight design and post-processing acceleration schemes.At the same time,face recognition function is added in subsequent experiments,and the basic functional requirements of the face detection and recognition system in attendance scenarios are verified. |