Aiming at the low recognition accuracy and efficiency of traditional convolutional neural network in Facial Expression Recognition (FER), a facial expression recognition method based on sparse optical flow method was proposed. First, the Haar feature extraction face recognition algorithm was used to detect and identify the target face in real time, and Harris corner detection was used to obtain the target face feature points to accurately locate the face; secondly, the optical flow tracking method was used to measure the movement trend of the target and calculate the target. The approximate position of the next moment, updated the feature points of the Harris corner algorithm and calculated the new tracking position to replace the original feature point data to ensure the accuracy of detection, and finally performd face position detection, normalization, and data enhancement on the image in the mini_Xception architecture. wait for preprocessing. The experimental results show that the recognition rate on the Fer2013 dataset is 68.50%.