Facial expressions,as a means of conveying emotions,play an important role in daily interpersonal communication.Nowadays,facial expression recognition technology is widely applied in areas such as human-computer interaction,intelligent driving,and medicine.With the development of deep learning technology,methods based on convolutional neural networks have become the mainstream approach for facial expression recognition.However,issues such as low accuracy in expression recognition and significant differences in facial features and expressions between different individuals still exist.To address these issues,this paper conducts research on facial expression recognition,and the main research work is as follows:(1)In the study of facial expression recognition for static images,an Improved-DenseNet model is proposed by improving the DenseNet121 model.Firstly,in order to address the problem of the deep network layer and excessive network parameters in the DenseNet121 model,the four dense blocks of the DenseNet121 model are reduced to three.Secondly,for the input image size of48×48×1,unlike the DenseNet121 model which uses a 7×7 convolutional kernel to extract facial expression features,a multi-scale feature extraction module is designed in this paper to extract multi-scale features of the input image,which is more beneficial for subsequent expression classification than extracting single-scale features.In addition,a Parallel-ASPP feature information processing module based on ASPP is designed,which is embedded into Dense Block 1 and Dense Block 2 of the DenseNet model.This can effectively balance local information and global information,and enhance the generalization ability of the network model.Finally,by introducing depthwise separable convolution to replace the original ordinary convolutional layer,the model parameters are greatly reduced.Meanwhile,by modifying the activation function to Leaky Re LU function and introducing the Drop Block regularization technique,the accuracy of facial expression recognition is further improved.Experimental results on the CK+ dataset and FER2013 dataset show that compared with the DenseNet121 model,the proposed ImprovedDenseNet model has significantly improved accuracy in facial expression recognition for static images.(2)The features extracted by the convolutional layers contain both spatial and channel information,and the importance of spatial and channel information at different positions is not the same.Therefore,to more accurately process the features,this paper introduces an attention mechanism to weight the importance of features.The information assigned with higher weights will receive more attention.The experimental results verify the effectiveness of introducing the attention mechanism,with recognition accuracy of 74.11% on the FER2013 dataset and 97.94%on the CK+ dataset.(3)Using the PyQT5 toolkit and OpenCV library,a facial expression recognition system was designed and implemented,and tested.The system achieved good recognition results and has certain practical value. |