A facial expression recognition method based on an attention mechanism of the invention is applicable to the image recognition field. First, a facial expression recognition model is built, and converged facial expression predicting results are obtained through an end-to-end manner; adding a self-attention mechanism and a channel attention mechanism on the basis of a residual network to improve sensitivity to useful information in an input image and suppress useless information; self-attention is used to calculate a weighted average value of all position pixels in the input facial expression feature map to calculate relative importance of key positions in the facial expression feature map, the self-attention mechanism and the channel attention mechanism are merged to encourage an ability of a facial expression recognition model to extract the key positions in the facial expression feature map as global important features, and finally the optimal recognition result is output.
FACIAL EXPRESSION RECOGNITION METHOD BASED ON ATTENTION MECHANISM