Facial expression recognition method based on feature fusion

The geometric and texture features are extracted through the face alignment algorithm and LBP algorithm, combined with the maximum correlation minimum redundancy algorithm and convolutional neural network, to solve the problems of information redundancy and over-fitting in facial expression recognition, and achieve higher accuracy. Recognition accuracy.

CN114998966BActive Publication Date: 2024-10-15ZHEJIANG HUIZHONG GEOGRAPHIC INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210645220.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-08
Publication Date
2024-10-15
Estimated Expiration
2042-06-08

AI Technical Summary

Technical Problem

Existing facial expression recognition methods are susceptible to interference from human factors, deep learning models are prone to overfitting in limited sample situations, and methods based on feature fusion face information redundancy issues, affecting recognition accuracy.

Method used

The face alignment algorithm is used to extract geometric features of Euclidean distance and eccentricity, combined with the LBP algorithm to extract texture features, and the features are selected through the maximum correlation and minimum redundancy algorithm, and the deeper features of the convolutional neural network are integrated, and finally the Softmax classification function is used Classify.

Benefits of technology

It improves the accuracy of facial expression recognition and achieves an average recognition accuracy of 74.12%, which is improved compared to other mainstream methods and verifies the effectiveness of feature fusion and feature selection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114998966B_ABST
    Figure CN114998966B_ABST
Patent Text Reader

Abstract

The present invention relates to a facial expression recognition method based on feature fusion. The present invention adopts a face alignment algorithm to locate 68 facial key points in a to-be-recognized image, and extracts geometric features of Euclidean distance and eccentricity according to the key points; then adopts an LBP algorithm to extract texture features of the face; fuses the geometric features and texture features; then adopts a maximum relevance minimum redundancy algorithm (mRMR) to select features; finally, the selected features are fused with deeper features extracted by a convolutional neural network, and sent to a Softmax classification function for classification; and facial expression recognition is completed. In the case of fusing multiple features, the present invention uses a maximum relevance minimum redundancy method to select the most relevant features to reduce the size of the features, and deletes redundant features at the same time, so that the expression recognition accuracy is high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of graphic image classification and relates to a facial expression recognition method based on feature fusion. Background Art

[0002] Facial expressions are one of the most effective and common ways to express human emotions and intentions. Facial expression recognition has a wide range of applications in daily life. For example, social robots, medical services, and fatigue driving. The famous psychologist Ekman discovered that there are six basic facial expressions in the world, and he and Friensen defined six basic facial expressions through a series of cross-civilization communication studies: anger, disgust, fear, happiness, sadness, and surprise. Therefore, the academic community generally began to find ways for computers to automatically recognize facial expressions by classifying these six basic facial expressions.

[0003] Traditional facial expression recognition methods usually use manual features for facial expression recognition, such as PCA, ICA, and FLD. PCA is a common data analysis method, which is always used for dimensionality reduction of high-dimensional data to extract the main characteristic components of the data. ICA can effectively extract expression features with high-order statistical characteristics and analyze them from high-order correlations. FLD can extract the most discriminative low-dimensional features from high-dimensional features, so that the same samples can be approached and different samples can be separated. However, the above methods are based on manual features and are easily interfered by human factors. In recent years, deep learning has shown powerful information processing capabilities and better robustness, which does not rely on the precise design of manual features. Many researchers have proposed introducing classic network structures into facial expression recognition. In order to improve performance, some researchers have suggested fusing multiple features for comprehensive representation. Although the accuracy of recognition has been improved, the complexity of the network in these methods has also increased.

[0004] Although large-scale deep learning models achieve high recognition accuracy, the limited number of samples in facial expression datasets may limit performance. Without sufficient training samples, large-scale deep learning models are prone to overfitting. In order to achieve a balance between structural complexity and recognition accuracy, researchers have tried to design a lightweight deep learning model with compact structure and strong feature extraction capabilities. However, some facial expressions are still difficult to distinguish, such as disgust and sadness. Extracting effective facial features is crucial for facial emotion recognition. Typically, two types of features are used to distinguish facial emotions: geometric features and appearance features. Geometric features provide clues about the shape and position of facial components, while appearance-based features contain information about gullies, bulges, wrinkles, etc. But one of their major drawbacks is that they are difficult to generalize to different people. Therefore, considering feature fusion may be an effective way to design more discriminative features for facial expression recognition. However, methods based on feature fusion face the problem of information redundancy, which affects the accuracy of facial expression recognition. In fact, processing a large number of features increases the computational time and overwhelms the classifier with unnecessary or redundant information. Therefore, in order to better train facial expression recognition, it is crucial to select correct and effective features, because irrelevant and noisy features may mislead and negatively affect the recognition system. Summary of the invention

[0005] The purpose of the present invention is to provide a method for facial expression recognition based on feature fusion.

[0006] The present invention comprises the following steps:

[0007] The face alignment algorithm is used to locate the 68 facial key points in the image to be identified, and the geometric features of Euclidean distance and eccentricity are extracted based on the key points. a ; Then use LBP algorithm to extract the texture feature F of the face s ; The geometric feature F a and texture feature F s Fusion is performed to obtain a new feature vector F as Then the maximum relevance minimum redundancy algorithm (mRMR) is used to integrate the feature F as Select; finally, the selected feature F as Compared with the deeper features F extracted by the convolutional neural network d After fusion, the data are sent to the Softmax classification function for classification to complete facial expression recognition.

[0008] The face alignment algorithm uses a cascade regression tree to estimate the positions of key points of the face from a sparse subset of pixel grayscale values, and then calculates the Euclidean distance between each coordinate and the ellipse eccentricity of the key position;

[0009] The LBP algorithm defines a basic operator, applies the operator to the entire image, and extracts the texture feature F of the image through a sliding window. s ;

[0010] The maximum relevance minimum redundancy algorithm reduces the size of features by selecting the most relevant features while removing redundant features.

[0011] The Euclidean distance d(X,Y) is used to capture facial activity during expression of emotions. Where x1 and y1 show the coordinates of the first keypoint X, and x2 and y2 are the coordinates of the second keypoint. Since 68 keypoints are extracted, 2278 (68×(68-1) / 2) different linear features are calculated.

[0012] The eccentricity is used to define the ellipticity level. It is the ratio of the distance from the curve to the focus c of the ellipse to the distance to the fixed straight line a. If the eccentricity is close to zero, the ellipse is more like a circle. However, if it is close to 1, the ellipse is more elliptical. Considering that the eccentricity features of the mouth, eyes, and eyebrows may provide important information about the changes in their geometric shapes across the entire expression state, the eccentricity features of these five organs are extracted.

[0013] Furthermore, the LBP algorithm considers the image f(x,y) and lets v j A pixel position (x, y) representing the gray value, that is, v j =f(x,y). Let v p The sampling points representing the grayscale are located in an equally spaced circle with the number of sample points (P) and the pixel position (x, y) of radius R. Then the grayscale value v p , the position of the pixel (x,y) p ,y p ) is expressed as: f(x p ,y p ),p=0,1,2……,P-1;

[0014] The local texture feature T of the image f(x, y) is the joint distribution of the grayscale values ​​of P+1 pixels. That is: T = t(v j ,v0,v1,……,v P-1 ); Subtract the gray value of the central pixel in the neighborhood, then T = t(v j ,v0-v j ,v1-v j ,……,v P-1 -v j); the approximation of the joint distribution is to assume that the center pixel is statistically independent of the difference, that is: T = t(v j )t(v0-v j ,v1-v j ,……,v P-1 -v j ); where t(v j ) is the intensity distribution on f(x,y) and does not contain any useful information, so it is omitted. Therefore, only the joint distribution of the difference is considered, that is: t(s(v0-v j ),s(v1-v j ),……,s(v 0-1 -v j )); where s(3) is the threshold (step) function: The general algorithm of LBP is based on this joint distribution.

[0015] The geometrical feature F a and texture feature F s The steps of fusion are:

[0016] First, the geometric feature F a and texture feature F s Normalization is performed, and the formula is as follows: Among them, f i represents the i-th data in its feature vector, f max and f min are the corresponding maximum and minimum values ​​in their respective eigenvectors. After processing, each eigenvalue is in the interval [0,1], eliminating the influence of the dimension between features. Then, the normalized geometric feature F a Features and texture features F S The features are fused in series to obtain a new feature vector F as =[F a ,F s ].

[0017] Furthermore, the maximum relevance minimum redundancy algorithm (mRMR) is:

[0018] Given n features for classification, the goal of mRMR is to determine a subset of m features that accurately identify the target label using the mutual information between the features. The mutual information estimate I(a, b) between two given discrete random variables a and b is determined based on their individual probabilities P(a), P(b) and joint probability P(ab),

[0019] Where a is the feature in the selected feature set A, and b is the class label in the target prototype set B.

[0020] For two highly interdependent features, deleting either one of them will not change the class discrimination ability of the feature. i Maximize the dependency with class label b:

[0021] Let the pair feature a i and a j Minimize dependencies: This constraint is used only to filter out mutually exclusive features.

[0022] The convolutional neural network performs two convolutions and one maximum pooling operation on a 48×48 image, followed by one convolution and one maximum pooling operation, and finally fully connects the output 7×1 features together with the selected features to convert the network's estimated value into the probability distribution of the predicted class through the Softmax activation function.

[0023] The feature F after feature selection as Compared with the deeper features F extracted by the convolutional neural network d The steps for fusion are:

[0024] First, the deeper features F extracted by the convolutional neural network d And the feature F after feature selection as The data was normalized to zero mean, as shown in the formula As shown; where f i represents the i-th data in its feature vector; μ is the mean of all sample data, which is calculated as follows σ is the standard deviation, which is used to measure the dispersion of data and is calculated as follows Then the zero-mean standardized F d Features and F as The features are vector concatenated to obtain the fused feature vector F asd , F asd =[F as , F d ].

[0025] In the case of fusing multiple features, the present invention uses the maximum relevance minimum redundancy (mRMR) algorithm to select the most relevant features to reduce the size of the features and delete redundant features. A convolutional neural network (CNN) is used to recognize seven facial expressions on the FER2013 facial expression dataset: neutral, happy, sad, angry, fearful, disgusted and surprised. The average recognition accuracy of the method is 74.12%, which is higher than other mainstream methods, verifying the effectiveness of the proposed method. The comparison results are shown in the table.

[0026] Table 1 Comparison between this method and current mainstream methods (FER2013)

[0027] BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 It is a schematic diagram of the flow chart of the model of the present invention;

[0029] Figure 2 This is a schematic diagram of 68 key points of a human face;

[0030] Figure 3 Schematic representation of five facial ellipses;

[0031] Figure 4 This is a schematic diagram of the LBP features of the face;

[0032] Figure 5 This is the structure of the convolutional neural network. DETAILED DESCRIPTION

[0033] The technical solution of the present invention is further described below in conjunction with the accompanying drawings.

[0034] like Figure 1 As shown, a facial expression recognition method based on feature fusion specifically includes the following steps:

[0035] Step 1: Face detection and alignment: Detect faces in the input image. The face detection algorithm uses the Histogram of Oriented Gradients (HOG) and Support Vector Machine (SVM). The face alignment algorithm is used to locate faces. Figure 2 The 68 facial key points are shown and aligned to the input face.

[0036] Step 2, data preprocessing: Perform grayscale image to standard grayscale image conversion, that is, minimum to maximum scaling, which is to scale the image in a way that represents zero mean and unit variance. Next, perform data enhancement on the image data by horizontal flipping and angular rotation. The rotation includes rotating the original image and the horizontally flipped image by -9°, -6°, -3°, 3°, 6°, and 9° respectively to achieve the effect of data enhancement.

[0037] Step 3, Feature Extraction: After extracting 68 key points, two types of geometric features are considered: linear features and eccentricity features. For linear features (LF), the Euclidean distance d(X,Y) between all landmark pairs is used to capture facial activities during the expression of emotions. Where x1 and y1 show the coordinates of the first keypoint X, and x2 and y2 are the coordinates of the second keypoint. Since 68 keypoints are extracted, 2278 (68×(68-1) / 2) different linear features are calculated.

[0038] Eccentricity is used to define the level of ellipticity. It is the ratio of the distance from the curve to the focus c of the ellipse to the distance to the fixed line a. If the eccentricity is close to zero, the ellipse is more like a circle. However, if it is close to 1, the ellipse is more elliptical. For this work, considering that the eccentricity features of the mouth, eyes, and eyebrows may provide important information about the changes in their geometric shapes across the entire expression state, we extract the eccentricity features of these five organs, such as Figure 3 shown.

[0039] The local binary pattern (LBP) histogram is selected as the texture feature. Figure 4 As shown in Figure 2, the general LBP overview is as follows. Consider an image f(x,y) and let v j A pixel position (x, y) representing the gray value. j =f(x,y). Let v p The sampling points representing the grayscale are located in an equally spaced circle with the number of sample points (P) and the pixel position (x, y) of radius R. Then the grayscale value v p , the position of the pixel (x,y) p ,y p ) is expressed as: f(x p ,y p ),p=0,1,2……,P-1; The local texture feature of image f(x,y) is the joint distribution of grayscale values ​​of P+1 pixels. That is: T = t(v j ,v0,v1,……,v P-1 ); subtract the gray value of the central pixel in the neighborhood, that is, T = t(v j ,v0-v j ,v1-v j ,……,v P-1 -v j ); the approximation of the joint distribution is to assume that the center pixel is statistically independent of the difference, that is: T = t(v j )t(v0-v j ,v1-v j ,……,v P-1 -v j ); where t(v j ) is the intensity distribution on f(x,y), which is omitted because it does not contain any useful information. Therefore, only the joint distribution of the difference is considered. That is: t(s(v0-v j ),s(v1-v j ),……,s(v P-1 -v j )); where s(3) is the threshold (step) function: The general algorithm of LBP is based on the above joint distribution.

[0040] This step extracts the geometric features of Euclidean distance and eccentricity and the texture features of local binary patterns, and fuses the geometric features and texture features. The specific steps of feature fusion are as follows: First, the geometric feature F a and texture feature F s Normalization is performed, and the formula is as follows: Among them, f i represents the i-th data in its feature vector, f max and f min are the corresponding maximum and minimum values ​​in their respective eigenvectors. After processing, each eigenvalue is in the interval [0,1], eliminating the influence of the dimension between features. Then, the normalized geometric feature F a Features and texture features F S The features are fused in series to obtain a new feature vector F as =[F a ,F s ]. Extracting effective facial features and considering feature fusion will have a positive effect on improving the accuracy of expression recognition.

[0041] Step 4, feature selection: The maximum relevance minimum redundancy (mRMR) model is used to help select the most relevant features, as well as the most compact or non-redundant features to represent the face mesh model. Given n features for classification, the goal of mRMR is to determine a subset of m features that will accurately identify the target label using the mutual information between them. The mutual information estimate I(a, b) between two given discrete random variables a and b is determined based on their individual probabilities P(a), P(b) and joint probability P(ab), Where a is a feature in the selected feature set A, and b is the class label in the target prototype set B. For two highly interdependent features, deleting either of them will not change the class discrimination ability of the feature. i Maximize the dependency with class label b: Let the pair feature a i and a j Minimize dependencies: This constraint is used only to filter out mutually exclusive features.

[0042] This step uses the maximum correlation minimum redundancy (mRMR) algorithm to fused the features F in step three. as The algorithm reduces the feature size by selecting the most relevant features while removing redundant features.

[0043] Step 5: Expression classification: Convolutional neural network (CNN) is a special type of artificial neural network (ANN) model, which was originally introduced to process image data recognition and classification. The network structure of CNN includes input layer, convolution layer, pooling layer and fully connected layer, as well as classifier, loss function, etc. The structure of the convolutional neural network in this embodiment is as follows: Figure 5 As shown in the figure, a 48×48 image is subjected to two convolutions, one maximum pooling operation, and then one convolution, one maximum pooling operation, and finally a full connection output of 7×1 feature F. d And the feature F after feature selection in step 4 as Perform feature fusion. The specific steps of feature fusion are as follows: First, d and feature F as The data was normalized to zero mean, as shown in the formula As shown. Among them, f i represents the i-th data in its feature vector; μ is the mean of all sample data, which is calculated as follows σ is the standard deviation, which is used to measure the dispersion of data and is calculated as follows Then the zero-mean standardized F d Features and F as The features are vector concatenated to obtain the fused feature vector F asd , as follows F asd =[F as , F d ]. After that, F asd The features are fed into a Softmax activation function to transform the network’s estimates into a probability distribution of predicted classes. The closeness between the predictions and the ground truth labels assigned to the dataset samples is then quantified by the Categorical Cross Entropy (CCE) loss function. Minimization of the loss function therefore constitutes the main objective in the network optimization framework. Finally, after the forward pass is completed, backpropagation is performed up and down the network to update the network’s learnable parameters, attempting to achieve convergence between the output predictions and the actual values ​​of the samples, thereby minimizing the loss function. For this problem, the gradient of the loss function is calculated for each learnable parameter and subsequently used to update the corresponding parameter by an arbitrary step, which is determined by the learning rate. While training the network, the initial learning rate was set to 0.001, the batch_size was set to 32, the dropout was set to 0.5, and the regularization parameter was 0.01.

[0044] Finally, the proposed method achieved an average recognition accuracy of 74.12% on the FER2013 facial expression dataset. For the seven facial expressions, neutral, happy, sad, angry, fearful, disgusted, and surprised, the highest recognition accuracy came from happy and surprised expressions, respectively, while the lowest recognition accuracy came from sad and fearful. The classification results are detailed in Table 2. The higher recognition performance of surprise and happiness can be attributed to the strong and unique features of these expressions in terms of facial surface deformation, such as extreme opening of the eyes and mouth in the case of surprise, and stretching of the lips in the case of happiness. In contrast, the poor accuracy of sadness and fear may be related to their high similarity to neutral expressions.

[0045] Table 2 Confusion matrix on FER2013

[0046]

Claims

1. A facial expression recognition method based on feature fusion, characterized in that: The specific steps include: The face alignment algorithm is used to locate the 68 facial key points in the image to be identified, and the geometric features of Euclidean distance and eccentricity are extracted based on the key points. a ; Then use LBP algorithm to extract the texture feature F of the face s ; The geometric feature F a and texture feature F s Fusion is performed to obtain a new feature vector F as ; Then the maximum relevance minimum redundancy algorithm mRMR is used to select features; Finally, the selected features F as Compared with the deeper features F extracted by the convolutional neural network d The fusion is performed and sent to the Softmax classification function for classification; facial expression recognition is completed; The maximum relevance minimum redundancy algorithm reduces the size of features by selecting the most relevant features while removing redundant features; The maximum relevance minimum redundancy algorithm mRMR is: Given n features for classification, the goal of mRMR is to determine m feature subsets that accurately identify the target label using the mutual information between the features; the mutual information estimate I(a, b) between two given discrete random variables a and b is determined based on their individual probabilities P(a), P(b) and joint probability P(ab), Where a is the feature in the selected feature set A, and b is the class label in the target prototype set B; For two highly interdependent features, deleting either one of them will not change the class discrimination ability of the feature; Let the feature variable a i Maximize the dependency with class label b: Let the pair feature a i and a j Minimize dependencies: This constraint is used only to filter out mutually exclusive features.

2. The method for facial expression recognition based on feature fusion as claimed in claim 1, characterized in that: The face alignment algorithm uses a cascade regression tree to estimate the positions of facial key points from a sparse subset of pixel grayscale values, and then calculates the Euclidean distance between each coordinate and the ellipse eccentricity of the key position.

3. The method for facial expression recognition based on feature fusion as claimed in claim 1, characterized in that: The LBP algorithm defines a basic operator, applies the operator to the entire image, and extracts the texture feature F of the image through a sliding window. s .

4. The method for facial expression recognition based on feature fusion as claimed in claim 3, characterized in that: The LBP algorithm considers an image f(x,y) and lets v j A pixel position (x, y) representing the gray value, that is, v j =f(x,y); let v p The sampling points representing the grayscale are located in an equally spaced circle with the number of sample points (P) and the pixel position (x, y) of radius R; then the grayscale value v p , the position of the pixel (x,y) p ,y p ) is expressed as: f(x p ,y p ),p=0,1,2……,P-1; The local texture feature T of the image f(x, y) is the joint distribution of the grayscale values ​​of P+1 pixels; that is, T = t(v j ,v0,v1,……,v P-1 ); Subtract the gray value of the central pixel in the neighborhood, then T = t(v j ,v0-v j ,v1-v j ,……,v P-1 -v j ); the approximation of the joint distribution is to assume that the center pixel is statistically independent of the difference, that is: T = t(v j )t(v0-v j ,v1-v j ,……,v P-1 -v j ); where t(v j ) is the intensity distribution on f(x,y), which does not contain any useful information and is therefore omitted; therefore, only the joint distribution of the differences is considered, namely: t(s(v0-v j ),s(v1-v j ),……,s(v P-1 -v j )); where s(u) is the threshold (step) function: The general algorithm of LBP is based on this joint distribution.

5. The method for facial expression recognition based on feature fusion as claimed in claim 1, characterized in that: The geometrical feature F a and texture feature F s The steps of fusion are: First, the geometric feature F a and texture feature F s Normalization is performed, and the formula is as follows: Among them, f i represents the i-th data in its feature vector, f max and f min are the corresponding maximum and minimum values ​​in their respective eigenvectors. After processing, each eigenvalue is in the interval [0,1], eliminating the influence of the dimension between features. Then, the normalized geometric feature F a Features and texture features F S The features are fused in series to obtain a new feature vector F as =[F a ,F s ].

6. The method for facial expression recognition based on feature fusion as claimed in claim 1, characterized in that: The feature F after the selection as Compared with the deeper features F extracted by the convolutional neural network d The steps for fusion are: First, the deeper features F extracted by the convolutional neural network d And the feature F after feature selection as The feature data is normalized to zero mean, as shown in the formula As shown; where f i represents the i-th data in its feature vector; μ is the mean of all sample data, which is calculated as follows σ is the standard deviation, which is used to measure the dispersion of data and is calculated as follows Then the zero-mean standardized F d Features and F as The features are vector concatenated to obtain the fused feature vector F asd , F asd =[F as , F d ].