# Facial Expression Recognition Based on LDA Feature Space Optimization

Authors: Fanchen Zheng
Journal: Computational Intelligence and Neuroscience
 (2022)

---

## Abstract

With the development of artificial intelligence, facial expression recognition has become an important part of the current research due to its wide application potential. However, the qualities of the face features will directly affect the accuracy of the model. Based on the KDEF face public dataset, the author conducts a comprehensive analysis of the effect of linear discriminant analysis (LDA) dimensionality reduction on facial expression recognition. First, the features of face images are extracted respectively by manual method and deep learning method, which constitute 35-dimensional artificial features, 128-dimensional deep features, and the hybrid features. Second, LDA is used to reduce the dimensionality of the three feature sets. Then, machine learning models, such as Naive Bayes and decision tree, are used to analyze the results of facial expression recognition before and after LDA feature dimensionality reduction. Finally, the effects of several classical feature reduction methods on the effectiveness of facial expression recognition are evaluated. The results show that after the LDA feature dimensionality reduction being used, the facial expression recognition based on these three feature sets is improved to a certain extent, which indicates the good effect of LDA in reducing feature redundancy.


---

## Body

## 1. Introduction

With the development of the information society, as one of the subjects for human information exchange, the accurate recognition of facial expression will help to improve the efficiency of people’s information exchange and to save time and cost. As one of the most primitive ways of information interaction, facial expression has been preserved to this day and plays an irreplaceable role. People’s facial expressions can reveal their attitudes to the received information, the emotions toward people or things, and even their inner thoughts. Therefore, the technology of facial expression recognition can be applied to various scenarios, including human-computer interaction, as well as the security and medical fields, such as public security control, fraud behavior analysis, and patient emotion analysis. The method of facial expression recognition has become a research hotspot in the field of computer vision.Facial expression recognition can be roughly described as analyzing the data of face images by computer, extracting the useful feature information for recognition, and using this information to determine the category of the images. However, as the facial features are extracted and constructed by a variety of feature extraction methods, they are often of high dimensions. If the high-dimensional features are directly used in the subsequent recognition tasks, then it will bring great difficulties for the recognition task. The reason is that although the high-dimensional features contain the complete face information, they have a large number of redundant features. As the number of samples increases, the redundant information will greatly increase the computational resource overhead but reduce the performance of the recognition model. When the amount of data cannot support the feature dimension, a “dimension disaster” will occur. The performance of the recognition model drops greatly or even becomes ineffective. Therefore, it is a key step to reduce the dimension of high-dimensional features in face recognition technology, which has extremely important practical significance.The accurate recognition of facial expression recognition is inseparable from the extraction of multidimensional features, so redundant features are inevitable. Although the LDA feature dimensionality reduction method has been widely used in the field of face recognition, the previous work had not analyzed the dimensionality reduction effect of different types of feature sets on expressions. Based on the KDEF face public dataset, this study constructs three types of feature sets such as face traditional artificial feature sets, deep learning feature sets, and hybrid feature sets. Furthermore, it performs LDA feature dimension reduction respectively and uses machine learning models to classify the facial expressions. The experimental results show that dimensionality reduction of hybrid features can achieve the best accuracy of facial expression classification, which shows the importance of multidimensional hybrid feature extraction for machine learning tasks.In this study, it introduces the positioning of human facial key points, the definition of action units, and the construction of the coding system in Section2. In Section 3, the process of image correction, feature extraction, feature set construction, and feature dimensionality reduction are introduced in detail. In Section 4, the classification effects of different feature sets under different classification methods and dimensionality reduction methods are compared and analyzed. The conclusions and future studies are presented in Section 5.


## 2. Related Work

The key of facial expression recognition is to construct the concise and accurate facial feature descriptors. The method based on the complete face recognition generally uses the traditional feature descriptors, such as Gabor [1], local binary pattern (LBP) [2], and histogram of oriented gradient (HOG) [3], to extract and construct the global feature set of face images. However, in the actual scenes, the face information in the collected images is often incomplete due to various factors, such as the information loss caused by the shooting angle and the face occlusion caused by glasses, masks, or beards. As the method cannot extract enough face information for recognition, it is difficult to improve the recognition accuracy. In this regard, researchers propose a method to extract high-dimensional face features by the key points of the face [4]. The core of this method is to accurately locate the key points of the face and correct them. The research on the facial key points can be traced back to the facial action coding system (FACS) [5]. FACS is developed by Ekman and Friesen to study the correspondence between facial muscle movements and different expressions. It is a system for classifying human facial movements through facial appearance. The movement of the facial muscles is encoded by FACS in accordance with the subtle changes of the face. It is deconstructed into specific action units (AUs) that generate expressions, which are independent but interconnected. The codes of 46 main action units and their definitions are listed in Table 1.Table 1
Codes and definitions of main action units.
Action unitDefinitionAction unitDefinitionAction unitDefinitionAU01Raise the inner eyebrowsAU13Pull the corners of the mouth upAU25Separate the lips to expose the teethAU02Raise the outer eyebrowsAU14Shrink the corners of the mouth towards the teethAU26Separate the lips to see the tongueAU04Droop the eyebrows overallAU15Pull the corners of the mouth down verticallyAU27Separate the lips to see the throatAU05Raise the upper eyelidsAU16Pull the lower lip downAU28Suck the lips to cover the teethAU06Lift up the cheeksAU17Squeeze the lower lip upwardAU41Droop the upper eyelid slightlyAU07Constrict the eyesAU18Wrinkle the mouth in the middleAU42Droop the upper eyelidAU09Shrink and lift the noseAU20Pull the lips backwardsAU43Close the eyesAU10Raise the upper lipAU22Purse the lips into a funnelAU44Lift the lower eyelid upAU11Deepen the middle nasolabial foldAU23Tighten the lips into a lineAU45Blink two eyesAU12Raise the corners of mouthAU24Squeeze the lips togetherAU46Blink one eyeThe features of these facial AUs and the main regions they control can not only be used to distinguish faces but also to reflect the related facial expressions [6]. Since then, more studies have begun to optimize the key feature descriptors of faces. Belhumeur et al. [7] used the global model to generate local position information as latent variables, derived a Bayesian objective function to optimize these local positions, and used the literature research method [8] to align the faces. Literature [9] introduced a method for constructing facial feature descriptors based on orthogonal difference-local binary pattern (OD-LBP). First, 3 gray level differences are calculated for each orthogonal location by subtracting the 2 nearest neighbors and the center pixel from their respective orthogonal values. Second, the respective differences of gray levels are counted. Finally, a vector is generated by concatenating the binary patterns produced by the two orthogonal groups. Kazemi and Sullivan [10] proposed a general gradient-boosted framework to learn the set of regression trees. This framework used the set of regression trees to estimate the location of face descriptors directly from a sparse subset of pixel intensities and then extracted the face features according to the location.In the process of facial expression recognition, in order to extract more comprehensive face features, the feature dimension is often too high because of the high complexity of facial image data. Therefore, it is usually necessary to reduce the dimension of the extracted features first to reduce the feature redundancy. Principal component analysis (PCA) [11] and linear discriminant analysis (LDA) [12] are widely used because of their simplicity and convenience. Principal component analysis (PCA) is a method based on the Karhunen-Loeve (K-L) transform of statistical theory [13]. Mondal and Bag [14] used PCA to reduce the dimension of the extracted features and combined with the minimum distance classification system to realize face recognition. Zhuang and Guan [15] combined Gabor wavelet and PCA for feature extraction, so as to deal with the full illumination of face images. Linear discriminant analysis (LDA) obtains the optimal projection direction by finding the extreme value of the Fisher criterion function, so that after the sample is projected in this direction, the interclass dispersion is the largest and the intraclass dispersion is the smallest. Fisher’s criterion function was first proposed by Fisher in 1936. It was originally used to solve the problem of binary classification and then extended to multiclassification. Bodini et al. [16] combined the effectiveness of deep convolution neural network (DCNN) feature with the feature dimensionality reduction capability of LDA to solve the problem of face recognition for a single person and single sample. Benouareth [17] proposed a facial feature extraction method that combines likelihood sufficient dimension reduction (LSDR) and LDA to handle the face recognition under pose and illumination changes.Although the LDA feature dimensionality reduction method has been widely used in the field of face recognition, the impact of LDA feature dimensionality reduction on the face recognition under different feature sets has not been evaluated. In this regard, according to the KDEF face public data set, this study conducts a comprehensive analysis for the effect of facial expression recognition based on LDA feature dimensionality reduction, including traditional artificial features, deep learning features, and the hybrid features. First, multidimensional feature extraction is performed. For traditional artificial features, we extract face AU information according to the facial action coding system and construct a 35-dimensional AU feature set. For deep learning features, we use the facial feature extractor based on FaceNet pretraining to extract the deep facial features and construct a 128-dimensional feature set. Second, LDA dimension reduction is performed on the extracted features respectively. Then, machine learning models, such as Naive Bayes and decision trees, are used to analyze the effects of facial expression recognition before and after LDA feature dimensionality reduction. Finally, we compare the effects of PCA and LDA feature dimensionality reduction methods on facial expression recognition. The specific workflow is shown in Figure1.Figure 1
Workflow of facial expression recognition.


## 3. Methods

### 3.1. Face Multidimensional Feature Extraction

In order to fully express the face features, we use different feature extraction methods to extract two aspects of face features according to the KDEF dataset: one is the AU feature based on the artificial methods and the other is the deep feature based on the deep learning.


#### 3.1.1. Face AU Feature Extraction

We adopt the method of AU feature extraction in OpenFace [18] to extract the AU features in face images. As listed in Table 1, the subsets of AU that OpenFace can recognize are as follows: AU01, AU02, AU04, AU05, AU06, AU07, AU09, AU10, AU12, AU14, AU15, AU17, AU20, AU23, AU25, AU26, AU28, and AU45.OpenFace describes the recognizable AUs in two scoring methods: (1) existence: if the AU is visible on the face, then 0 is absent and 1 is present; (2) intensity: if the AU has the intensity score on the interval [0, 5], then 0 is absent and 5 is present at the maximum intensity. OpenFace is able to judge the existence of 18 recognizable AU subsets and score the intensity of 17 AUs except for AU28. Therefore, each face image can form 35-dimensional AU features, as shown in Figure2.Figure 2
AU feature extraction of face.


#### 3.1.2. Face Deep Feature Extraction

In order to enable the deep learning model to focus on the face and better characterize the face, we use the method described in literature [10] to extract the key points from the dataset and correct the face according to the key points. It uses the gradient boosting decision tree (GBDT) regression method to accurately identify the key points of face. One GBDT is composed of multiple trees. Through these trees, the initial face key points are gradually returned to the real face key points. The specific implementation steps are as follows:(1)
There are generally two ways to select the initial face key points. The first one is to take the mean value of real key points of all images as the initial face key points. The second one is to randomly select the real key points of other images as the initial key points of the current image. This study chooses the latter method to select the initial face key points.(2)
When a tree is constructed and multiple images are input into the current tree, each image will fall into a leaf node. Calculate the differences between the current face key points and the real face key points of each image, and take the mean value of the differences of all images in the same leaf node as the residual saved by the leaf node.(3)
Update the current face key points of each image as the sum of the current face key points and the residual.(4)
Repeat steps 2 and 3 until enough trees are established. In that way, the last current face key points can be used as the real face key points.According to the above algorithm, we extract 68 face key points for each face image and use these key points to perform the affine transformation correction on the face, so that the corners of the eyes and the nose are close to the horizontal position. It is shown in Figure3.Figure 3
Process of face correction.After correcting the face image, we use the face feature extractor in OpenFace to extract deep face features. This feature extractor is based on the pretraining deep learning model FaceNet [19], which is shown in Figure 4.Figure 4
128-dimensional deep feature extraction of face.OpenFaces uses 500,000 images to train FaceNet, including the two largest labeled face recognition datasets, CASIA-WebFaces [20], and FaceScrb [21]. It can extract the 128-dimensional deep feature of efficient facial feature expression.


### 3.2. Face Feature Dimensionality Reduction

Due to the diversity of facial expressions, recognizing facial expressions is a multiclassification task, so it needs to use the multiclassification promotion form of LDA. For the problem of multiclassification, we assume the datasetc, in which any sample xi is an n-dimensional vector, and yi is its category, yi∈n1,n2,...,nk , with a total of k categories. Njj=1,2,3,...,k is defined as the number of Class j sample, Xjj=1,2,3,...,k is defined as the set of Class j sample, μjj=1,2,3,...,k is defined as the mean vector of Class j sample, and ∑jj=1,2,3,...,k is defined as the generalized covariance matrix of Class j sample.Assuming that the matrix formed by the projected hyper-plane basis isW=w1,w2,...,wd, then the optimization objective is as follows:(1)argmaxwJW=wTSbwwTSww,where Sw is the intraclass scatter matrix:(2)Sw=∑j=1k∑j=∑j=1kSwj=∑j=1k∑x∈Xjx−μjx−μjT.Sb is the interclass scatter matrix:(3)Sb=∑j=1kNjμj−μμj−μT.In equation (3),(4)μ=1m∑i=1mxi.SinceJW is a matrix, the diagonal element product is used to replace the matrix for optimization:(5)J^W=∏i=1dwiTSbwi∏i=1dwiTSwwi=∏i=1dwiTSbwiwiTSwwi.In equation (5), the right side of J^W is the continuous multiplication form of the generalized Rayleigh quotient. It only needs to obtain the maximum value one by one and then JW will obtain the maximum value. As the maximum value of the Rayleigh quotient wTSbw/wTSww is the maximum eigenvalue of Sw−1Sb, the matrix W formed by the eigenvectors corresponding to the product of the largest d eigenvalues is the mapping result after feature dimensionality reduction.


### 3.3. Introduction of Machine Learning Classification Models

In order to evaluate the influence of the feature set on the face recognition after LDA dimensionality reduction, we rely on the several machine learning methods for facial expression recognition, including Naive Bayes classification model (NB), the decision tree classification model (DT), K-nearest neighbor (KNN), random forest (RF), and support vector machine (SVM). Among them, the Naive Bayes model [22] outputs the probability that a sample belongs to a specific category by predicting the membership probability of the samples and each category. It is assumed that S=s1,s2,...,sn is an item to be classified and each si is a feature attribute of S. According to the existing category set C=c1,c2,...,cm, we can calculate the probability of all categories under the characteristic condition of S and select the category with the highest probability as the category label of S. In this way, we can obtain the equation definition of Naive Bayes classifier as shown in the following equation:(6)VS=argmaxci∈Cpci∏k=1npsk|cipS.In equation (6), VS is the category label of S, pS is a constant for all categories, and pci is the category prior probability. ps1|ci,ps2|ci,...,psn|ci is the conditional probability of each feature attribute in S under the condition of category ci. All of these can be obtained from the training sample sets.The decision tree classification model [23] consists of three parts: root node, internal node, and leaf node. The root node is the starting point of decision-making, and a decision path can be formed from the root node to a leaf node. Each of the internal nodes contains a feature that can divide the data. Each leaf node corresponds to a category. We use the classic algorithm ID3 to build a decision tree model. We suppose that S is the set of training samples, |S| is the number of training samples, and A is any feature of the sample. When the samples are divided into n different classes C1, C2, …, Cn, and the number of samples in these classes is marked as |C1|, |C2|, …, |Cn|, then the probability that any sample S belongs to class Ci is as follows:(7)pSi=CiS.Then, the total information entropy is as follows:(8)EntropyS=−∑S∑npSilogpSi.The information entropy of samples divided in accordance with FeatureA is as follows:(9)EntropyS,A=∑ASvSEntropySv.The information gain of FeatureA on the set S is as follows:(10)GainS,A=EntropyS−EntropyS,A.In equation (9), ∑A is the sum of all possible values v of attribute A, Sv is the subset of sample features A with v value in S, and Sv is the number of samples in Sv. According to the theory of information theory, the ID3 algorithm uses “information gain” to measure uncertainty; that is, the greater the information gain, the smaller the uncertainty and the better the division effect.


## 3.1. Face Multidimensional Feature Extraction

In order to fully express the face features, we use different feature extraction methods to extract two aspects of face features according to the KDEF dataset: one is the AU feature based on the artificial methods and the other is the deep feature based on the deep learning.


### 3.1.1. Face AU Feature Extraction

We adopt the method of AU feature extraction in OpenFace [18] to extract the AU features in face images. As listed in Table 1, the subsets of AU that OpenFace can recognize are as follows: AU01, AU02, AU04, AU05, AU06, AU07, AU09, AU10, AU12, AU14, AU15, AU17, AU20, AU23, AU25, AU26, AU28, and AU45.OpenFace describes the recognizable AUs in two scoring methods: (1) existence: if the AU is visible on the face, then 0 is absent and 1 is present; (2) intensity: if the AU has the intensity score on the interval [0, 5], then 0 is absent and 5 is present at the maximum intensity. OpenFace is able to judge the existence of 18 recognizable AU subsets and score the intensity of 17 AUs except for AU28. Therefore, each face image can form 35-dimensional AU features, as shown in Figure2.Figure 2
AU feature extraction of face.


### 3.1.2. Face Deep Feature Extraction

In order to enable the deep learning model to focus on the face and better characterize the face, we use the method described in literature [10] to extract the key points from the dataset and correct the face according to the key points. It uses the gradient boosting decision tree (GBDT) regression method to accurately identify the key points of face. One GBDT is composed of multiple trees. Through these trees, the initial face key points are gradually returned to the real face key points. The specific implementation steps are as follows:(1)
There are generally two ways to select the initial face key points. The first one is to take the mean value of real key points of all images as the initial face key points. The second one is to randomly select the real key points of other images as the initial key points of the current image. This study chooses the latter method to select the initial face key points.(2)
When a tree is constructed and multiple images are input into the current tree, each image will fall into a leaf node. Calculate the differences between the current face key points and the real face key points of each image, and take the mean value of the differences of all images in the same leaf node as the residual saved by the leaf node.(3)
Update the current face key points of each image as the sum of the current face key points and the residual.(4)
Repeat steps 2 and 3 until enough trees are established. In that way, the last current face key points can be used as the real face key points.According to the above algorithm, we extract 68 face key points for each face image and use these key points to perform the affine transformation correction on the face, so that the corners of the eyes and the nose are close to the horizontal position. It is shown in Figure3.Figure 3
Process of face correction.After correcting the face image, we use the face feature extractor in OpenFace to extract deep face features. This feature extractor is based on the pretraining deep learning model FaceNet [19], which is shown in Figure 4.Figure 4
128-dimensional deep feature extraction of face.OpenFaces uses 500,000 images to train FaceNet, including the two largest labeled face recognition datasets, CASIA-WebFaces [20], and FaceScrb [21]. It can extract the 128-dimensional deep feature of efficient facial feature expression.


## 3.1.1. Face AU Feature Extraction

We adopt the method of AU feature extraction in OpenFace [18] to extract the AU features in face images. As listed in Table 1, the subsets of AU that OpenFace can recognize are as follows: AU01, AU02, AU04, AU05, AU06, AU07, AU09, AU10, AU12, AU14, AU15, AU17, AU20, AU23, AU25, AU26, AU28, and AU45.OpenFace describes the recognizable AUs in two scoring methods: (1) existence: if the AU is visible on the face, then 0 is absent and 1 is present; (2) intensity: if the AU has the intensity score on the interval [0, 5], then 0 is absent and 5 is present at the maximum intensity. OpenFace is able to judge the existence of 18 recognizable AU subsets and score the intensity of 17 AUs except for AU28. Therefore, each face image can form 35-dimensional AU features, as shown in Figure2.Figure 2
AU feature extraction of face.


## 3.1.2. Face Deep Feature Extraction

In order to enable the deep learning model to focus on the face and better characterize the face, we use the method described in literature [10] to extract the key points from the dataset and correct the face according to the key points. It uses the gradient boosting decision tree (GBDT) regression method to accurately identify the key points of face. One GBDT is composed of multiple trees. Through these trees, the initial face key points are gradually returned to the real face key points. The specific implementation steps are as follows:(1)
There are generally two ways to select the initial face key points. The first one is to take the mean value of real key points of all images as the initial face key points. The second one is to randomly select the real key points of other images as the initial key points of the current image. This study chooses the latter method to select the initial face key points.(2)
When a tree is constructed and multiple images are input into the current tree, each image will fall into a leaf node. Calculate the differences between the current face key points and the real face key points of each image, and take the mean value of the differences of all images in the same leaf node as the residual saved by the leaf node.(3)
Update the current face key points of each image as the sum of the current face key points and the residual.(4)
Repeat steps 2 and 3 until enough trees are established. In that way, the last current face key points can be used as the real face key points.According to the above algorithm, we extract 68 face key points for each face image and use these key points to perform the affine transformation correction on the face, so that the corners of the eyes and the nose are close to the horizontal position. It is shown in Figure3.Figure 3
Process of face correction.After correcting the face image, we use the face feature extractor in OpenFace to extract deep face features. This feature extractor is based on the pretraining deep learning model FaceNet [19], which is shown in Figure 4.Figure 4
128-dimensional deep feature extraction of face.OpenFaces uses 500,000 images to train FaceNet, including the two largest labeled face recognition datasets, CASIA-WebFaces [20], and FaceScrb [21]. It can extract the 128-dimensional deep feature of efficient facial feature expression.


## 3.2. Face Feature Dimensionality Reduction

Due to the diversity of facial expressions, recognizing facial expressions is a multiclassification task, so it needs to use the multiclassification promotion form of LDA. For the problem of multiclassification, we assume the datasetc, in which any sample xi is an n-dimensional vector, and yi is its category, yi∈n1,n2,...,nk , with a total of k categories. Njj=1,2,3,...,k is defined as the number of Class j sample, Xjj=1,2,3,...,k is defined as the set of Class j sample, μjj=1,2,3,...,k is defined as the mean vector of Class j sample, and ∑jj=1,2,3,...,k is defined as the generalized covariance matrix of Class j sample.Assuming that the matrix formed by the projected hyper-plane basis isW=w1,w2,...,wd, then the optimization objective is as follows:(1)argmaxwJW=wTSbwwTSww,where Sw is the intraclass scatter matrix:(2)Sw=∑j=1k∑j=∑j=1kSwj=∑j=1k∑x∈Xjx−μjx−μjT.Sb is the interclass scatter matrix:(3)Sb=∑j=1kNjμj−μμj−μT.In equation (3),(4)μ=1m∑i=1mxi.SinceJW is a matrix, the diagonal element product is used to replace the matrix for optimization:(5)J^W=∏i=1dwiTSbwi∏i=1dwiTSwwi=∏i=1dwiTSbwiwiTSwwi.In equation (5), the right side of J^W is the continuous multiplication form of the generalized Rayleigh quotient. It only needs to obtain the maximum value one by one and then JW will obtain the maximum value. As the maximum value of the Rayleigh quotient wTSbw/wTSww is the maximum eigenvalue of Sw−1Sb, the matrix W formed by the eigenvectors corresponding to the product of the largest d eigenvalues is the mapping result after feature dimensionality reduction.


## 3.3. Introduction of Machine Learning Classification Models

In order to evaluate the influence of the feature set on the face recognition after LDA dimensionality reduction, we rely on the several machine learning methods for facial expression recognition, including Naive Bayes classification model (NB), the decision tree classification model (DT), K-nearest neighbor (KNN), random forest (RF), and support vector machine (SVM). Among them, the Naive Bayes model [22] outputs the probability that a sample belongs to a specific category by predicting the membership probability of the samples and each category. It is assumed that S=s1,s2,...,sn is an item to be classified and each si is a feature attribute of S. According to the existing category set C=c1,c2,...,cm, we can calculate the probability of all categories under the characteristic condition of S and select the category with the highest probability as the category label of S. In this way, we can obtain the equation definition of Naive Bayes classifier as shown in the following equation:(6)VS=argmaxci∈Cpci∏k=1npsk|cipS.In equation (6), VS is the category label of S, pS is a constant for all categories, and pci is the category prior probability. ps1|ci,ps2|ci,...,psn|ci is the conditional probability of each feature attribute in S under the condition of category ci. All of these can be obtained from the training sample sets.The decision tree classification model [23] consists of three parts: root node, internal node, and leaf node. The root node is the starting point of decision-making, and a decision path can be formed from the root node to a leaf node. Each of the internal nodes contains a feature that can divide the data. Each leaf node corresponds to a category. We use the classic algorithm ID3 to build a decision tree model. We suppose that S is the set of training samples, |S| is the number of training samples, and A is any feature of the sample. When the samples are divided into n different classes C1, C2, …, Cn, and the number of samples in these classes is marked as |C1|, |C2|, …, |Cn|, then the probability that any sample S belongs to class Ci is as follows:(7)pSi=CiS.Then, the total information entropy is as follows:(8)EntropyS=−∑S∑npSilogpSi.The information entropy of samples divided in accordance with FeatureA is as follows:(9)EntropyS,A=∑ASvSEntropySv.The information gain of FeatureA on the set S is as follows:(10)GainS,A=EntropyS−EntropyS,A.In equation (9), ∑A is the sum of all possible values v of attribute A, Sv is the subset of sample features A with v value in S, and Sv is the number of samples in Sv. According to the theory of information theory, the ID3 algorithm uses “information gain” to measure uncertainty; that is, the greater the information gain, the smaller the uncertainty and the better the division effect.


## 4. Experimental Results and Analysis

The experimental conditions in this study are CPU: Intel(R) Core (TM) i5-10210U, RAM: 16.0 GB, and the programming language is Python 3.6.


### 4.1. Datasets and Evaluation Metrics

The experiments in this study are based on the KDEF public face dataset [24]. The KDEF dataset was originally used for psychological and medical experiments on perception, attention, emotion, memory, etc. It contains the facial information of 70 people, 35 males and 35 females, who are between the ages of 20 and 30. They have no beards, earrings, or glasses and have removed their makeup as far as possible before shooting. In the process of collecting the dataset, all the subjects wore special gray T-shirts, and the light was soft indirect light, evenly distributed on both sides of the face. Seven different expressions are collected for each person, including surprise, sadness, happiness, etc., and each expression has the color images from 5 angles. The entire dataset has a total of 4900 images, each with a size of 562 ∗ 762 pixels. Among them, there are 2916 photos that can identify the frontal and half-side face. Some samples are shown in Figure 5.Figure 5
Samples in the KDEF.We randomly select 10% of the identifiable samples as the test set and the rest as the training set. The recognition effect is measured by the multiclassification evaluation metrics, including microprecision (micro-P), microrecall (micro-R), micro-F1, macroprecision (macro-P), macrorecall (macro-R), and macro-F1, which is shown in equations (11)–(16), where N denotes the number of categories, TP is true positive, FP is false positive, and FN is false negative.(11)micro‐Precision=∑i=1NTPi∑i=1NTPi+∑i=1NFPi,(12)micro‐Recall=∑i=1NTPi∑i=1NTPi+∑i=1NFNi,(13)micro‐F1=2micro−Recall×micro−Precisionmicro−Recall+micro−Precision,(14)macro‐Precision=1N∑i=1NTPiTPi+FPi,(15)macro‐Recall=1N∑i=1NTPiTPi+FNi,(16)macro‐F1=1N∑i=1NF1i.


### 4.2. Analysis of LDA Dimensionality Reduction Effect for Facial Expression Recognition

In order to test the effect of LDA feature dimensionality reduction on the accuracy of facial expression recognition, we respectively extract the AU feature and the 128-dimensional feature from the images in the dataset as two different feature sets and regard the hybrid feature set as the third feature set. For the three feature sets, LDA was used to reduce the dimensions to 7 dimensions, and the training set of the machine learning method is used to test its classification effect. Therefore, the experiment can be divided into three parts: analysis of LDA dimensionality reduction effect based on AU features, analysis of LDA dimensionality reduction effect based on 128-dimensional face deep features, and analysis of LDA dimensionality reduction effect based on hybrid features.


#### 4.2.1. Analysis of LDA Dimensionality Reduction Effect Based on AU Features

The facial AU feature is obtained by dividing the face into regions and counting the influence of each expression on different regions. It contains rich expression information, but it may also have redundancy that affects the recognition results. Therefore, we adopt several machine learning methods for facial expression recognition on basis of the AU feature and compare the recognition effects before and after LDA feature dimensionality reduction. The results are listed in Table2.Table 2
LDA dimensionality reduction effect of AU feature.
MethodNBDTKNNRF (n = 100)SVMLDABeforeAfterBeforeAfterBeforeAfterBeforeAfterBeforeAfterMicro-P0.58330.67560.55680.56670.66040.65170.69560.66990.70380.6815Macro-P0.54460.67310.55360.56400.65350.65270.69750.67240.70540.6840Micro-R0.54680.67430.55460.56500.65530.65410.69910.67370.70710.6854Macro-R0.54460.67310.55360.56400.65350.65270.69750.67240.70540.6840Micro-F10.56440.67490.55570.56590.65780.65290.69740.67180.70540.6834Macro-F10.54460.67310.55360.56400.65350.65270.69750.67240.70540.6840Macro-F1 is taken as an example in Table2. After the LDA dimensionality reduction, the macro-F1 of the NB and DT increased, while that of KNN, RF, and SVM decreased. This shows that there is some redundancy in the original AU feature set.


#### 4.2.2. Analysis of LDA Dimensionality Reduction Effect Based on 128-Dimensional Deep Features

The feature extraction based on the deep learning model can perform a higher-level abstract expression. In contrast to the local AU features, the semantic information of these features is richer, but the detailed location information is relatively brief. The facial expression recognition effect of 128-dimensional deep features and the dimensionality reduction effect of LDA are listed in Table3.Table 3
LDA dimensionality reduction effect of 128-dimensional deep features.
MethodNBDTKNNRF (n = 100)SVMLDABeforeAfterBeforeAfterBeforeAfterBeforeAfterBeforeAfterMicro-P0.44590.70750.37220.59030.65570.69650.76420.69860.63360.7121Macro-P0.44390.70670.37090.58890.61310.69390.76440.69830.63090.7119Micro-R0.44420.70760.37150.58940.61410.69480.76640.69930.63280.7127Macro-R0.44390.70670.37090.58890.61310.69390.76440.69830.63090.7119Micro-F10.44500.70750.37190.58990.63420.69570.76530.69890.63320.7124Macro-F10.44390.70670.37090.58890.61310.69390.76440.69830.63090.7119It can be seen from Table3 that the macro-F1 of facial expression recognition based on the original face 128-dimensional deep features is low. After LDA dimensionality reduction, the macro-f1 of all the methods is significantly improved except for the RF method.The reason is that most of the original 128-dimensional deep features are facial semantic information, which has little effect on the facial expression recognition that requires detailed information. Therefore, the recognition effect before dimensionality reduction is low. LDA can project the feature to the largest distance between classes according to the label, which can also be regarded as mapping the 128-dimensional deep features to the feature space that can conduct the facial expression recognition. Due to the high expressive ability of deep features, these features can better express facial expression information after dimensionality reduction. Therefore, compared with face AU features, the 128-dimensional deep features can achieve higher recognition accuracy after dimensionality reduction.


#### 4.2.3. Analysis of LDA Dimensionality Reduction Effect Based on Hybrid Features

We spliced local face AU features and 128-dimensional deep features containing more global semantic information to obtain the hybrid features. The facial expression recognition effect of hybrid features is listed in Table4.Table 4
LDA dimensionality reduction effect of hybrid features.
MethodNBDTKNNRF (n = 100)SVMLDABeforeAfterBeforeAfterBeforeAfterBeforeAfterBeforeAfterMicro-P0.67250.82120.55700.73740.66490.80890.77400.81430.70890.8296Macro-P0.62830.82050.55450.73490.65760.80860.77480.81390.71070.8290Micro-R0.62980.82130.55580.73570.65950.80960.77640.81470.71230.8298Macro-R0.62830.82050.55450.73490.65760.80860.77480.81390.71070.8290Micro-F10.65050.82120.55640.73410.66220.80920.77520.81450.71060.8297Macro-F10.62830.82050.55450.73490.65760.80860.77480.81390.71070.8290As listed in Table4, compared with the above single feature set, the hybrid features can achieve higher recognition accuracy before and after LDA dimensionality reduction. After dimensionality reduction, the macro-F1 of the NB, DT, KNN, RF, and SVM methods increased by 19.22%, 18.04%, 15.10%, 3.91%, and 11.83%, respectively. The reason is that the hybrid features contain multidimensional face features, namely, local face AU features and global 128-dimensional deep semantic features. It enables the model to be fully learned, so as to achieve the higher recognition accuracy.Combining Tables2–4, it can be seen that no matter which feature set is used, LDA dimensionality reduction can effectively improve the recognition accuracy of the two machine learning methods. The main reason is that LDA feature dimensionality reduction increases the correlation between features and categories; that is, the class spacing is maximized while the intraclass dispersion is minimized, so that the subsequent model can better learn the interclass differences, resulting in the higher recognition evaluation matrix. The dimensionality reduction efficiencies of LDA for AU features, 128-dimensional deep features, and hybrid features are 15.14 s, 29.85 s, and 224.3 s, respectively.


### 4.3. Comparison of Different Dimensionality Reduction Methods

Principle component analysis (PCA) has been widely used as a classic method of unsupervised dimensionality reduction. Its main idea is to use the covariance matrix of the data to calculate the eigenvalues. The eigenvalues are arranged from large to small, and the feature vectors corresponding to several largest representative components (features) are used to represent the overall characteristics of the data, so as to achieve the purpose of feature dimensionality reduction. We use LDA and PCA respectively to reduce the feature dimension for different feature sets and keep the same feature dimension after dimensionality reduction. We use the dimensionality-reduced features for the training of machine learning models to test the effect on face recognition. The results are shown in Figures6–10.Figure 6
Comparison of the effects of different feature dimensionality reduction methods based on the NB.Figure 7
Comparison of the effects of different feature dimensionality reduction methods based on the DT.Figure 8
Comparison of the effects of different feature dimensionality reduction methods based on the KNN.Figure 9
Comparison of the effects of different feature dimensionality reduction methods based on the RF.Figure 10
Comparison of the effects of different feature dimensionality reduction methods based on the SVM.It can be seen from Figures6–10 that for different types of feature sets and different machine learning methods, the accuracy of LDA feature dimensionality reduction for face recognition is higher than that of PCA method. Furthermore, the standard deviation of the correct samples identified by LDA is generally lower than that of PCA method, which indicates that LDA feature dimensionality reduction can make the feature be of greater category expression ability. Combining the ACC without dimensionality reduction in Tables 2–4, it can be seen that the accuracy of face recognition after PCA dimensionality reduction is even lower than that before dimensionality reduction. The reason is that PCA is an unsupervised data dimensionality reduction method. As this method does not use category information, it cannot obtain the effective dimensionality reduction effect for complex face feature sets. LDA is a supervised data dimensionality reduction method. It can be label oriented and select the vector that makes the Fisher criterion function reach the extreme value as the best projection direction, so that the sample can achieve the largest interclass dispersion and the smallest intraclass dispersion after being projected in this direction.


## 4.1. Datasets and Evaluation Metrics

The experiments in this study are based on the KDEF public face dataset [24]. The KDEF dataset was originally used for psychological and medical experiments on perception, attention, emotion, memory, etc. It contains the facial information of 70 people, 35 males and 35 females, who are between the ages of 20 and 30. They have no beards, earrings, or glasses and have removed their makeup as far as possible before shooting. In the process of collecting the dataset, all the subjects wore special gray T-shirts, and the light was soft indirect light, evenly distributed on both sides of the face. Seven different expressions are collected for each person, including surprise, sadness, happiness, etc., and each expression has the color images from 5 angles. The entire dataset has a total of 4900 images, each with a size of 562 ∗ 762 pixels. Among them, there are 2916 photos that can identify the frontal and half-side face. Some samples are shown in Figure 5.Figure 5
Samples in the KDEF.We randomly select 10% of the identifiable samples as the test set and the rest as the training set. The recognition effect is measured by the multiclassification evaluation metrics, including microprecision (micro-P), microrecall (micro-R), micro-F1, macroprecision (macro-P), macrorecall (macro-R), and macro-F1, which is shown in equations (11)–(16), where N denotes the number of categories, TP is true positive, FP is false positive, and FN is false negative.(11)micro‐Precision=∑i=1NTPi∑i=1NTPi+∑i=1NFPi,(12)micro‐Recall=∑i=1NTPi∑i=1NTPi+∑i=1NFNi,(13)micro‐F1=2micro−Recall×micro−Precisionmicro−Recall+micro−Precision,(14)macro‐Precision=1N∑i=1NTPiTPi+FPi,(15)macro‐Recall=1N∑i=1NTPiTPi+FNi,(16)macro‐F1=1N∑i=1NF1i.


## 4.2. Analysis of LDA Dimensionality Reduction Effect for Facial Expression Recognition

In order to test the effect of LDA feature dimensionality reduction on the accuracy of facial expression recognition, we respectively extract the AU feature and the 128-dimensional feature from the images in the dataset as two different feature sets and regard the hybrid feature set as the third feature set. For the three feature sets, LDA was used to reduce the dimensions to 7 dimensions, and the training set of the machine learning method is used to test its classification effect. Therefore, the experiment can be divided into three parts: analysis of LDA dimensionality reduction effect based on AU features, analysis of LDA dimensionality reduction effect based on 128-dimensional face deep features, and analysis of LDA dimensionality reduction effect based on hybrid features.


### 4.2.1. Analysis of LDA Dimensionality Reduction Effect Based on AU Features

The facial AU feature is obtained by dividing the face into regions and counting the influence of each expression on different regions. It contains rich expression information, but it may also have redundancy that affects the recognition results. Therefore, we adopt several machine learning methods for facial expression recognition on basis of the AU feature and compare the recognition effects before and after LDA feature dimensionality reduction. The results are listed in Table2.Table 2
LDA dimensionality reduction effect of AU feature.
MethodNBDTKNNRF (n = 100)SVMLDABeforeAfterBeforeAfterBeforeAfterBeforeAfterBeforeAfterMicro-P0.58330.67560.55680.56670.66040.65170.69560.66990.70380.6815Macro-P0.54460.67310.55360.56400.65350.65270.69750.67240.70540.6840Micro-R0.54680.67430.55460.56500.65530.65410.69910.67370.70710.6854Macro-R0.54460.67310.55360.56400.65350.65270.69750.67240.70540.6840Micro-F10.56440.67490.55570.56590.65780.65290.69740.67180.70540.6834Macro-F10.54460.67310.55360.56400.65350.65270.69750.67240.70540.6840Macro-F1 is taken as an example in Table2. After the LDA dimensionality reduction, the macro-F1 of the NB and DT increased, while that of KNN, RF, and SVM decreased. This shows that there is some redundancy in the original AU feature set.


### 4.2.2. Analysis of LDA Dimensionality Reduction Effect Based on 128-Dimensional Deep Features

The feature extraction based on the deep learning model can perform a higher-level abstract expression. In contrast to the local AU features, the semantic information of these features is richer, but the detailed location information is relatively brief. The facial expression recognition effect of 128-dimensional deep features and the dimensionality reduction effect of LDA are listed in Table3.Table 3
LDA dimensionality reduction effect of 128-dimensional deep features.
MethodNBDTKNNRF (n = 100)SVMLDABeforeAfterBeforeAfterBeforeAfterBeforeAfterBeforeAfterMicro-P0.44590.70750.37220.59030.65570.69650.76420.69860.63360.7121Macro-P0.44390.70670.37090.58890.61310.69390.76440.69830.63090.7119Micro-R0.44420.70760.37150.58940.61410.69480.76640.69930.63280.7127Macro-R0.44390.70670.37090.58890.61310.69390.76440.69830.63090.7119Micro-F10.44500.70750.37190.58990.63420.69570.76530.69890.63320.7124Macro-F10.44390.70670.37090.58890.61310.69390.76440.69830.63090.7119It can be seen from Table3 that the macro-F1 of facial expression recognition based on the original face 128-dimensional deep features is low. After LDA dimensionality reduction, the macro-f1 of all the methods is significantly improved except for the RF method.The reason is that most of the original 128-dimensional deep features are facial semantic information, which has little effect on the facial expression recognition that requires detailed information. Therefore, the recognition effect before dimensionality reduction is low. LDA can project the feature to the largest distance between classes according to the label, which can also be regarded as mapping the 128-dimensional deep features to the feature space that can conduct the facial expression recognition. Due to the high expressive ability of deep features, these features can better express facial expression information after dimensionality reduction. Therefore, compared with face AU features, the 128-dimensional deep features can achieve higher recognition accuracy after dimensionality reduction.


### 4.2.3. Analysis of LDA Dimensionality Reduction Effect Based on Hybrid Features

We spliced local face AU features and 128-dimensional deep features containing more global semantic information to obtain the hybrid features. The facial expression recognition effect of hybrid features is listed in Table4.Table 4
LDA dimensionality reduction effect of hybrid features.
MethodNBDTKNNRF (n = 100)SVMLDABeforeAfterBeforeAfterBeforeAfterBeforeAfterBeforeAfterMicro-P0.67250.82120.55700.73740.66490.80890.77400.81430.70890.8296Macro-P0.62830.82050.55450.73490.65760.80860.77480.81390.71070.8290Micro-R0.62980.82130.55580.73570.65950.80960.77640.81470.71230.8298Macro-R0.62830.82050.55450.73490.65760.80860.77480.81390.71070.8290Micro-F10.65050.82120.55640.73410.66220.80920.77520.81450.71060.8297Macro-F10.62830.82050.55450.73490.65760.80860.77480.81390.71070.8290As listed in Table4, compared with the above single feature set, the hybrid features can achieve higher recognition accuracy before and after LDA dimensionality reduction. After dimensionality reduction, the macro-F1 of the NB, DT, KNN, RF, and SVM methods increased by 19.22%, 18.04%, 15.10%, 3.91%, and 11.83%, respectively. The reason is that the hybrid features contain multidimensional face features, namely, local face AU features and global 128-dimensional deep semantic features. It enables the model to be fully learned, so as to achieve the higher recognition accuracy.Combining Tables2–4, it can be seen that no matter which feature set is used, LDA dimensionality reduction can effectively improve the recognition accuracy of the two machine learning methods. The main reason is that LDA feature dimensionality reduction increases the correlation between features and categories; that is, the class spacing is maximized while the intraclass dispersion is minimized, so that the subsequent model can better learn the interclass differences, resulting in the higher recognition evaluation matrix. The dimensionality reduction efficiencies of LDA for AU features, 128-dimensional deep features, and hybrid features are 15.14 s, 29.85 s, and 224.3 s, respectively.


## 4.2.1. Analysis of LDA Dimensionality Reduction Effect Based on AU Features

The facial AU feature is obtained by dividing the face into regions and counting the influence of each expression on different regions. It contains rich expression information, but it may also have redundancy that affects the recognition results. Therefore, we adopt several machine learning methods for facial expression recognition on basis of the AU feature and compare the recognition effects before and after LDA feature dimensionality reduction. The results are listed in Table2.Table 2
LDA dimensionality reduction effect of AU feature.
MethodNBDTKNNRF (n = 100)SVMLDABeforeAfterBeforeAfterBeforeAfterBeforeAfterBeforeAfterMicro-P0.58330.67560.55680.56670.66040.65170.69560.66990.70380.6815Macro-P0.54460.67310.55360.56400.65350.65270.69750.67240.70540.6840Micro-R0.54680.67430.55460.56500.65530.65410.69910.67370.70710.6854Macro-R0.54460.67310.55360.56400.65350.65270.69750.67240.70540.6840Micro-F10.56440.67490.55570.56590.65780.65290.69740.67180.70540.6834Macro-F10.54460.67310.55360.56400.65350.65270.69750.67240.70540.6840Macro-F1 is taken as an example in Table2. After the LDA dimensionality reduction, the macro-F1 of the NB and DT increased, while that of KNN, RF, and SVM decreased. This shows that there is some redundancy in the original AU feature set.


## 4.2.2. Analysis of LDA Dimensionality Reduction Effect Based on 128-Dimensional Deep Features

The feature extraction based on the deep learning model can perform a higher-level abstract expression. In contrast to the local AU features, the semantic information of these features is richer, but the detailed location information is relatively brief. The facial expression recognition effect of 128-dimensional deep features and the dimensionality reduction effect of LDA are listed in Table3.Table 3
LDA dimensionality reduction effect of 128-dimensional deep features.
MethodNBDTKNNRF (n = 100)SVMLDABeforeAfterBeforeAfterBeforeAfterBeforeAfterBeforeAfterMicro-P0.44590.70750.37220.59030.65570.69650.76420.69860.63360.7121Macro-P0.44390.70670.37090.58890.61310.69390.76440.69830.63090.7119Micro-R0.44420.70760.37150.58940.61410.69480.76640.69930.63280.7127Macro-R0.44390.70670.37090.58890.61310.69390.76440.69830.63090.7119Micro-F10.44500.70750.37190.58990.63420.69570.76530.69890.63320.7124Macro-F10.44390.70670.37090.58890.61310.69390.76440.69830.63090.7119It can be seen from Table3 that the macro-F1 of facial expression recognition based on the original face 128-dimensional deep features is low. After LDA dimensionality reduction, the macro-f1 of all the methods is significantly improved except for the RF method.The reason is that most of the original 128-dimensional deep features are facial semantic information, which has little effect on the facial expression recognition that requires detailed information. Therefore, the recognition effect before dimensionality reduction is low. LDA can project the feature to the largest distance between classes according to the label, which can also be regarded as mapping the 128-dimensional deep features to the feature space that can conduct the facial expression recognition. Due to the high expressive ability of deep features, these features can better express facial expression information after dimensionality reduction. Therefore, compared with face AU features, the 128-dimensional deep features can achieve higher recognition accuracy after dimensionality reduction.


## 4.2.3. Analysis of LDA Dimensionality Reduction Effect Based on Hybrid Features

We spliced local face AU features and 128-dimensional deep features containing more global semantic information to obtain the hybrid features. The facial expression recognition effect of hybrid features is listed in Table4.Table 4
LDA dimensionality reduction effect of hybrid features.
MethodNBDTKNNRF (n = 100)SVMLDABeforeAfterBeforeAfterBeforeAfterBeforeAfterBeforeAfterMicro-P0.67250.82120.55700.73740.66490.80890.77400.81430.70890.8296Macro-P0.62830.82050.55450.73490.65760.80860.77480.81390.71070.8290Micro-R0.62980.82130.55580.73570.65950.80960.77640.81470.71230.8298Macro-R0.62830.82050.55450.73490.65760.80860.77480.81390.71070.8290Micro-F10.65050.82120.55640.73410.66220.80920.77520.81450.71060.8297Macro-F10.62830.82050.55450.73490.65760.80860.77480.81390.71070.8290As listed in Table4, compared with the above single feature set, the hybrid features can achieve higher recognition accuracy before and after LDA dimensionality reduction. After dimensionality reduction, the macro-F1 of the NB, DT, KNN, RF, and SVM methods increased by 19.22%, 18.04%, 15.10%, 3.91%, and 11.83%, respectively. The reason is that the hybrid features contain multidimensional face features, namely, local face AU features and global 128-dimensional deep semantic features. It enables the model to be fully learned, so as to achieve the higher recognition accuracy.Combining Tables2–4, it can be seen that no matter which feature set is used, LDA dimensionality reduction can effectively improve the recognition accuracy of the two machine learning methods. The main reason is that LDA feature dimensionality reduction increases the correlation between features and categories; that is, the class spacing is maximized while the intraclass dispersion is minimized, so that the subsequent model can better learn the interclass differences, resulting in the higher recognition evaluation matrix. The dimensionality reduction efficiencies of LDA for AU features, 128-dimensional deep features, and hybrid features are 15.14 s, 29.85 s, and 224.3 s, respectively.


## 4.3. Comparison of Different Dimensionality Reduction Methods

Principle component analysis (PCA) has been widely used as a classic method of unsupervised dimensionality reduction. Its main idea is to use the covariance matrix of the data to calculate the eigenvalues. The eigenvalues are arranged from large to small, and the feature vectors corresponding to several largest representative components (features) are used to represent the overall characteristics of the data, so as to achieve the purpose of feature dimensionality reduction. We use LDA and PCA respectively to reduce the feature dimension for different feature sets and keep the same feature dimension after dimensionality reduction. We use the dimensionality-reduced features for the training of machine learning models to test the effect on face recognition. The results are shown in Figures6–10.Figure 6
Comparison of the effects of different feature dimensionality reduction methods based on the NB.Figure 7
Comparison of the effects of different feature dimensionality reduction methods based on the DT.Figure 8
Comparison of the effects of different feature dimensionality reduction methods based on the KNN.Figure 9
Comparison of the effects of different feature dimensionality reduction methods based on the RF.Figure 10
Comparison of the effects of different feature dimensionality reduction methods based on the SVM.It can be seen from Figures6–10 that for different types of feature sets and different machine learning methods, the accuracy of LDA feature dimensionality reduction for face recognition is higher than that of PCA method. Furthermore, the standard deviation of the correct samples identified by LDA is generally lower than that of PCA method, which indicates that LDA feature dimensionality reduction can make the feature be of greater category expression ability. Combining the ACC without dimensionality reduction in Tables 2–4, it can be seen that the accuracy of face recognition after PCA dimensionality reduction is even lower than that before dimensionality reduction. The reason is that PCA is an unsupervised data dimensionality reduction method. As this method does not use category information, it cannot obtain the effective dimensionality reduction effect for complex face feature sets. LDA is a supervised data dimensionality reduction method. It can be label oriented and select the vector that makes the Fisher criterion function reach the extreme value as the best projection direction, so that the sample can achieve the largest interclass dispersion and the smallest intraclass dispersion after being projected in this direction.


## 5. Conclusion and Discussion

The accurate recognition of facial expression recognition is inseparable from the extraction of multidimensional features, but there is often a lot of redundancy in multidimensional features. Based on the KDEF face public dataset, this study evaluates the effect of LDA feature dimensionality reduction method on facial expression recognition. First, the extraction of multitype features is performed on the face, including 35-dimensional face AU features based on artificial construction, 128-dimensional face deep features based on the FaceNet pretraining model, and 163-dimensional hybrid features. Second, LDA was used to reduce the dimensions of three different feature sets to 7 dimensions. Then, the classical machine learning methods are used to evaluate the effect of facial expression recognition before and after feature dimensionality reduction. Finally, we compare the LDA and PCA feature dimensionality reduction methods. The experimental results show that after the LDA feature dimensionality reduction, the facial expression recognition effects of the three feature sets have been improved to a certain extent, which are better than the PCA method. The dimensionality reduction of hybrid features has the best effect on improving the effect of facial expression recognition, with the macro-F1 reaching 82.90%. In addition, we found that no matter whether the feature dimensionality reduction is carried out or what machine learning method is used, the hybrid features can achieve a higher recognition accuracy than a single one. It shows that it is important to extract the multidimensional hybrid features in facial expression recognition.As this study only compares the same number of dimensions when reducing the dimension, it may need to dynamically adjust the feature dimensions for different feature sets. Hence, in the future, we will explore the effect of the feature dimensionality reduction under the optimal number of dimensions. The research on the effect of feature dimensionality reduction will be further expanded from multiple directions, such as more machine learning methods, more feature dimensionality reduction methods, and more different types of datasets.



---

*Source: 9521329-2022-08-29.xml*