Aiming at the problems of existing facial expression recognition algorithms
such as insufficient annotation accuracy
unbalanced distribution of category samples in public datasets
and the difficulty of traditional convolutional neural network(CNN) in capturing global features
a facial expression recognition method combining conditional generative adversarial network(CGAN) and vision Transformer(ViT) is proposed.Firstly
a FaceCGAN model based on the coordinate mapping of two-dimensional emotion-conditioned space is designed.The emotional category coordinate mapping is realized by constructing two-dimensional emotion-conditioned space
and the synthetic samples in a specified emotional neighborhood are generated.Secondly
a hybrid architecture of ResNet_ViT is constructed.Local features are extracted using residual network(ResNet) enhanced by squeeze-and-excitation(SE) attention
and the feature response of key regions is enhanced by combining a spatial attention mechanism.The global context is modeled by accessing the Transformer encoder through feature serialization.Experiments on the FER2013 dataset show that the proposed method achieves 89.13% recognition accuracy on the enhanced EquiFER dataset
which is 17.16% higher than that of the baseline ResNet model on the original FER2013 dataset
and significantly improves the classification performance and generalization ability of the model.