Micro-expression recognition method based on facial pose constraint
By using the bidirectional orthogonal long-short-term memory model and 3DResnet network in micro-expression recognition, the problem of reduced recognition accuracy caused by pose deviation in micro-expression recognition is solved, and the subtle changes in micro-expressions are effectively captured and recognized. Improved recognition accuracy and robustness.
Patent Information
- Application Number
- CN202410722222.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-05
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2044-06-05
AI Technical Summary
There is a problem in micro-expression recognition that the recognition accuracy decreases due to facial pose deviation during video frame sampling or pre-processing. Traditional manual feature extraction methods are difficult to capture subtle changes in facial muscles, and machine learning algorithms that rely on manual features to detect video frames The preprocessing process is highly sensitive and affects recognition accuracy.
A lightweight bidirectional orthogonal long-short-term memory model is used as the facial pose constraint module. By decomposing the pose information in the orthogonal direction of the calibration frame, the training of the main micro-expression recognition network is constrained to ensure that the model is effective in global facial information. Extraction, and feature extraction and classification through 3DResnet network and multi-layer perceptron.
It effectively constrains the abnormal deviation of facial pose in micro-expression samples, improves the accuracy and robustness of micro-expression recognition, reduces noise interference during pre-processing, and improves the model's ability to locate subtle movements of micro-expressions.
Smart Images

Figure CN118736642A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a micro-expression recognition method based on facial posture constraints, and belongs to the technical field of deep learning and pattern recognition. Background Art
[0002] Micro-expressions, as a subtle, short-lived and spontaneous emotional representation of human facial expressions, are very brief, subtle and involuntary facial expressions, which usually occur when a person deliberately or unconsciously hides his true emotions. This provides a basis for revealing people's true psychology or emotions. Therefore, the accurate recognition of micro-expressions has extremely important application value in security interrogation, clinical diagnosis, business negotiations and daily social interactions.
[0003] In the field of manual feature extraction, there are several common feature extraction methods that are widely used. In particular, Zhao et al. introduced a feature called LBP-TOP, which extended the traditional LBP algorithm from two-dimensional space to three-dimensional space, thereby incorporating information from the time domain. In addition, Liu proposed a main direction mean optical flow feature (MDMO), which is an effective method for facial motion analysis in video sequences. MDMO first divides the face into 36 regions of interest, then calculates the amplitude and angle of the optical flow in each region, and uses these values as feature representation. This method reduces the feature dimension to 72 dimensions, significantly reducing the computational complexity. In order to improve the limitations of MDMO, Liu et al. further proposed a sparse MDMO feature, which can learn effective dictionary representations from micro-expression datasets. On this basis, they also proposed a new distance metric method that can more effectively reveal the underlying manifold structure of the feature. Xu et al. proposed the Facial Dynamic Map (FDM) method to align pixels of adjacent frames to mitigate the impact of head motion. Based on these studies, Happy et al. proposed a new feature extraction technology based on fuzzy histogram of optical flow (FHOOF), focusing on analyzing the direction of facial muscle movement. This method attempts to extract more subtle motion features from micro-expression videos to improve recognition accuracy.
[0004] The design of manual features usually relies on prior knowledge and specific assumptions, and this limitation makes it difficult for them to fully capture complex and subtle changes in facial expressions. Especially in the field of micro-expression recognition, it is necessary to accurately capture extremely subtle changes in facial muscles, but traditional manual features and the machine learning frameworks they support often fail to fully capture these key details. In addition, machine learning algorithms that rely on manual feature extraction are highly sensitive to the preprocessing of video frames, which inevitably introduces additional interference information, which in turn affects the accuracy and reliability of micro-expression recognition. Therefore, in the field of micro-expression recognition, seeking more advanced and effective feature extraction methods has become a research focus.
[0005] Deep learning has developed rapidly in recent years and has achieved remarkable results in many fields. Micro-expression recognition, as a cutting-edge topic in the field of computer vision, has also made continuous breakthroughs with the help of deep learning. In 2016, DaeHoe Kim proposed a micro-expression recognition method that integrates convolutional neural networks (CNN) and long short-term memory networks (LSTM). This method can simultaneously capture spatial and temporal features in video sequences, providing new ideas for micro-expression recognition. In 2018, Wang further proposed a micro-expression recognition method using a transfer learning strategy, which effectively improved the performance of micro-expression recognition by utilizing models pre-trained on large-scale data sets. In 2020, Yante Li proposed a micro-expression peak frame recognition algorithm based on three-dimensional Fourier transform, and combined with the LGCcon model, the network was trained by integrating local and global features, further improving the accuracy of micro-expression recognition. In the same year, Xia used the Euclidean video magnification technique to preprocess the micro-expression dataset to amplify dynamic information, and extracted the information of key facial parts through the mask algorithm, reducing the data dimension, and used the recursive convolutional neural network (RCNN) to extract spatiotemporal features, further promoting the development of micro-expression recognition technology. Xie proposed a method of using facial action units (AU) to assist micro-expression recognition, and enhanced the ability of micro-expression recognition by identifying subtle facial action units. In 2021, Ben conducted an in-depth investigation and analysis of the field of micro-expression detection and recognition based on video datasets, and looked forward to future prospects. In response to the problem of the scarcity of micro-expression datasets, he proposed a new dataset MMEW, which provides valuable resources for micro-expression recognition research. In 2022, Chen proposed a micro-expression recognition algorithm that only uses the starting frame and the peak frame. By fusing the optical flow features extracted by four different methods and designing a block convolutional neural network, a more refined extraction of optical flow features was achieved. At the same time, Zhao et al. proposed a micro-expression recognition method based on the visual Transformer model, proving the effectiveness of the Transformer model in the micro-expression recognition task. Mao et al. explored the micro-expression recognition task in the case of face occlusion in real environment and proposed a region-inspired relational reasoning network (RRRN), which can capture the complementary relationship between facial regions and effectively improve the micro-expression recognition performance under occlusion conditions. Wei designed a novel attention-based magnification adaptive network (AMAN), which can adaptively adjust the magnification level according to the dynamic changes of different micro-expression sequences, further improving the accuracy and robustness of micro-expression recognition.In 2023, Nguyen et al. proposed a BERT-based Facial Micro-Expression Recognition (Micron-BERT) framework for micro-expression recognition. Micron-BERT uses the powerful capabilities of the BERT framework in sequence modeling to accurately locate patches of interest (POIs) in micro-expression frames. This method effectively reduces the impact of interference factors such as background noise on the model's recognition performance, making micro-expression recognition more accurate and reliable.
[0006] Micro-expression features are subtle, instantaneous, and difficult to extract. Therefore, even the slightest interference information can cause significant performance loss in the model during recognition tasks. Considering that some subtle pose offsets may be introduced during the sampling or preprocessing of micro-expression video samples, the same face area may be incorrectly mapped to different pixel positions in the image, making it difficult for the network to accurately locate the location of micro-expression subtle movements, thus affecting model performance. Summary of the invention
[0007] In view of the deficiencies in the prior art, the present invention provides a micro-expression recognition method based on facial pose constraints. Summary of the invention:
[0009] The present invention proposes a lightweight bidirectional orthogonal long short-term memory model as a facial pose constraint module (FPC) to constrain the abnormal deviation of facial pose in micro-expression samples. The FPC module decomposes and extracts the orthogonal direction pose information of the calibration frame, thereby constraining the training of the main network for micro-expression recognition. The present invention designs a standard frame to constrain the facial pose of the tested sample to align the pose information of each feature of the model during the training process, and proposes a bidirectional orthogonal LSTM model to model low-resolution micro-expression information to ensure that the model effectively extracts global facial information.
[0010] Terminology explanation:
[0011] 1. Dlib visual library: Dlib is a C++ open source toolkit that contains machine learning algorithms and can be used to solve many practical problems in the field of machine learning. Currently, Dlib has been widely used in industry and academia.
[0012] 2. Facial key feature point detection: The 68 key feature points of the face are mainly distributed in eyebrows, eyes, nose, mouth and facial contours, such as Figure 1 As shown, detection is performed using the Dlib visual library, which is a prior art.
[0013] 3. Long Short-Term Memory Network: It is a special recurrent neural network designed to solve the gradient vanishing and gradient exploding problems encountered by traditional recurrent neural networks when processing long sequence data, such as Figure 2 shown.
[0014] 4. Bidirectional LSTM: An extended form of LSTM, which contains two independent LSTM layers, one for processing the forward sequence of data and the other for processing the reverse sequence, such as Figure 3 As shown in Figure 3, this structure can simultaneously capture the previous and next contextual information of image features, remove the prior introduced by the data order, and thus provide a more comprehensive feature understanding.
[0015] 5. Multilayer Perceptron: A feedforward neural network consisting of multiple neuron layers, each of which is fully connected to the previous layer, including input layer, hidden layer and output layer, used to solve classification problems.
[0016] 6. 3DResnet network: spatiotemporal 3D convolutional neural network, a convolutional neural network structure that introduces three-dimensional convolution kernels and can simultaneously capture spatial and temporal information in videos.
[0017] The technical solution of the present invention is as follows:
[0018] A micro-expression recognition method based on facial pose constraints, comprising:
[0019] A. Preprocessing of micro-expression video sequences, including: obtaining video frame sequences, face detection and positioning, and face alignment;
[0020] B. Selection and preprocessing of anchor sample frames; including: selecting anchor sample frames and cropping them, and serializing the cropped starting thumbnail frames in two orthogonal directions;
[0021] C. Construct a bidirectional orthogonal long short-term memory model; use the bidirectional orthogonal long short-term memory model's modeling ability for long- and short-distance information dependence to extract the fixed posture features of the selected reference frame portrait, and use the fixed posture features as a reference to eliminate noise interference introduced during video frame acquisition or preprocessing;
[0022] D. Construct spatial constraint features to assist in micro-expression recognition.
[0023] Preferably, according to the present invention, in step A, preprocessing the micro-expression video sequence includes:
[0024] 1) Obtaining a video frame sequence: performing frame processing on the micro-expression video sequence to obtain and store a video frame sequence;
[0025] 2) Obtaining the start frame and peak frame: Selecting the micro-expression start frame and peak frame in each video frame sequence and storing them;
[0026] The starting frame refers to: the first frame in the micro-expression video sequence where the micro-expression appears;
[0027] The peak frame refers to the frame in the micro-expression video sequence where the facial muscle changes are most obvious and contains the most micro-expression information;
[0028] 3) Face detection and positioning: Use the Dlib visual library to detect and locate faces on the acquired start frame and peak frame, and detect the number of faces in the video frame and the distance between the face and the image boundary;
[0029] 4) Face alignment: Use the Dlib visual library to determine 68 key feature points on the face to complete face segmentation and face correction.
[0030] Preferably, in step B, the selection and preprocessing of the anchor sample frame includes:
[0031] First, the starting frame F of each video sample Onset is regarded as the reference face part pose sample frame; then, the selected starting frame is scaled to the starting thumbnail frame F of the size of the last layer of the main network on-ab ; The main network uses the 3DResnet network; Finally, the cropped initial thumbnail frame is serialized in two orthogonal directions. This process is expressed as formula (1):
[0032]
[0033] Among them, B refers to the batch size, W refers to the width of the feature, H refers to the height of the feature, C refers to the number of channels of the feature, R refers to the real number domain, Orthogonalization refers to orthogonalization, Serialize refers to serialization, and the starting thumbnail frame F on-ab In two orthogonal directions, they are serialized into vertical pose calibration sequences F W And the horizontal pose calibration sequence F H ; Vertical pose calibration sequence F W And the horizontal pose calibration sequence F H They are collectively referred to as anchor sample frames.
[0034] Preferably, in step C, a bidirectional orthogonal long short-term memory model is constructed, comprising the following steps:
[0035] The bidirectional orthogonal long short-term memory model is used to model the pose constraint representation of the input anchor sample frame from two directions. The bidirectional orthogonal long short-term memory model is used to model the pose constraint information between each pixel in the thumbnail sequence in sequence. The horizontal bidirectional long short-term memory model and the vertical bidirectional long short-term memory model are used to calibrate the vertical pose sequence F obtained by preprocessing. W And the horizontal pose calibration sequence F H Two abbreviated sequences are processed, namely: F W and F H Input the horizontal bidirectional long short-term memory model and the vertical bidirectional long short-term memory model respectively to obtain the horizontal posture constraint feature and vertical pose constraint features
[0036] After being processed by the bidirectional orthogonal long short-term memory model, the representations of two different directions are spliced in the channel dimension, and then mixed through a multi-layer perceptron to complete the final pose constraint feature F pc The multi-layer perceptron is realized by two layers of fully connected layer networks.
[0037] Further preferably, the starting frame F onset is orthogonally sequenced as F H With F W After that, it is sent to the bidirectional orthogonal long short-term memory model, and then after channel mixing, the feature Y constraining the face posture is obtained. pc , the whole calculation process is as follows:
[0038]
[0039]
[0040] Among them, BiLSTM H Refers to the horizontal bidirectional long short-term memory model, BiLSTM W Refers to the vertical bidirectional long short-term memory model, dim = c refers to the feature dimension size, Refers to the horizontal posture constraint feature, It refers to the vertical posture constraint feature, concatenate refers to dimension splicing, and Fc refers to the multi-layer perceptron.
[0041] Preferably, according to the present invention, in step D, constructing a spatial constraint feature to assist micro-expression recognition comprises the following steps:
[0042] The input of the bidirectional orthogonal long short-term memory model is divided into two parts, one is the micro-expression video sequence The other is the starting frame F of the micro-expression video onset , which is characterized as follows:
[0043]
[0044] Where sub is the sample number, e is the expression label, and L is the frame length of the sampled video sequence. All frames will be aligned and cropped into pre-processed frames with a width of W, a height of H, and a number of channels of C.
[0045] The main classification network, namely the 3DResnet network, completes the classification task, including:
[0046] micro expression sequence Sent into the 3DResnet network to model the micro-expression representation Y with classification significance cls ; The obtained pose constraint feature Y pc With Y cls The added results are used to calculate the cross entropy loss to optimize the model parameters. The calculation process is as follows:
[0047]
[0048] Where N is the number of samples, Y gt is the true value of the sample label, and C is the classification category.
[0049] The beneficial effects of the present invention are:
[0050] Aiming at the problem of posture deviation in sampling and preprocessing of micro-expression video sequences, this paper proposes a lightweight bidirectional orthogonal long short-term memory model to constrain the abnormal deviation of facial posture in micro-expression samples due to data collection and data preprocessing. By decomposing and extracting the posture information in the orthogonal direction of the constructed micro-expression calibration frame, the posture association between different facial regions is obtained, and the auxiliary classification main network is used for micro-expression recognition, thereby improving the performance of the recognition algorithm. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 Schematic diagram of 68 key feature points on the face of the present invention;
[0052] Figure 2 This is a schematic diagram of the structure of the classic LSTM model of the present invention;
[0053] Figure 3 This is a schematic diagram of the bidirectional LSTM model structure of the present invention;
[0054] Figure 4 Schematic diagram of the anchor point sample frame selection and abbreviated orthogonalization preprocessing process of the present invention;
[0055] Figure 5 This is a schematic diagram of the orthogonal bidirectional LSTM module framework of the present invention;
[0056] Figure 6This is a schematic diagram of the spatial posture constraint feature auxiliary main network of the present invention;
[0057] Figure 7 A schematic diagram showing the comparison of the F1 scores of the ablation effects of the model in Example 2 on all samples in the CASMEII dataset;
[0058] Figure 8 Schematic diagram of the ablation effect of the model in Example 2 on all samples in the CASMEII dataset compared with ACC;
[0059] Fig. 9 A schematic diagram showing the comparison of the F1 scores of the ablation effects of the model in Example 2 on all samples in the SAMM dataset;
[0060] Fig.10 ACC schematic diagram of the ablation effect of the model in Example 2 on all samples in the SAMM dataset;
[0061] Fig.11 A schematic diagram showing the comparison of the F1 scores of the ablation effects of the model in Example 2 on all samples in the SMIC dataset;
[0062] Fig.12 Schematic diagram of ACC comparison of the ablation effect of the model in Example 2 on all samples in the SMIC dataset.
[0063] FIG13( a ) is a schematic diagram of a partial sample frame of the Sub12 sample in the 012_7_1 video segment in Example 2;
[0064] FIG13( b ) is a schematic diagram of a partial sample frame of the Sub12 sample in the 012_3_2 video segment in Example 2. FIG. DETAILED DESCRIPTION
[0065] In order to facilitate the understanding of the present invention, the present invention is further described below by way of embodiments in conjunction with the accompanying drawings, but the present invention is not limited thereto.
[0066] Example 1
[0067] A micro-expression recognition method based on facial pose constraints, comprising:
[0068] A. Preprocessing of micro-expression video sequences, including: obtaining video frame sequences, face detection and positioning, and face alignment;
[0069] B. Selection and preprocessing of anchor sample frames; including: selecting anchor sample frames and cropping them, and serializing the cropped starting thumbnail frames in two orthogonal directions;
[0070] C. Construct a bidirectional orthogonal long short-term memory model. Utilize the bidirectional orthogonal long short-term memory model's ability to model long- and short-distance information dependencies to extract the fixed posture features of the selected reference frame portrait, and use the fixed posture features as a reference to eliminate noise interference introduced during video frame acquisition or preprocessing, thereby improving the performance of the micro-expression recognition model.
[0071] D. Construct spatial constraint features to assist in micro-expression recognition.
[0072] Example 2
[0073] The difference between the micro-expression recognition method based on facial pose constraints described in Example 1 is that:
[0074] In step A, the micro-expression video sequence is preprocessed, including:
[0075] 1) Obtaining a video frame sequence: performing frame processing on the micro-expression video sequence to obtain and store a video frame sequence;
[0076] 2) Obtaining the start frame and peak frame: According to the information annotated by experts in the micro-expression dataset, the start frame and peak frame of the micro-expression in each video frame sequence are selected and stored;
[0077] The starting frame refers to: the first frame in the micro-expression video sequence where the micro-expression appears;
[0078] The peak frame refers to the frame in the micro-expression video sequence where the facial muscle changes are most obvious and contains the most micro-expression information;
[0079] 3) Face detection and positioning: Use the Dlib visual library to detect and locate faces on the acquired start frame and peak frame, and detect the number of faces in the video frame and the distance between the face and the image boundary;
[0080] 4) Face alignment: Based on face positioning, the Dlib visual library is used to determine 68 key feature points on the face, such as Figure 1 As shown, face segmentation and face correction are completed.
[0081] Face segmentation refers to: using the Dlib visual library to segment faces using rectangular boxes;
[0082] Face correction means: among the 68 key feature points detected on the face, the line connecting the key feature point 37 marking the left corner of the left eye and the key feature point 46 marking the right corner of the right eye is at an angle a with the horizontal line. The corresponding rotation matrix is obtained through the angle a, and the segmented face is rotated to make the line connecting the key feature point 37 marking the left corner of the left eye and the key feature point 46 marking the right corner of the right eye parallel to the horizontal line, thereby correcting the facial posture and scaling the face.
[0083] In step B, the selection and preprocessing of anchor sample frames include:
[0084] The selection and preprocessing process of anchor sample frames is as follows: Figure 4 As shown. First, the starting frame F of each video sample Onset The starting frame is regarded as the reference face position sample frame; using the starting frame as the standard can avoid the accumulation of position offset errors caused by head shaking or face detection alignment in subsequent frames. After that, the selected starting frame is scaled to the starting thumbnail frame F of the size of the last layer of the main network. on-ab ; The main network uses the 3DResnet network; this is because what needs to be obtained is the face position embedding (for example, the eyes are always located on both sides of the nose; the size of a single sample face is consistent) rather than the detailed feature information of the face (for example, identity, texture, etc.), so it does not require overly complex high-resolution images. In addition, low-resolution image input greatly reduces the number of network parameters and can reduce the difficulty of network training. Finally, the cropped starting thumbnail frame is serialized in two orthogonal directions. This process is expressed as formula (1):
[0085]
[0086] Among them, B refers to the batch size, W refers to the width of the feature, H refers to the height of the feature, C refers to the number of channels of the feature, R refers to the real number domain, Orthogonalization refers to orthogonalization, Serialize refers to serialization, and the starting thumbnail frame F on-ab In two orthogonal directions (horizontal and vertical), they are serialized into vertical pose calibration sequences F W And the horizontal pose calibration sequence F H ; Vertical pose calibration sequence F W And the horizontal pose calibration sequence F H They are collectively referred to as anchor sample frames.
[0087] In step C, a bidirectional orthogonal long short-term memory model is constructed, including the following steps:
[0088] The present invention constructs a bidirectional orthogonal long short-term memory model (Orthogonal-Bidirectional LSTM Model, O-BiLSTM), such as Figure 5As shown in the figure, the bidirectional orthogonal LSTM model consists of a horizontal bidirectional LSTM model and a vertical bidirectional LSTM model, and a lightweight network is used to constrain the micro-expression video frame pose. The bidirectional orthogonal LSTM model is used to correct the facial pixel offset and the accumulated error caused by the offset generated during the micro-expression video preprocessing process. Specifically, the LSTM model is used to extract the fixed pose features of the selected reference frame portrait by using its modeling ability for long- and short-distance information dependence, and this fixed pose feature is used as a benchmark to eliminate the noise interference introduced during video frame acquisition or preprocessing, thereby improving the performance of the micro-expression recognition model.
[0089] First, the bidirectional orthogonal LSTM model is used to model the pose constraint representation of the input anchor sample frame from two directions. The bidirectional orthogonal LSTM model is used to model the pose constraint information between each pixel in the thumbnail sequence in sequence, as shown in equations (2) and (3). The horizontal bidirectional LSTM model and the vertical bidirectional LSTM model are used to calibrate the vertical pose sequence F obtained by preprocessing in equation (1), respectively. W And the horizontal pose calibration sequence F H Two abbreviated sequences are processed, namely: F W and F H Input the horizontal bidirectional long short-term memory model and the vertical bidirectional long short-term memory model respectively to obtain the horizontal posture constraint feature and vertical pose constraint features The bidirectional long short-term memory model contains two independent LSTM layers, one for processing the forward sequence of data (from the beginning to the end), and the other for processing the reverse sequence (from the end to the beginning). This structure enables Bi-LSTM to simultaneously capture the contextual information of the image features, remove the prior introduced by the data order, and thus provide a more comprehensive understanding of the features. Therefore, it has the ability to model the pose constraint information between each pixel in the thumbnail sequence in sequence. Specifically, the thumbnail sequence refers to the two sequences of length 196 after the original micro-expression video frame is scaled to 14×14, and then expanded and serialized in the horizontal and vertical directions respectively. The pose constraint information refers to the feature information finally obtained in formula (4).
[0090] Finally, as shown in formula (4), the representations of the two different directions after being processed by the bidirectional orthogonal long short-term memory model in formulas (2) and (3) are spliced in the channel dimension, and then a multi-layer perceptron (MLP) is used for channel mixing to complete the final pose constraint feature F pc The multi-layer perceptron is realized by two layers of fully connected layer networks.
[0091] It is worth noting that since the anchor sample frame sequence F w With F H The scale of is not too long, so it is more conducive to LSTM to form long-short time dependency features. In addition, compared with the traditional CNN network, this method can pay more attention to the global information of the feature layer, that is, the correspondence between the facial features or muscles in the face, rather than a more fine-grained representation. Compared with the Transformer model, LSTM is easier to train and more computationally friendly, and due to the particularity of the input sequence scale, LSTM can also achieve better results than the Transformer model.
[0092] Start frame F onset is orthogonally sequenced as F H With F W After that, it is sent to the bidirectional orthogonal long short-term memory model, and then after channel mixing, the feature Y constraining the face posture is obtained. pc , the whole calculation process is as follows:
[0093]
[0094] Among them, BiLSTM H Refers to the horizontal bidirectional long short-term memory model, BiLSTM W Refers to the vertical bidirectional long short-term memory model, dim = c refers to the feature dimension size, Refers to the horizontal posture constraint feature, It refers to the vertical posture constraint feature, concatenate refers to dimension splicing, and Fc refers to the multi-layer perceptron.
[0095] In step D, a spatial constraint feature is constructed to assist micro-expression recognition, such as Figure 6 As shown, the steps include:
[0096] The input of the bidirectional orthogonal long short-term memory model is divided into two parts, one is the micro-expression video sequence The other is the starting frame F of the micro-expression video onset , which is characterized as follows:
[0097]
[0098] Where sub is the sample number, e is the expression label, and L is the frame length of the sampled video sequence. All frames will be aligned and cropped into pre-processed frames with a width of W, a height of H, and a number of channels of C.
[0099] The main classification network, namely the 3DResnet network, completes the classification task, including:
[0100] micro expression sequence Sent into the 3DResnet network to model the micro-expression representation Y with classification significancecls ; The obtained pose constraint feature Y pc With Y cls The added results are used to calculate the cross entropy loss to optimize the model parameters. The calculation process is as follows:
[0101]
[0102] Where N is the number of samples, Y gt is the true value of the sample label, and C is the classification category.
[0103] In this embodiment, ablation experiments of the face position and posture calibration module were carried out in CASME II, SAMM, and SMIC (3 categories). Figures 7 to 12 The recognition F1-score and recognition accuracy ACC of each tested sample in the corresponding dataset are shown when each sample is cross-validated by leaving one out method on the three datasets. Figure 7 A schematic diagram showing the comparison of the F1 scores of the ablation effects of the model in Example 3 on all samples in the CASMEII dataset; Figure 8 Schematic diagram of the ablation effect of the model of this embodiment on all samples in the CASMEII dataset compared with ACC; Fig. 9 A schematic diagram of the ablation effect and F1 score comparison of the model in this embodiment on all samples in the SAMM dataset; Fig.10 ACC schematic diagram of the ablation effect of the model in this embodiment on all samples in the SAMM dataset; Fig.11 A schematic diagram showing the comparison of the F1 scores of the ablation effects of the model in this embodiment on all samples in the SMIC dataset; Fig.12 ACC schematic diagram showing the ablation effect of the model in this embodiment on all samples in the SMIC dataset.
[0104] The model parameters are set as the biorthogonal LSTM parameters of the pose constraint module and the 3D ResNet parameters of the classification main network, as shown in Table 1 below:
[0105] Table 1
[0106]
[0107] The pose constraint network and the classification main network are composed of two different modules, where F corresponds to the number of feature channels and N corresponds to the number of basic modules of the corresponding layer. The Average Pooling method is used as the downsampling method between layers.
[0108] like Figures 7 to 12As shown in the table, by observing the recognition index bar chart of each tested sample, it can be found that the F1-score and recognition accuracy of the ResNet3D model with the FPC module in most samples are higher than those of the ResNet3D model alone. Secondly, the data in the table also show that when testing some samples, the two models produce the same effect, such as Figures 7 to 12 As shown in the dashed box. This is because most of these samples contain a small amount of tested videos (such as the tested sample Sub21 of the CASME II dataset contains only 2 video clips, and the tested samples Sub31 and Sub32 of the SAMM dataset contain only 1 video clip), and the face alignment and cropping are relatively standard. It is worth noting that in the tests on all datasets, only sample Sub12 in CASMEII showed a negative effect on the FPC module, indicating that the FPC module may not adequately model certain features or conditions in very specific samples, but only affects the F1-Score of the model on this sample, and does not affect the recognition accuracy of the sample. The network with the FPC module added achieved the highest accuracy in some samples, indicating that the proposed method has a strong feature modeling capability on specific samples.
[0109] For example, sample Sub12 of the SAMM dataset has some posture offsets caused by preprocessing operations such as sampling, cropping or alignment. Figure 13(a) is a schematic diagram of a partial sample frame of the Sub12 sample in the 012_7_1 video clip in this embodiment; Figure 13(b) is a schematic diagram of a partial sample frame of the Sub12 sample in the 012_3_2 video clip in this embodiment. The Sub12 sample has a large head offset or eye movement in both the 012_3_2 and 012_7_1 video clips. The model with the FPC module added has a recognition rate of 1.0 for the Sub12 sample, but the original ResNet3D model does not accurately recognize the Sub12 sample (F1-Score is 0.26, ACC. is 0.33). This shows that the FPC module effectively calibrates the facial posture information.
Claims
1. A micro-expression recognition method based on facial pose constraints, characterized in that: include: A. Preprocessing of micro-expression video sequences, including: obtaining video frame sequences, face detection and positioning, and face alignment; B. Selection and preprocessing of anchor sample frames; including: selecting anchor sample frames and cropping them, and serializing the cropped starting thumbnail frames in two orthogonal directions; C. Construct a bidirectional orthogonal long short-term memory model; use the bidirectional orthogonal long short-term memory model's modeling ability for long- and short-distance information dependence to extract the fixed posture features of the selected reference frame portrait, and use the fixed posture features as a reference to eliminate noise interference introduced during video frame acquisition or preprocessing; D. Construct spatial constraint features to assist in micro-expression recognition.
2. The micro-expression recognition method based on facial pose constraints according to claim 1, characterized in that: In step A, the micro-expression video sequence is preprocessed, including: 1) Obtaining a video frame sequence: performing frame processing on the micro-expression video sequence to obtain and store a video frame sequence; 2) Obtaining the start frame and peak frame: Selecting the micro-expression start frame and peak frame in each video frame sequence and storing them; The starting frame refers to: the first frame in the micro-expression video sequence where the micro-expression appears; The peak frame refers to the frame in the micro-expression video sequence where the facial muscle changes are most obvious and contains the most micro-expression information; 3) Face detection and positioning: Use the Dlib visual library to detect and locate faces on the acquired start frame and peak frame, and detect the number of faces in the video frame and the distance between the face and the image boundary; 4) Face alignment: Use the Dlib visual library to determine 68 key feature points on the face to complete face segmentation and face correction.
3. The micro-expression recognition method based on facial pose constraints according to claim 1, characterized in that: In step B, the selection and preprocessing of anchor sample frames include: First, the starting frame F of each video sample Onset is regarded as the reference face part pose sample frame; then, the selected starting frame is scaled to the starting thumbnail frame F of the size of the last layer of the main network on-ab ; The main network uses the 3DResnet network; Finally, the cropped initial thumbnail frame is serialized in two orthogonal directions. This process is expressed as formula (1): Among them, B refers to the batch size, W refers to the width of the feature, H refers to the height of the feature, C refers to the number of channels of the feature, R refers to the real number domain, Orthogonalization refers to orthogonalization, Serialize refers to serialization, and the starting thumbnail frame F on-ab In two orthogonal directions, they are serialized into vertical pose calibration sequences F W And the horizontal pose calibration sequence F H ; Vertical pose calibration sequence F W And the horizontal pose calibration sequence F H They are collectively referred to as anchor sample frames.
4. The micro-expression recognition method based on facial pose constraints according to claim 1, characterized in that: In step C, a bidirectional orthogonal long short-term memory model is constructed, including the following steps: The bidirectional orthogonal long short-term memory model is used to model the pose constraint representation of the input anchor sample frame from two directions. The bidirectional orthogonal long short-term memory model is used to model the pose constraint information between each pixel in the thumbnail sequence in sequence. The horizontal bidirectional long short-term memory model and the vertical bidirectional long short-term memory model are used to calibrate the vertical pose sequence F obtained by preprocessing. W And the horizontal pose calibration sequence F H Two abbreviated sequences are processed, namely: F W and F H Input the horizontal bidirectional long short-term memory model and the vertical bidirectional long short-term memory model respectively to obtain the horizontal posture constraint feature and vertical pose constraint features After being processed by the bidirectional orthogonal long short-term memory model, the representations of two different directions are spliced in the channel dimension, and then mixed through a multi-layer perceptron to complete the final pose constraint feature F pc The multi-layer perceptron is realized by two layers of fully connected layer networks.
5. The micro-expression recognition method based on facial pose constraints according to claim 4, characterized in that: Start frame F onset is orthogonally sequenced as F H With F W After that, it is sent to the bidirectional orthogonal long short-term memory model, and then after channel mixing, the feature Y constraining the face posture is obtained. pc , the whole calculation process is as follows: Among them, BiLSTM H Refers to the horizontal bidirectional long short-term memory model, BiLSTM W Refers to the vertical bidirectional long short-term memory model, dim = c refers to the feature dimension size, Refers to the horizontal posture constraint feature, It refers to the vertical posture constraint feature, concatenate refers to dimension splicing, and Fc refers to the multi-layer perceptron.
6. A method for micro-expression recognition based on facial pose constraints according to any one of claims 1 to 5, characterized in that: In step D, constructing a spatial constraint feature to assist micro-expression recognition includes the following steps: The input of the bidirectional orthogonal long short-term memory model is divided into two parts, one is the micro-expression video sequence The other is the starting frame F of the micro-expression video onset , which is characterized as follows: Where sub is the sample number, e is the expression label, and L is the frame length of the sampled video sequence. All frames will be aligned and cropped into pre-processed frames with a width of W, a height of H, and a number of channels of C. The main classification network, namely the 3DResnet network, completes the classification task, including: microexpression sequence Sent into the 3DResnet network to model the micro-expression representation Y with classification significance cls ; The obtained pose constraint feature Y pc With Y cls The added results are used to calculate the cross entropy loss to optimize the model parameters. The calculation process is as follows: Where N is the number of samples, Y gt is the true value of the sample label, and C is the classification category.
Citation Information
Patent Citations
Micro-expression recognition method and system based on optical flow and RGB modal contrast learning
CN113139479A
Method for screening mobile terminal visual attention abnormalities in children based on multimodal data learning
US20240112330A1
Cited By
Micro-expression recognition method and system based on data generation enhancement and multi-feature fusion
CN121214515A
Micro-expression recognition method and system based on data generation enhancement and multi-feature fusion
CN121214515B
