| Facial expression recognition has great application value in many fields such as medical care,education,transportation,etc.With the continuous upgrading of hardware equipment conditions and the strong support of the state in the field of artificial intelligence,deep learning has become an indispensable technology in various fields.Convolutional neural network is the most representative network model of deep learning.Due to its excellent performance in the field of computer vision,facial expression recognition based on convolutional neural network has become a hot research topic.However,there are still some difficulties in the current research of facial expression recognition based on convolutional neural network:firstly,most of the existing facial expression image datasets are small in size and it is difficult to collect additional sample data;secondly,due to the interference of redundant information in facial images,it is easy to get confused when recognizing different kinds of expressions;finally,the model has high requirements for hardware and computing resources,and there are problems such as difficulty in practical application;therefore,this thesis is based on convolutional neural network,and studies the difficulties of facial expression recognition.The main research contents are as follows:(1)A facial expression recognition method based on contrast learning is proposed.This method aims to solve the problem that it is difficult to obtain an effective pre-training model due to the small number of facial expression data samples in the real environment.The pre-training model based on contrast learning uses data enhancement as a proxy task to fully explore the potential features of facial expressions by comparing the differences and connections between existing data samples.It improves the generalization and stability of the pre-trained model without using additional data.In addition,this thesis uses a piecewise transfer learning training strategy in the model training process,which adjusts the network weights in segments,reduces the loss of feature extraction ability in the network migration process,and further increases the stability of the network training process.(2)A facial expression recognition method based on fused attention mechanism is proposed.In order to reduce the negative impact of redundant information in the input facial images and obtain more valuable features,this paper proposes the FA-Net network structure,which realizes the adaptive weighting of the input images in both channel and space dimensions through the fused attention mechanism to achieve the focus of the network on the key regions of the face,so as to extract the features with expression discriminative power.Due to the large intra-class variation in the expression classification task,the affinity loss function is used in the training process to increase the expression differentiability by increasing the degree of intra-class sample aggregation in the feature space.In the training process,the affinity loss function is used to increase the expression distinguishability by increasing the intra-class sample aggregation in the feature space.The proposed method effectively enhances the extraction capability of the network for important features and has high accuracy for expression recognition.(3)A lightweight facial expression recognition network is proposed,and a real-time facial expression recognition system for robots is designed and completed based on it.Since most of the convolutional network models have certain requirements on hardware and computing resources,it is difficult to carry out on practical applications.In this thesis,the above proposed FA-Net network structure is pre-trained using the idea of contrast learning,and after formal training,it is used as the teacher network and the lightweight network MobileNetV3-Small is used as the student network,and the knowledge of the teacher network is transferred to the student network through knowledge distillation.The compressed model MFA-Net is obtained,which has both accuracy.and real-time performance for facial expression recognition tasks.Based on this algorithm,a real-time facial expression recognition system is designed with the Qizhi ROS robot as the hardware platform. |