Research on the Method of Face Recognition Based on Attention Mechanism
摘要
In recent years, as large model technology gradually becomes integrated into people’s daily lives, the potential risks it poses have also raised societal alarms. Consequently, traditional computer vision problems such as face recognition have regained public attention. Research on face recognition holds both academic and practical value. First, this paper summarizes several classic face recognition algorithms based on convolutional neural networks, analyzes and discusses their network structures and recognition performance, and outlines their advantages and limitations. Secondly, addressing the difficulty of learning identity transformations in deep neural networks, we further explore residual network models, analyze their prominent advantages in learning identity transformations, and select ResNet34 as the backbone network for this experimental study. Finally, to enhance the network’s recognition performance, we introduce the concept of attention mechanisms. Drawing parallels from human observation patterns, we discuss the principles of how attention mechanisms function in neural networks. We also incorporate a channel-based attention structure called the SE block into the original network to further improve its effectiveness. In the final experiments, we use face data from 10 volunteers as the training dataset. We successfully construct a ResNet34 network based on an attention mechanism and conduct comparative experiments with a ResNet34 network without the attention mechanism. We plot the change curve of the test set’s accuracy. The experiments yield the following conclusions: 1) The attention-based network model achieves good recognition performance, with the test set’s recognition accuracy reaching approximately 96.1%. 2) The SE block exhibits significant improvement when added to any part of the residual network, with the optimal position being after the residual branch and before the branch aggregation. 3) The attention mechanism offers good improvement for different backbone networks, demonstrating its generalizability.