Micro-expression recognition method based on convolutional neural network and optical flow features

Through the combination of convolutional neural network and optical flow features, the shortcomings in accuracy and adaptability of existing micro-expression recognition technology are solved, and accurate recognition of micro-expressions is achieved, especially in complex scenes, the recognition effect is significantly improved. .

CN118675209AActive Publication Date: 2024-09-20UNIV OF ELECTRONICS SCI & TECH OF CHINA

Patent Information

Application Number
CN202410691565.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-30
Publication Date
2024-09-20
Estimated Expiration
2044-05-30

AI Technical Summary

Technical Problem

Existing micro-expression recognition technology has deficiencies in accuracy and adaptability, making it difficult to effectively capture subtle facial activity information, especially when identifying micro-expressions in complex scenes.

Method used

Using convolutional neural network combined with optical flow features, the facial key point information is extracted through the face detection module, the optical flow feature value is calculated, and the binary search algorithm is used to determine the micro-expression vertex frame, and the convolutional neural network model is combined to predict micro-expression categories. .

Benefits of technology

The adaptability and accuracy of micro-expression recognition are improved, and it can effectively identify positive, negative, surprised and other micro-expressions, significantly improving the recognition effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118675209A
    Figure CN118675209A
Patent Text Reader

Abstract

The invention belongs to the field of expression recognition, and provides a micro-expression recognition method based on a convolutional neural network and optical flow features, which is used for improving the suitability and accuracy of micro-expression recognition. The method comprises the following steps: firstly, constructing a face detection module, performing face detection on each image frame in a video segment, outputting face key point information, and extracting facial regions of interest according to the face key point information, including a nose, a mouth, a left eye and eyebrows, and a right eye and eyebrows; then, introducing optical flow information and optical strain information to represent space-time information of facial movement and intensity information of facial deformation, calculating an optical flow characteristic value of each image frame, and searching by using a binary search algorithm to obtain the image frame with the maximum optical flow characteristic value as a vertex frame in micro expression recognition; and finally, constructing a micro-expression recognition model based on the convolutional neural network, taking the optical flow horizontal and vertical components of the vertex frame and the optical strain as input, and outputting a class prediction result of the micro-expression by the micro-expression recognition model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of expression recognition, relates to micro-expression recognition technology, and specifically provides a micro-expression recognition method based on convolutional neural network and optical flow features. Background Art

[0002] Facial expressions can directly convey a person's emotional information. Compared with the artificial controllability of macro expressions, the "flash" of micro expressions is more accurate. Since micro expressions were discovered in 1966, people's research on micro expressions has been developing continuously, and the demand for the application of micro expressions has also been growing.

[0003] Micro-expression recognition can capture subtle facial activity information and obtain the most realistic emotional feedback, which makes micro-expression recognition widely used in psychotherapy, national security, justice and other fields. With the continuous development of artificial intelligence technology, image processing technology based on deep learning is becoming more mature, and face detection technology is becoming more accurate; compared with traditional machine learning technology, convolutional neural network (CNN) is a more powerful feature extractor and classifier; based on this, the present invention provides a micro-expression recognition method based on convolutional neural network and optical flow features. Summary of the invention

[0004] The purpose of the present invention is to provide a micro-expression recognition method based on convolutional neural network and optical flow features, so as to improve the adaptability and accuracy of micro-expression recognition.

[0005] To achieve the above object, the technical solution adopted by the present invention is:

[0006] A micro-expression recognition method based on convolutional neural network and optical flow features comprises the following steps:

[0007] Step 1: Use the face detection module to perform face detection on each image frame in the video segment and output the face key point information;

[0008] Step 2: Extract four facial regions of interest based on the facial key point information: nose, mouth, left eye and eyebrow, right eye and eyebrow;

[0009] Step 3: Use the TV_L1 optical flow calculation algorithm to calculate the optical strain of all image frames and the first image frame in the video segment, and calculate the optical strain value of each region of interest in the image frame, and add them as the optical flow feature value of the image frame;

[0010] Step 4: Take the first frame of the video segment as the micro-expression start frame, and the last frame as the micro-expression end frame. Use a binary search algorithm to search for the image frame with the largest optical flow feature value in the image frame sequence of the video segment, and use it as the micro-expression vertex frame;

[0011] Step 5: The optical strain, horizontal component of optical flow, and vertical component of optical flow of the vertex frame are used as inputs, and the micro-expression recognition model based on the convolutional neural network outputs the micro-expression category prediction results. The categories of micro-expressions include positive, negative, surprise, and others.

[0012] Furthermore, in step 1, the face detection module includes an MTCNN face detection model and an LBF face key point detection model; the MTCNN face detection model performs face detection on each image frame of the video segment, and outputs a stable face bounding box in combination with the C-OF tracking algorithm; the LBF face key point detection model extracts 68 facial key points based on the face bounding box, and outputs them as face key point information.

[0013] Furthermore, in step 2, the facial region of interest extraction process is to determine the upper left vertex and the lower right vertex of the rectangular box corresponding to the nose, mouth, left eye and eyebrow, right eye and eyebrow through the facial key point information, and extract the corresponding facial region of interest from the rectangular box.

[0014] Furthermore, in step 3, the optical flow O of the current image frame relative to the first image frame is:

[0015] O={(u(x,y),v(x,y))|x=1,2,...,X,y=1,2,...,Y},

[0016] Where u represents the horizontal component of the optical flow, v represents the vertical component of the optical flow, (x, y) represents the pixel coordinates; X and Y represent the width and height of the image frame respectively;

[0017] The optical strain ε is calculated based on the horizontal component u and the vertical component v of the optical flow:

[0018]

[0019] Among them, (ε xx , ε yy ) is the normal optical strain component, (ε xy , ε xy ) is the tangential optical strain component;

[0020] The optical strain value ε(x,y) of each pixel in the current image frame is calculated:

[0021]

[0022] The optical strain value of each region of interest is obtained by cumulative calculation, and then the optical strain values ​​of the four regions of interest are added together to obtain the optical flow feature value of the current image frame.

[0023] Furthermore, the micro-expression recognition model based on convolutional neural network includes: 3 feature extraction modules, 2 fully connected layers and a softmax layer; among them, the 3 feature extraction modules adopt the same network structure, and respectively extract features of the optical strain, horizontal component of optical flow and vertical component of optical flow of the vertex frame, and obtain corresponding one-dimensional feature vectors; the 3 one-dimensional feature vectors are concatenated to achieve feature fusion, and the fused feature vectors are converted in dimension through 2 fully connected layers, and finally the softmax layer performs micro-expression category prediction and outputs the category prediction result.

[0024] Furthermore, the feature extraction module includes: 2 convolution models, a maximum pooling layer and a fully connected layer; the 2 convolution models use the same network structure, which is composed of 2 3×3 convolution layers, the step size of the first convolution layer is 1, and the step size of the second convolution layer is 2; the input passes through the two convolution modules and the maximum pooling layer in sequence to obtain a three-dimensional feature map, the three-dimensional feature map is flattened and converted into a one-dimensional feature map, and is output after passing through the fully connected layer.

[0025] Based on the above technical solution, the beneficial effects of the present invention are:

[0026] The invention provides a micro-expression recognition method based on convolutional neural network and optical flow features, wherein the categories of micro-expressions include positive, negative, surprise and others. Firstly, a face detection module is constructed, and face detection is performed on each image frame in a video segment by the face detection module, and face key point information is outputted. Four facial interest regions are extracted according to the face key point information: nose, mouth, left eye and eyebrow, right eye and eyebrow, as core regions for subsequent micro-expression recognition. Then, optical flow information (optical flow horizontal component and optical flow vertical component) and optical strain information are introduced to characterize the temporal and spatial information of facial movement and the intensity information of facial deformation, and the optical flow feature value of each image frame is calculated. A binary search algorithm is used to search and obtain an image frame with the largest optical flow feature value as a vertex frame in micro-expression recognition. Finally, a micro-expression recognition model based on convolutional neural network is constructed, and the optical flow horizontal component, optical flow vertical component and optical strain of the vertex frame are used as inputs, and the micro-expression recognition model outputs a micro-expression category prediction result.

[0027] In summary, the present invention can realize the recognition of positive, negative, surprising and other micro-expressions, and has good adaptability and accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 Schematic diagram of the process of the micro-expression recognition method based on convolutional neural network and optical flow features in the present invention.

[0029] Figure 2 This is a network structure diagram of the micro-expression recognition model based on convolutional neural network in the present invention.

[0030] Figure 3 This is a network structure diagram of the feature extraction module in the micro-expression recognition model of the present invention. DETAILED DESCRIPTION

[0031] In order to make the purpose, technical solution and beneficial effects of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and embodiments.

[0032] This embodiment provides a micro-expression recognition method based on convolutional neural network and optical flow features, and its process is as follows: Figure 1 As shown in FIG. 1 , a sliding time window of 0.5 seconds is first set to divide the complete long video to be identified into several non-overlapping video segments, and then micro-expression recognition is performed on each video segment; the specific steps include:

[0033] Step 1: Use the face detection module to perform face detection on each frame of the video segment and output the face key point information;

[0034] Specifically, the face detection module includes the MTCNN face detection model and the LBF face key point detection model; the MTCNN face detection model performs face detection on each image frame of the video segment, and outputs a stable face bounding box in combination with the C-OF tracking algorithm; the LBF face key point detection model extracts 68 facial key points based on the face bounding box, and outputs them as face key point information;

[0035] Step 2: Extract four facial regions of interest (ROIs) based on the facial key point information: nose, mouth, left eye and eyebrow, right eye and eyebrow;

[0036] Specifically, corresponding to the nose, mouth, left eye and eyebrow, right eye and eyebrow, the upper left vertex and the lower right vertex of the rectangular box are determined by the facial key point information, and the corresponding facial region of interest is extracted from the rectangular box;

[0037] Step 3: Use the TV_L1 optical flow calculation algorithm to calculate the optical strain of the face area in all image frames in the video segment and the first image frame, and calculate the optical strain value of each region of interest in the image frame, and add them as the optical flow feature value of the image frame;

[0038] Specifically, the optical flow consists of a vertical component and a horizontal component, which is represented as a tuple:

[0039] O={(u(x,y),v(x,y))|x=1,2,...,X,y=1,2,...,Y},

[0040] Wherein, O represents the optical flow of the image frame, u represents the horizontal component of the optical flow, v represents the vertical component of the optical flow, (x, y) represents the pixel coordinates; X and Y represent the width and height of the image frame respectively;

[0041] The optical strain ε is calculated based on the horizontal component u and the vertical component v. The optical strain ε can provide the intensity information of the facial deformation. The optical strain ε is expressed as:

[0042]

[0043] Among them, (ε xx , ε yy ) is the normal optical strain component, (ε xy , ε xy ) is the tangential optical strain component;

[0044] The optical strain value ε(x,y) of each pixel in the image frame is calculated:

[0045]

[0046] The optical strain value of each region of interest is obtained by cumulative calculation, and then the optical flow feature value of the image frame is obtained;

[0047] Step 4: Take the first frame of the video segment as the micro-expression start frame, and the last frame as the micro-expression end frame. Use a binary search algorithm to search for the image frame with the largest optical flow feature value in the image frame sequence of the video segment, and use it as the micro-expression vertex frame;

[0048] Step 5: Taking the optical strain, horizontal component of optical flow and vertical component of optical flow of the vertex frame as input, the micro-expression recognition model based on convolutional neural network outputs the prediction result of the category of micro-expression, and the categories of micro-expression include positive, negative, surprise and others;

[0049] Specifically, the micro-expression recognition model based on convolutional neural network is as follows: Figure 2 As shown in the figure, it includes: 3 feature extraction modules, 2 fully connected layers and a softmax layer; the optical strain, horizontal component of optical flow and vertical component of optical flow of the vertex frame are normalized by the minimum-maximum normalization method, and the normalized results are input into the micro-expression recognition model; the 3 feature extraction modules use the same network structure and are used as 3 branches to extract features of the optical strain, horizontal component of optical flow and vertical component of optical flow of the vertex frame respectively, and obtain corresponding one-dimensional feature vectors; the 3 one-dimensional feature vectors are concatenated to realize feature fusion, and the fused feature vector contains both the spatiotemporal information about facial motion and the intensity information about facial deformation; the fused feature vector is converted into dimension by 2 fully connected layers, and finally the softmax layer predicts the category of micro-expression and outputs the category prediction result;

[0050] More specifically, the feature extraction module is as follows Figure 3As shown in the figure, it includes: 2 convolution models, a maximum pooling layer and a fully connected layer; the two convolution models use the same network structure, which is composed of two 3×3 convolution layers, the step size of the first convolution layer is 1, and the step size of the second convolution layer is 2; the input passes through two convolution modules and the maximum pooling layer in sequence to obtain a three-dimensional feature map, which is flattened and converted into a one-dimensional feature map, and is output after passing through the fully connected layer.

[0051] In this embodiment, the dimensions of the normalized optical strain, horizontal component of optical flow, and vertical component of optical flow of the vertex frame are 48×48×1, the dimension of the one-dimensional feature vector output by the feature extraction module is 128, the dimension of the feature vector after fusion is 384, and the dimension of the feature vector after dimensional conversion is 4; the dimension of the three-dimensional feature map extracted in the feature extraction module is 6×6×16, and the dimension of the one-dimensional feature map after conversion is 576.

[0052] In this embodiment, the micro-expression recognition model is trained offline. The training process uses the Adam optimizer with multi-class cross entropy loss and sets the initial learning rate to 2×10 -4 If the loss value does not change within 2 training cycles, the learning rate is multiplied by 0.5; if the loss value does not change within 5 training cycles, the training is stopped early; the loss function loss is set to:

[0053]

[0054] Among them, C is the number of micro-expression categories, N is the number of training samples for each category, and g i,j represents the sample label, p i,j Represents the model output prediction value;

[0055] The training data set uses a self-made data set, and the data collection process is as follows: while the volunteers are watching the stimulus video, a sampling video is collected through a video recorder; the sampling video is processed in steps 1 to 4, the data processing results are used as sample input, and the sample labels are manually annotated to form training samples.

[0056] The above description is only a specific implementation mode of the present invention. Any feature disclosed in this specification, unless otherwise stated, can be replaced by other alternative features that are equivalent or have similar purposes; all the disclosed features, or all the steps in the methods or processes, except for mutually exclusive features and / or steps, can be combined in any way.

Claims

1. A micro-expression recognition method based on convolutional neural network and optical flow features, characterized in that: The following steps are involved: Step 1: Use the face detection module to perform face detection on each image frame in the video segment and output the face key point information; Step 2: Extract four facial regions of interest based on the facial key point information: nose, mouth, left eye and eyebrow, right eye and eyebrow; Step 3: Use the TV_L1 optical flow calculation algorithm to calculate the optical strain of all image frames and the first image frame in the video segment, and calculate the optical strain value of each region of interest in the image frame, and add them up as the optical flow feature value of the image frame; Step 4: Take the first frame of the video segment as the micro-expression start frame, and the last frame as the micro-expression end frame. Use a binary search algorithm to search for the image frame with the largest optical flow feature value in the image frame sequence of the video segment, and use it as the micro-expression vertex frame; Step 5: The optical strain, horizontal component of optical flow, and vertical component of optical flow of the vertex frame are used as inputs, and the micro-expression recognition model based on the convolutional neural network outputs the micro-expression category prediction results. The categories of micro-expressions include positive, negative, surprise, and others.

2. The micro-expression recognition method based on convolutional neural network and optical flow features according to claim 1, characterized in that: In step 1, the face detection module includes the MTCNN face detection model and the LBF face key point detection model; the MTCNN face detection model performs face detection on each image frame of the video segment, and outputs a stable face bounding box in combination with the C-OF tracking algorithm; the LBF face key point detection model extracts 68 facial key points based on the face bounding box, and outputs them as face key point information.

3. The micro-expression recognition method based on convolutional neural network and optical flow features according to claim 1, characterized in that: In step 2, the facial region of interest extraction process is to determine the upper left vertex and the lower right vertex of the rectangular box corresponding to the nose, mouth, left eye and eyebrow, right eye and eyebrow through the facial key point information, and extract the corresponding facial region of interest from the rectangular box.

4. The micro-expression recognition method based on convolutional neural network and optical flow features according to claim 1, characterized in that: In step 3, the optical flow O of the current image frame relative to the first image frame is: O={(u(x,y),v(x,y))|x=1,2,...,X,y=1,2,...,Y}, Where u represents the horizontal component of the optical flow, v represents the vertical component of the optical flow, (x, y) represents the pixel coordinates; X and Y represent the width and height of the image frame respectively; The optical strain ε is calculated based on the horizontal component u and the vertical component v of the optical flow: Among them, (ε xx , ε yy ) is the normal optical strain component, (ε xy , ε xy ) is the tangential optical strain component; The optical strain value ε(x,y) of each pixel in the current image frame is calculated: The optical strain value of each region of interest is obtained by cumulative calculation, and then the optical strain values ​​of the four regions of interest are added together to obtain the optical flow feature value of the current image frame.

5. The micro-expression recognition method based on convolutional neural network and optical flow features according to claim 1, characterized in that: The micro-expression recognition model based on convolutional neural network includes: 3 feature extraction modules, 2 fully connected layers and a softmax layer; among them, the 3 feature extraction modules use the same network structure, and respectively extract features of the optical strain, horizontal component of optical flow and vertical component of optical flow of the vertex frame, and obtain corresponding one-dimensional feature vectors; the 3 one-dimensional feature vectors are concatenated to achieve feature fusion, and the fused feature vectors are converted into dimensions through 2 fully connected layers, and finally the softmax layer performs micro-expression category prediction and outputs the category prediction results.

6. The micro-expression recognition method based on convolutional neural network and optical flow features according to claim 5, characterized in that: The feature extraction module includes: 2 convolution models, a maximum pooling layer and a fully connected layer; the two convolution models use the same network structure, which is composed of two 3×3 convolution layers, the step size of the first convolution layer is 1, and the step size of the second convolution layer is 2; the input passes through the two convolution modules and the maximum pooling layer in sequence to obtain a three-dimensional feature map, which is flattened and converted into a one-dimensional feature map, and then output after passing through the fully connected layer.

Citation Information

Patent Citations

  • Micro-expression recognition method and system based on channel attention mechanism

    CN112001241A

  • Cross-database micro-expression recognition method based on multi-feature fusion

    CN112766159A

  • Face silence living body detection method and device, readable storage medium and equipment

    CN114764924A

  • Micro-expression recognition method based on multi-channel optical flow feature fusion

    CN117912077A

  • Method for generating interframe using optical flow algorithm

    KR1020100087963A

Cited By

  • Micro-expression recognition method based on visual Transform

    CN119339422A

  • Infant nursing system and method for obstetrics and gynecology department

    CN120220995A

  • Milk preference degree prediction method and device based on micro-expression recognition and medium

    CN120340096A