# Research on Intelligent Algorithm of Identity Authentication Based on Facial Features

Authors: Bin Yuan; Changqing Du; Zhongyuan Wang; Rong Zhu
Journal: Wireless Communications and Mobile Computing
 (2021)

---

## Abstract

Identity recognition is a research hotspot in the information age. Nowadays, more and more occasions require identity recognition, especially in smart home. Identity recognition of the head of the household can avoid many troubles, such as home identification and network information authentication. Nowadays, in smart home identification, especially based on face recognition, system authentication is basically through feature matching. Although this method is convenient and quick to use, it lacks intelligence. Nowadays, for the make-up, facelift, posture, and other differences, the accuracy of the system is greatly reduced. In this paper, the face recognition method is used for identity authentication. Firstly, the AdaBoost learning algorithm is used to construct the face detection and eye detection classifier to realize the detection and localization of the face and eyes. Secondly, the two-dimensional discrete wavelet transform is used to extract facial features and construct a personal face dynamic feature database. Finally, an improved elastic template matching algorithm is used to establish an intelligent classification method for dynamic face elasticity models. The simulation shows that the proposed method can intelligently adapt to various environments without reducing the accuracy.


---

## Body

## 1. Introduction

With the rapid development of computer and network technology, the influence of the Internet has penetrated into various fields of social life. More and more enterprises, institutions, and government agencies rely on information networks to carry out related business activities such as e-commerce and e-government. At the same time, however, the security of networks and information systems has become a research hotspot in the industry. As the first barrier to network security and information system security, identity authentication technology has received more and more attention in the information security era. Traditional identity authentication methods mainly rely on identity identification items such as keys, certificates, and cards and identity identification knowledge such as user name and password. Once identity identification items and identification knowledge are stolen or forgotten, their identity is easy to be impersonated by others. With the development of cyber fraud and attack technology, higher requirements are placed on the accuracy, security, and reliability of the identity authentication method. Traditional identity authentication methods can no longer meet this requirement, and some human biometric features such as fingerprints, irises, sounds, and facial images provide a reliable solution for identity authentication because of their uniqueness and lifetime invariance.Biometric technology is primarily a technique for identity authentication through measurable biological characteristics such as body or behavior. The so-called biometrics is the only physiological characteristics or behaviors that can be measured or automatically recognized and authenticated. Biological characteristics are divided into two categories: physical characteristics and behavioral characteristics. Physical characteristics include the fingerprints, palm shape, retina, iris, human body odor, face shape, blood vessels of the hand, and DNA; behavioral characteristics include signature, speech, and walking gait. Some scholars classify retinal recognition, iris recognition, and fingerprint recognition as advanced biometrics; classify palm recognition, face recognition, speech recognition, and signature recognition as secondary biometrics; classify vascular texture recognition, human odor recognition and DNA recognition as “profound” biometrics. Compared with traditional identity authentication technology, biometric technology has the characteristics of portability, security, uniqueness, stability, extensiveness, convenience, collectability, and acceptability.Face recognition technology is one of the most important biometric identity authentication technologies. Among various biometric authentication technologies, the market share of face recognition technology is second only to fingerprint recognition technology, and it has broad application prospects in the fields of public security, justice, finance, customs, and military. Compared with other biometric authentication technologies, face recognition has the advantages of being intuitive and convenient, noninterfering to users, and no special requirements on hardware [1–3].The earliest research on face recognition dates back to the 1950s in the field of psychology, dating back to the 1960s in engineering. Other earlier studies include Darwin’s research on emotional facial expression and Galton’s research on facial features [4].Earlier research on face recognition mainly focused on two aspects: extraction of face geometric features and template matching methods. The method of extracting the geometric features of the face includes the normalized interpoint distance and ratio of the face component and some feature points of the face, such as the two-dimensional topography composed of the corners of the eyes, the corners of the mouth, and the tip of the nose. The template matching method mainly uses the autocorrelation of the calculation template and the image gray scale to realize the recognition function.Since the 1990s, face recognition has made significant progress and many new methods have emerged. At present, there are two main research directions: the research method based on the whole and the method based on the local feature analysis. The method based on the whole considers the overall properties of the model, including the eigenface method, the SVD decomposition method, the face density line method, the elasticity map matching method, the hidden Markov model method, and the neural network method. The method based on local feature analysis is to form the recognition feature vector together with the relative ratio of the face reference point and other shape parameters or class parameters describing the facial feature. The recognition based on the whole not only retains the topological relationship between the face components but also retains the information of each component itself. The recognition based on the local is to design a specific recognition algorithm by extracting the local contour and gray information. Local recognition is more intuitive than global recognition. It extracts and utilizes the most useful features, such as the location of key points and the shape analysis of components. For face recognition based on the whole face, because the whole face image is taken as a pattern, illumination, visual angle, and face size will have a great impact on face recognition. Therefore, how to effectively remove these disturbances is the key. For face recognition methods based on local analysis, the difficulty lies in how to build a good model to express the recognition components. In recent years, a trend is to combine global recognition with local feature analysis. For example, Kezheng et al. proposed a global and local weighted fusion feature extraction algorithm. Experiments show that this method has high robustness in the recognition of 3D face [5].In recent years, on the basis of careful research on feature face technology, domestic scholars have tried to combine feature extraction method based on feature face with various back-end classifiers and proposed various improved versions or extended algorithms. The main research contents include linear/nonlinear discriminant analysis [6], Bayesian probability model [7], support vector machine (SVM) [8], artificial neural network (NN) [9], and intra/intraclass dual subspace analysis method [10].Generally speaking, face recognition technology has made unprecedented development in recent years and has been applied in practice, but there are still many unsolved problems [11]. Because its recognition accuracy is not as good as fingerprint and iris recognition, the current identity authentication system based on biometric is mostly based on fingerprint and iris recognition. In the last two years, some new face recognition technologies have emerged, including 3D face scan data, high resolution still images, multiple still images for face recognition, multimodal face recognition, multialgorithm fusion, and preprocessing algorithms for correcting illumination and pose changes. These new technologies provide the possibility of improving the performance of automatic face recognition. Therefore, the research and improvement of face recognition technology can not only promote the development of biometric technology but also lay a good foundation for the application of a more accurate and reliable identity authentication system based on face features.In this paper, the face recognition method is used for identity authentication. Firstly, the face detection and eye detection classifier are constructed by using the AdaBoost learning algorithm [12] to realize the detection and localization of face and eyes. Then, the face features are extracted by Gabor filter [13], and the personal face dynamic feature database is constructed. Finally, the improved elastic template matching algorithm is used to establish the intelligent classification algorithm of the dynamic face elasticity model to realize identity recognition. The specific contributions of this paper can be expressed as follows:(1)
Using the AdaBoost learning algorithm to construct the face detection and eye detection classifier to realize the detection and localization of face and eyes(2)
For the time-consuming problem of convolution operation of Gabor kernel function, this paper uses two-dimensional discrete wavelet transform to extract facial features and construct a personal face dynamic feature database(3)
Using the improved elastic template matching algorithm to establish an intelligent classification algorithm for dynamic face elasticity model to realize identity recognition


## 2. Proposed Method

### 2.1. Face Localization and Normalization Processing

#### 2.1.1. Face Detection and Eye Location

AdaBoost algorithm is proposed by Freund and Schapire on the basis of a boosting algorithm to solve the problem of how to train weak classifiers into strong classifiers [14]. For a boosting algorithm, there are two problems: (1) how to adjust the training set so that the weak classifier can be trained on the training set and (2) how to combine the weak classifiers to form a strong classifier. The AdaBoost algorithm makes corresponding adjustments to these two problems: using weighted selected training data instead of randomly selected training data, so that the focus of training will be focused on more difficult to separate training data when weak classifiers are combined, and using weighted voting mechanism instead of average voting mechanism. The weak classifier with good classification effect has larger weight, while the classifier with poor classification effect has smaller weight.The starting point of the AdaBoost learning algorithm is to improve the classification performance of weak classifiers. It uses a large number of weak classifiers with general classification ability to synthesize a strong classifier by weighted voting method. It is proved theoretically that the error rate of strong classifiers tends to zero when the number of simple classifiers tends to infinity as long as the classification ability of each simple classifier is slightly better than that of random guessing.Viola and others applied the AdaBoost algorithm to face detection [15]. The basic idea is to train the same classifier (weak classifier) for different training sets and then combine the classifiers from these different training sets to form a final strong classifier. The weak classifier is constructed as follows: a rectangular feature j corresponds to a weak classifier hj. For a candidate input window x, if the value of the matrix feature on x is fjx, the weak classifier classification function is expressed as follows:(1)hjx=1,pjfjx≥pjθj,0,others,where pj=±1 is used to control the direction of inequality and θj represents a threshold.It is worth mentioning here that the AdaBoost training learning algorithm uses a similar Haar wavelet basis function holding feature and introduces the concept of an integral graph. Using the integral graph, each image can be detected and all the training sample images can be calculated by calculating the corresponding integral graph, so as to obtain its rectangular eigenvalue, and only needs to calculate once.The training and learning algorithms of AdaBoost are as follows.Given a training sample set:x1,y1,x2,y2,⋯,xn,yn, xi is an image sample and yi=0,1 is the category label of the sample, corresponding to the nonface image and the face image, respectively, where i=1,2,⋯,n, n is the total number of training samples. Initialize the weights of the two types of samples of yi=0,1 to w1,i=1/2m,1/2l, where m and l are the number of two types of samples, respectively. Suppose the number of weak classifiers to be trained is T, where T is also the number of features to be selected.Lett=1,2,⋯,T execute the following loop:(1)
Normalized weights:(2)wt,i⟵wt,i∑j=1nwt,j.Letwt be the probability distribution, that is, ∑i=1nwt,i=1(2)
For each featurej, a weak classifierhj that only utilizes the feature is trained. The training error of the weak classifier hj can be expressed as a function of the weight wt:(3)εj=∑i=1nwt,ihjxi−yi(3)
A weak classifier with the smallest training error is selected from the weak classifiers corresponding to all the features. This classifier is denoted asht with a training error of εt(4)
Adjust the weights according to this best weak classifier:(4)wt+1,i=wt,iβt1−ei,Whereei=0 means xi is correctly classified, ei=1 means xi is incorrectly classified; βt=εt/1−εt, since εt is always less than 0.5, βt<1. When the weights are updated each round, the weights of the correctly classified samples are reduced, while the weights of the misclassified samples remain unchanged.The final strong classifier consists of weak classifiers corresponding toT features:(5)Cx=1,∑t=1Tαthtx≥12∑t=1Tα,t0,others,where αt=log1/βt, at each round of training t, the algorithm selects the rectangular features that are most advantageous for classification from all of the features.In formula (5), as the number of weak classifiers hjx increases, the resulting strong classifier Hx becomes more and more complex. Some simple strong classifiers are highly efficient and can be used to exclude most nonface areas and detect almost all possible face areas. In order to improve the overall detection performance but reduce the calculation time, multiple classifiers can be cascaded in series in order from simple to complex. The entire face detection process forms a decision tree, as shown in Figure 1. Simple classifiers at the cascaded front end of the classifier initially exclude most of the nonface windows by a small amount of processing, while the latter complex classifiers further exclude suspected nonface windows by more computation, reducing the false positive rate of detection. For each level of classifier, if the output of the classifier is 1, it is considered that the detection window may be a face area, and the detection window is input to the next level of classifier for further judgment; otherwise, the detection window is excluded as a nonface area at the level. In training each classifier, the number of stages is increased until the desired final detection rate and false positive rate are achieved.Figure 1
Classifier cascade diagram.After detecting the face, it is necessary to further detect and locate the position coordinates of the eye as a benchmark for geometric normalization. Using a method similar to face detection, using eye images and noneye images as training samples, a human eye detection cascade classifier is trained, and the AdaBoost learning algorithm is applied to human eye detection to accurately locate the human eye [16–18].According to the prior knowledge of the face model, we only need to detect the eye in the upper part of the detected face area. This saves the time of detecting the eye, improves the speed of eye detection, and reduces the probability of detecting errors, thereby improving the accuracy of eye detection.


#### 2.1.2. Normalized Processing

In order to reduce the influence of partial illumination and attitude changes on the quality of captured face images, the accuracy of subsequent feature extraction and matching is improved, and the performance of the entire authentication system is improved. In order to detect the face image that has been detected, this paper proposes a standardized processing method for the system. The main process consists of the following steps:(1)
The angleθ of the rotation of the face image is calculated based on the positioned eye coordinates, and the image is rotated by the method of .(6)x′,y′,1=x,y,1cosθsinθ0−sinθcosθ0001(2)
The center points of two faces areEl and Er, the O is the center of ElEr¯, and d=ElEr¯. After cropping, in the 2d×2d face image, it is guaranteed that O is fixed at 0.5d,d. This ensures the consistency of the position of the face and embodies the translation invariance of the face in the image plane(3)
Use the bilinear interpolation algorithm to reduce or enlarge the image to obtain a uniform size calibration imageIe. The size of the calibration image used in this paper is 128×128 pixels; then, the zoom factor is β=64/d, where d=ElEr¯(4)
Using formula (7), histogram equalization is applied to face images(7)sk=Trk=∑j=0knjN,0≤rk≤1,0≤sk≤1,k=0,1,⋯,L−1,where L is a gray scale series, N is the total number of pixels, nk is the total number of pixels in level k gray, rk is the grayscale of the original image fx,y at point x,y, sk is the gray level of gx,y in x,y after histogram equalization, and Trk is a transformation function and satisfies the following conditions:(1)
sk is monotonically increasing function in 0≤rk≤1 interval and satisfies 0≤Trk≤1(2)
In0≤sk≤1 interval, the inverse transformation rk=T−1sk exists and is monotonically increasing function(3)
Calculate the mean and mean square error of face contour gray and use formula (8) to grayscale transform the face image(8)I′i,j=σ′σIi,j−μ+μ′,where Ii,j is a gray value distribution matrix; μ and σ are the gray mean and variance of the image, respectively; and I′i,j is the gray distribution matrix of the transformed image and usually takes the parameters: μ′=0 and σ′=1


### 2.2. Face Image Processing

Facial image processing is the process of extracting facial features. Gabor function is often used to extract facial features. However, convolution operation between image and Gabor kernel function is a time-consuming process. Although convolution operation can be implemented by fast Fourier transform, there is a computational burden when the feature points of the transform are selected more frequently. In this paper, two-dimensional discrete wavelet transform is used to extract face features. For wavelet transform, it can depict various kinds of signals with different frequency components, especially for the signal with catastrophic nature. The extracted features belong to low-level features. Compared with other parts of the face image, the extracted feature points are the key points of the face features, which belong to the region with obvious changes.


#### 2.2.1. Two-Dimensional Discrete Wavelet Transform

In order to remove the redundant information after the specific wavelet transform, the scale factor and translation factor can be discretized. Now, we define the two-order wavelet space:(9)s=12j,u=k,v=l,andj,k,l∈Z.The corresponding two-order wavelet function and scaling function coefficient can be calculated by(10)cm=fx,ψmx=2j/2∫−∞∞fxψ2jx−kdx.The corresponding inverse wavelet transform function is(11)fx=∑m=0∞cmψm¯x.In this way, a continuous sequence of functions can be represented by a single infinite sequence, such as the Fourier sequence. According to formula (10) and (11), we can deduce the formula of discrete wavelet transform. At the same time, the two-order scaling function in the scale space can be expressed as(12)ψmx=sψsx−k,wherem is a function of j and k.


#### 2.2.2. Resolution Image Analysis

Before performing multiresolution analysis on image functionfx,y, you need to understand the closed-scale subspace Vn⊂Vn−1⊂⋯⊂V1⊂V0. Let Aj be an approximation operator, and the image is roughly expressed as Ajf at the j layer resolution. A0 is the function itself, and Ajf belongs to space Vj. The scale factor at the j layer is s=1/2j. In practice, j=0,1,⋯,n is specified, where n layer is the roughest representation of the image, where the scaling function is s=1/2n. Here, the differential operator Dj is introduced, so that Djf represents the difference between the approximate image in the j layer Ajf and the (j−1) layer Aj−1f. In an approximate representation of the difference between Ajf and Aj−1f in a two-dimensional analysis, Mallat first proves that it can be represented by three components:(13)Djf=Aj−1f−Ajf,j=1,2,K,n.So the functionfx,y multidimensional analysis can be expressed as(14)fx,y=A1f+D1,1f+D1,2f+D1,3f=A2f+D2,1f+D2,2f+D2,3f+D1,1f+D1,2f+D1,3f=Anf+∑j=1nDj,1f+Dj,2f+Dj,3f,where the approximationAjfx,y and the difference Dj,pfx,y, p=1,2,3 can be completely represented by the two-dimensional scaling function Φx,y and the wavelet function Ψx,y:(15)Ajfx,y=∑k=−∞+∞∑l=−∞+∞αj,k,lΦj,k,lx,y,Dj,pfx,y=∑k=−∞+∞∑l=−∞+∞dj,k,lΨj,k,lx,y.Assuming thatx and y are not correlated, the two-dimensional scaling function Φx,y and the wavelet function Ψx,y are independent, so that the following formula can be derived:(16)Φx,y=ϕxϕy,Ψ1x,y=ϕxψy,Ψ2x,y=ψxϕy,Ψ3x,y=ψxψy.Among them, the one-dimensional scaling function and the one-dimensional wavelet function areϕx and ψx, respectively. It can be clearly seen that the details of the two-dimensional image function fx,y in the x-axis and y-axis, and diagonal directions are represented by Ψ1, Ψ2, and Ψ3, so this is called wavelet pyramid decomposition of a two-dimensional image.A series of image sets that are progressively reduced in resolution in a pyramid shape form a so-called image pyramid decomposition [19–21]. In general, the top of the pyramid is a low-resolution approximation, while the bottom is a high-resolution representation of the image to be processed, and as the pyramid moves from bottom to top, its size and resolution are reduced. Each decomposition of discrete wavelet can form three high-frequency subband images and one low-frequency subband image. The three high-frequency subband images provide image information in vertical, horizontal, and diagonal directions, respectively. The low-frequency subband image provides a low-resolution image.


#### 2.2.3. Normalized Eigenvector

According to the analysis in the previous section, the three differential componentsDj,pfx,y, p=1,2,3 can be used to represent the points in the j layer. In the case of point-to-point matching, in order to go about the correlation between the image matching process and the image gradation, normalization must be used [22]. Therefore define the following feature vector:(17)Bjx,y=Bj,1x,yBj,2x,yBj,3x,y,where Bj,p=Dj,px,y/Ajx,y, p=1,2,3.


#### 2.2.4. Discrete Wavelet Face Template

According to the above analysis, after the image is decomposed by wavelet, a certain point on a certain decomposition layer can be represented byBjx,y. Now, we use it in face recognition, assuming that in the face image domain, N is the neighborhood of the key feature point pf=xf,yf of the face, which satisfies the following relationship:(18)Npf=Ix,yx,y−xpf,ypf<ς,whereς is defined as the size of the neighborhood.After the wavelet transform, the neighborhood of the key points in thej layer is defined as(19)Njpf=Ixj,yjxj,yj−xpf/2j,ypf/2j<ς/2j.Define the following variables on this neighborhood:(20)Aj=Aj,1,Aj,2,Aj,3T,Aj,p=∑Nj11+xj−xpf/2j2+yj−ypf/2j2B2j,pxj,yj,p=1,2,3Therefore, the key pointpf of the image field can be represented by the following vector:(21)Jet=Jetpf=A1pf,A2pf,⋯,AJpf,T.According to the previous definition, we can define the following face attribute mapC=N,A,E,J, where(1)
Node set:N=pii=1,2,K,N(2)
Undirected arc set:A=pi,pji,j=1,2,K,N(3)
Set of characteristic functions:J=Jetpii=1,2,K,N(4)
Euclidean distance function:E=Ei,jEi,j=Epi,pj,i,j=1,2,3,K,Nwhere pi represents the key feature point of the face image.


### 2.3. Face Recognition

#### 2.3.1. Face Elastic Template

The face elastic template is a property map (FBG) containing multiple (M) facial expressions, which is defined as follows:(22)FBG=NB,AB,JB,EB,where(23)NB=piB∣piB=1M∑m=0M∑i=1NpiBm,AB=piB,pjB∣i,j=1,K,N,JB=JjB∣JiB=JpiBm,m=1,K,M,i=1,K,N,EB=Ei,jB∣EpiB,pjB=1M∑m=0MEpiBm,pjBm,i,j=1,K,N.


#### 2.3.2. Matching Strategy

Aiming at the matching between face elastic template and face image, this paper adopts rough matching and fine matching combined with matching strategy for face recognition matching [23–25].(1) Rough Match. In order to improve the matching speed, this paper adopts the strategy of combining the rough and the fine, and the specific steps of the rough matching strategy are as follows:(1)
Global search: in this paper, the face elasticity template is first set to a rigid model (λ=∞), which is fixed and cannot be deformed. Then, the image is moved in groups of 4 pixels on the face image, and the similarity between the average map and the corresponding point of the face image is calculated. Iteratively calculates the similarity of the evaluations to search, find the optimal position of each pixel to stop the search, and take the optimal position as the next input. In this step, it is possible to achieve an effect of concentrating the points in the feature relationship diagram of the test image in the vicinity of the corresponding points in the elastic template [26]Compressing the face elastic template map into an average graph is the key to the global search step, which helps to reduce the amount of calculation.(2)
Local adjustment: after a global search, the use of flexible templates does not require averaging but changes based on location and scale. After locating the key points of the face to be recognized in the global search, four different pixel offsets are selected as the new positions for exhaustive search. So that the Jet value of each node of the face image to be recognized is the most similar to the average Jet value of the corresponding node of the reference face image, and the angle-independent similar function is still used here(2) Fine Match. First, the definition uses the following functions to find the optimal solution for comparison:(24)SC,FBG=1N∑i=1NmaxmSJiC,JiBm−λE∑e=1EΔ⟶eC−Δ⟶eBΔ⟶eB,where SJ,J′=∑jAj⋅Aj′/∑jAj2∑jAj′2In this paper, the rough matching strategy is used to determine the key points of the face image, but this is not enough for the matching of face recognition. In order to more accurately locate the specific location of the key points of the face, this paper introduces a genetic algorithm to improve the matching precision of the key feature points of the face and achieve the effect of accurately locating the specific position of the key points of the face. The idea of genetic algorithm is an optimization algorithm based on the biological law of “natural selection, survival of the fittest” in the biological world. The specific algorithm process is as follows:(1)
Gene chain code: the biological information of the organism is determined by the chromosome of the biological genetic gene. In this paper, the sequence of feature points consisting of key feature points of the face is used as the gene coding, and each feature point is represented by coordinates(2)
Fitness: each gene chromosome corresponds to the optimal solution of a problem, and fitness refers to the degree of similarity between the optimal solution and the problem. In this paper, the similarity between the key feature points of the face and the face elastic template is studied, and the individual with the highest fitness value is reserved according to the principle of eliminating the fittest(3)
Cross: this paper adopts two-point intersection method, selects two different individuals to cross, and uses the roulette model to ensure that the probability that the individual is selected is proportional to its fitness value. Then, the two random positions in the sequence of feature point sequences in the randomly selected two individuals are exchanged coordinates to complete the intersection process(4)
Variation: variation is an individual gene mutation and is a means to expand the diversity of the population. In the optimization algorithm, using mutation in the optimal solution interval for traversal search. In this paper, the mutation operator is aimed at the sequence of feature points, randomly selects a position in the sequence string, randomly selects coordinate values in the neighborhood of the position, and mutates into a new individual


#### 2.3.3. Face Recognition

After the appellate process is implemented, the facial feature graph is successfully extracted from the face image to be recognized. This paper only needs to compare the successfully extracted facial feature graph with the dynamic facial feature database constructed in this paper to realize face recognition. In this paper, the average value of the sum of Jet comparisons between the corresponding points of different feature graphs is used as the similarity function between feature graphs. The calculation formula is as follows:(25)SGGI,GM=1N′∑nSαJn′I,JnM,where GI is a facial feature attribute graph in face database, GM is the feature graph of face image to be recognized, and N′ represents the total number of nodes.The value of similarity function is sorted. If the maximum value of all the values is obviously too large, it shows that the face is in the face database. Otherwise, the face is not in the database.


## 2.1. Face Localization and Normalization Processing

### 2.1.1. Face Detection and Eye Location

AdaBoost algorithm is proposed by Freund and Schapire on the basis of a boosting algorithm to solve the problem of how to train weak classifiers into strong classifiers [14]. For a boosting algorithm, there are two problems: (1) how to adjust the training set so that the weak classifier can be trained on the training set and (2) how to combine the weak classifiers to form a strong classifier. The AdaBoost algorithm makes corresponding adjustments to these two problems: using weighted selected training data instead of randomly selected training data, so that the focus of training will be focused on more difficult to separate training data when weak classifiers are combined, and using weighted voting mechanism instead of average voting mechanism. The weak classifier with good classification effect has larger weight, while the classifier with poor classification effect has smaller weight.The starting point of the AdaBoost learning algorithm is to improve the classification performance of weak classifiers. It uses a large number of weak classifiers with general classification ability to synthesize a strong classifier by weighted voting method. It is proved theoretically that the error rate of strong classifiers tends to zero when the number of simple classifiers tends to infinity as long as the classification ability of each simple classifier is slightly better than that of random guessing.Viola and others applied the AdaBoost algorithm to face detection [15]. The basic idea is to train the same classifier (weak classifier) for different training sets and then combine the classifiers from these different training sets to form a final strong classifier. The weak classifier is constructed as follows: a rectangular feature j corresponds to a weak classifier hj. For a candidate input window x, if the value of the matrix feature on x is fjx, the weak classifier classification function is expressed as follows:(1)hjx=1,pjfjx≥pjθj,0,others,where pj=±1 is used to control the direction of inequality and θj represents a threshold.It is worth mentioning here that the AdaBoost training learning algorithm uses a similar Haar wavelet basis function holding feature and introduces the concept of an integral graph. Using the integral graph, each image can be detected and all the training sample images can be calculated by calculating the corresponding integral graph, so as to obtain its rectangular eigenvalue, and only needs to calculate once.The training and learning algorithms of AdaBoost are as follows.Given a training sample set:x1,y1,x2,y2,⋯,xn,yn, xi is an image sample and yi=0,1 is the category label of the sample, corresponding to the nonface image and the face image, respectively, where i=1,2,⋯,n, n is the total number of training samples. Initialize the weights of the two types of samples of yi=0,1 to w1,i=1/2m,1/2l, where m and l are the number of two types of samples, respectively. Suppose the number of weak classifiers to be trained is T, where T is also the number of features to be selected.Lett=1,2,⋯,T execute the following loop:(1)
Normalized weights:(2)wt,i⟵wt,i∑j=1nwt,j.Letwt be the probability distribution, that is, ∑i=1nwt,i=1(2)
For each featurej, a weak classifierhj that only utilizes the feature is trained. The training error of the weak classifier hj can be expressed as a function of the weight wt:(3)εj=∑i=1nwt,ihjxi−yi(3)
A weak classifier with the smallest training error is selected from the weak classifiers corresponding to all the features. This classifier is denoted asht with a training error of εt(4)
Adjust the weights according to this best weak classifier:(4)wt+1,i=wt,iβt1−ei,Whereei=0 means xi is correctly classified, ei=1 means xi is incorrectly classified; βt=εt/1−εt, since εt is always less than 0.5, βt<1. When the weights are updated each round, the weights of the correctly classified samples are reduced, while the weights of the misclassified samples remain unchanged.The final strong classifier consists of weak classifiers corresponding toT features:(5)Cx=1,∑t=1Tαthtx≥12∑t=1Tα,t0,others,where αt=log1/βt, at each round of training t, the algorithm selects the rectangular features that are most advantageous for classification from all of the features.In formula (5), as the number of weak classifiers hjx increases, the resulting strong classifier Hx becomes more and more complex. Some simple strong classifiers are highly efficient and can be used to exclude most nonface areas and detect almost all possible face areas. In order to improve the overall detection performance but reduce the calculation time, multiple classifiers can be cascaded in series in order from simple to complex. The entire face detection process forms a decision tree, as shown in Figure 1. Simple classifiers at the cascaded front end of the classifier initially exclude most of the nonface windows by a small amount of processing, while the latter complex classifiers further exclude suspected nonface windows by more computation, reducing the false positive rate of detection. For each level of classifier, if the output of the classifier is 1, it is considered that the detection window may be a face area, and the detection window is input to the next level of classifier for further judgment; otherwise, the detection window is excluded as a nonface area at the level. In training each classifier, the number of stages is increased until the desired final detection rate and false positive rate are achieved.Figure 1
Classifier cascade diagram.After detecting the face, it is necessary to further detect and locate the position coordinates of the eye as a benchmark for geometric normalization. Using a method similar to face detection, using eye images and noneye images as training samples, a human eye detection cascade classifier is trained, and the AdaBoost learning algorithm is applied to human eye detection to accurately locate the human eye [16–18].According to the prior knowledge of the face model, we only need to detect the eye in the upper part of the detected face area. This saves the time of detecting the eye, improves the speed of eye detection, and reduces the probability of detecting errors, thereby improving the accuracy of eye detection.


### 2.1.2. Normalized Processing

In order to reduce the influence of partial illumination and attitude changes on the quality of captured face images, the accuracy of subsequent feature extraction and matching is improved, and the performance of the entire authentication system is improved. In order to detect the face image that has been detected, this paper proposes a standardized processing method for the system. The main process consists of the following steps:(1)
The angleθ of the rotation of the face image is calculated based on the positioned eye coordinates, and the image is rotated by the method of .(6)x′,y′,1=x,y,1cosθsinθ0−sinθcosθ0001(2)
The center points of two faces areEl and Er, the O is the center of ElEr¯, and d=ElEr¯. After cropping, in the 2d×2d face image, it is guaranteed that O is fixed at 0.5d,d. This ensures the consistency of the position of the face and embodies the translation invariance of the face in the image plane(3)
Use the bilinear interpolation algorithm to reduce or enlarge the image to obtain a uniform size calibration imageIe. The size of the calibration image used in this paper is 128×128 pixels; then, the zoom factor is β=64/d, where d=ElEr¯(4)
Using formula (7), histogram equalization is applied to face images(7)sk=Trk=∑j=0knjN,0≤rk≤1,0≤sk≤1,k=0,1,⋯,L−1,where L is a gray scale series, N is the total number of pixels, nk is the total number of pixels in level k gray, rk is the grayscale of the original image fx,y at point x,y, sk is the gray level of gx,y in x,y after histogram equalization, and Trk is a transformation function and satisfies the following conditions:(1)
sk is monotonically increasing function in 0≤rk≤1 interval and satisfies 0≤Trk≤1(2)
In0≤sk≤1 interval, the inverse transformation rk=T−1sk exists and is monotonically increasing function(3)
Calculate the mean and mean square error of face contour gray and use formula (8) to grayscale transform the face image(8)I′i,j=σ′σIi,j−μ+μ′,where Ii,j is a gray value distribution matrix; μ and σ are the gray mean and variance of the image, respectively; and I′i,j is the gray distribution matrix of the transformed image and usually takes the parameters: μ′=0 and σ′=1


## 2.1.1. Face Detection and Eye Location

AdaBoost algorithm is proposed by Freund and Schapire on the basis of a boosting algorithm to solve the problem of how to train weak classifiers into strong classifiers [14]. For a boosting algorithm, there are two problems: (1) how to adjust the training set so that the weak classifier can be trained on the training set and (2) how to combine the weak classifiers to form a strong classifier. The AdaBoost algorithm makes corresponding adjustments to these two problems: using weighted selected training data instead of randomly selected training data, so that the focus of training will be focused on more difficult to separate training data when weak classifiers are combined, and using weighted voting mechanism instead of average voting mechanism. The weak classifier with good classification effect has larger weight, while the classifier with poor classification effect has smaller weight.The starting point of the AdaBoost learning algorithm is to improve the classification performance of weak classifiers. It uses a large number of weak classifiers with general classification ability to synthesize a strong classifier by weighted voting method. It is proved theoretically that the error rate of strong classifiers tends to zero when the number of simple classifiers tends to infinity as long as the classification ability of each simple classifier is slightly better than that of random guessing.Viola and others applied the AdaBoost algorithm to face detection [15]. The basic idea is to train the same classifier (weak classifier) for different training sets and then combine the classifiers from these different training sets to form a final strong classifier. The weak classifier is constructed as follows: a rectangular feature j corresponds to a weak classifier hj. For a candidate input window x, if the value of the matrix feature on x is fjx, the weak classifier classification function is expressed as follows:(1)hjx=1,pjfjx≥pjθj,0,others,where pj=±1 is used to control the direction of inequality and θj represents a threshold.It is worth mentioning here that the AdaBoost training learning algorithm uses a similar Haar wavelet basis function holding feature and introduces the concept of an integral graph. Using the integral graph, each image can be detected and all the training sample images can be calculated by calculating the corresponding integral graph, so as to obtain its rectangular eigenvalue, and only needs to calculate once.The training and learning algorithms of AdaBoost are as follows.Given a training sample set:x1,y1,x2,y2,⋯,xn,yn, xi is an image sample and yi=0,1 is the category label of the sample, corresponding to the nonface image and the face image, respectively, where i=1,2,⋯,n, n is the total number of training samples. Initialize the weights of the two types of samples of yi=0,1 to w1,i=1/2m,1/2l, where m and l are the number of two types of samples, respectively. Suppose the number of weak classifiers to be trained is T, where T is also the number of features to be selected.Lett=1,2,⋯,T execute the following loop:(1)
Normalized weights:(2)wt,i⟵wt,i∑j=1nwt,j.Letwt be the probability distribution, that is, ∑i=1nwt,i=1(2)
For each featurej, a weak classifierhj that only utilizes the feature is trained. The training error of the weak classifier hj can be expressed as a function of the weight wt:(3)εj=∑i=1nwt,ihjxi−yi(3)
A weak classifier with the smallest training error is selected from the weak classifiers corresponding to all the features. This classifier is denoted asht with a training error of εt(4)
Adjust the weights according to this best weak classifier:(4)wt+1,i=wt,iβt1−ei,Whereei=0 means xi is correctly classified, ei=1 means xi is incorrectly classified; βt=εt/1−εt, since εt is always less than 0.5, βt<1. When the weights are updated each round, the weights of the correctly classified samples are reduced, while the weights of the misclassified samples remain unchanged.The final strong classifier consists of weak classifiers corresponding toT features:(5)Cx=1,∑t=1Tαthtx≥12∑t=1Tα,t0,others,where αt=log1/βt, at each round of training t, the algorithm selects the rectangular features that are most advantageous for classification from all of the features.In formula (5), as the number of weak classifiers hjx increases, the resulting strong classifier Hx becomes more and more complex. Some simple strong classifiers are highly efficient and can be used to exclude most nonface areas and detect almost all possible face areas. In order to improve the overall detection performance but reduce the calculation time, multiple classifiers can be cascaded in series in order from simple to complex. The entire face detection process forms a decision tree, as shown in Figure 1. Simple classifiers at the cascaded front end of the classifier initially exclude most of the nonface windows by a small amount of processing, while the latter complex classifiers further exclude suspected nonface windows by more computation, reducing the false positive rate of detection. For each level of classifier, if the output of the classifier is 1, it is considered that the detection window may be a face area, and the detection window is input to the next level of classifier for further judgment; otherwise, the detection window is excluded as a nonface area at the level. In training each classifier, the number of stages is increased until the desired final detection rate and false positive rate are achieved.Figure 1
Classifier cascade diagram.After detecting the face, it is necessary to further detect and locate the position coordinates of the eye as a benchmark for geometric normalization. Using a method similar to face detection, using eye images and noneye images as training samples, a human eye detection cascade classifier is trained, and the AdaBoost learning algorithm is applied to human eye detection to accurately locate the human eye [16–18].According to the prior knowledge of the face model, we only need to detect the eye in the upper part of the detected face area. This saves the time of detecting the eye, improves the speed of eye detection, and reduces the probability of detecting errors, thereby improving the accuracy of eye detection.


## 2.1.2. Normalized Processing

In order to reduce the influence of partial illumination and attitude changes on the quality of captured face images, the accuracy of subsequent feature extraction and matching is improved, and the performance of the entire authentication system is improved. In order to detect the face image that has been detected, this paper proposes a standardized processing method for the system. The main process consists of the following steps:(1)
The angleθ of the rotation of the face image is calculated based on the positioned eye coordinates, and the image is rotated by the method of .(6)x′,y′,1=x,y,1cosθsinθ0−sinθcosθ0001(2)
The center points of two faces areEl and Er, the O is the center of ElEr¯, and d=ElEr¯. After cropping, in the 2d×2d face image, it is guaranteed that O is fixed at 0.5d,d. This ensures the consistency of the position of the face and embodies the translation invariance of the face in the image plane(3)
Use the bilinear interpolation algorithm to reduce or enlarge the image to obtain a uniform size calibration imageIe. The size of the calibration image used in this paper is 128×128 pixels; then, the zoom factor is β=64/d, where d=ElEr¯(4)
Using formula (7), histogram equalization is applied to face images(7)sk=Trk=∑j=0knjN,0≤rk≤1,0≤sk≤1,k=0,1,⋯,L−1,where L is a gray scale series, N is the total number of pixels, nk is the total number of pixels in level k gray, rk is the grayscale of the original image fx,y at point x,y, sk is the gray level of gx,y in x,y after histogram equalization, and Trk is a transformation function and satisfies the following conditions:(1)
sk is monotonically increasing function in 0≤rk≤1 interval and satisfies 0≤Trk≤1(2)
In0≤sk≤1 interval, the inverse transformation rk=T−1sk exists and is monotonically increasing function(3)
Calculate the mean and mean square error of face contour gray and use formula (8) to grayscale transform the face image(8)I′i,j=σ′σIi,j−μ+μ′,where Ii,j is a gray value distribution matrix; μ and σ are the gray mean and variance of the image, respectively; and I′i,j is the gray distribution matrix of the transformed image and usually takes the parameters: μ′=0 and σ′=1


## 2.2. Face Image Processing

Facial image processing is the process of extracting facial features. Gabor function is often used to extract facial features. However, convolution operation between image and Gabor kernel function is a time-consuming process. Although convolution operation can be implemented by fast Fourier transform, there is a computational burden when the feature points of the transform are selected more frequently. In this paper, two-dimensional discrete wavelet transform is used to extract face features. For wavelet transform, it can depict various kinds of signals with different frequency components, especially for the signal with catastrophic nature. The extracted features belong to low-level features. Compared with other parts of the face image, the extracted feature points are the key points of the face features, which belong to the region with obvious changes.


### 2.2.1. Two-Dimensional Discrete Wavelet Transform

In order to remove the redundant information after the specific wavelet transform, the scale factor and translation factor can be discretized. Now, we define the two-order wavelet space:(9)s=12j,u=k,v=l,andj,k,l∈Z.The corresponding two-order wavelet function and scaling function coefficient can be calculated by(10)cm=fx,ψmx=2j/2∫−∞∞fxψ2jx−kdx.The corresponding inverse wavelet transform function is(11)fx=∑m=0∞cmψm¯x.In this way, a continuous sequence of functions can be represented by a single infinite sequence, such as the Fourier sequence. According to formula (10) and (11), we can deduce the formula of discrete wavelet transform. At the same time, the two-order scaling function in the scale space can be expressed as(12)ψmx=sψsx−k,wherem is a function of j and k.


### 2.2.2. Resolution Image Analysis

Before performing multiresolution analysis on image functionfx,y, you need to understand the closed-scale subspace Vn⊂Vn−1⊂⋯⊂V1⊂V0. Let Aj be an approximation operator, and the image is roughly expressed as Ajf at the j layer resolution. A0 is the function itself, and Ajf belongs to space Vj. The scale factor at the j layer is s=1/2j. In practice, j=0,1,⋯,n is specified, where n layer is the roughest representation of the image, where the scaling function is s=1/2n. Here, the differential operator Dj is introduced, so that Djf represents the difference between the approximate image in the j layer Ajf and the (j−1) layer Aj−1f. In an approximate representation of the difference between Ajf and Aj−1f in a two-dimensional analysis, Mallat first proves that it can be represented by three components:(13)Djf=Aj−1f−Ajf,j=1,2,K,n.So the functionfx,y multidimensional analysis can be expressed as(14)fx,y=A1f+D1,1f+D1,2f+D1,3f=A2f+D2,1f+D2,2f+D2,3f+D1,1f+D1,2f+D1,3f=Anf+∑j=1nDj,1f+Dj,2f+Dj,3f,where the approximationAjfx,y and the difference Dj,pfx,y, p=1,2,3 can be completely represented by the two-dimensional scaling function Φx,y and the wavelet function Ψx,y:(15)Ajfx,y=∑k=−∞+∞∑l=−∞+∞αj,k,lΦj,k,lx,y,Dj,pfx,y=∑k=−∞+∞∑l=−∞+∞dj,k,lΨj,k,lx,y.Assuming thatx and y are not correlated, the two-dimensional scaling function Φx,y and the wavelet function Ψx,y are independent, so that the following formula can be derived:(16)Φx,y=ϕxϕy,Ψ1x,y=ϕxψy,Ψ2x,y=ψxϕy,Ψ3x,y=ψxψy.Among them, the one-dimensional scaling function and the one-dimensional wavelet function areϕx and ψx, respectively. It can be clearly seen that the details of the two-dimensional image function fx,y in the x-axis and y-axis, and diagonal directions are represented by Ψ1, Ψ2, and Ψ3, so this is called wavelet pyramid decomposition of a two-dimensional image.A series of image sets that are progressively reduced in resolution in a pyramid shape form a so-called image pyramid decomposition [19–21]. In general, the top of the pyramid is a low-resolution approximation, while the bottom is a high-resolution representation of the image to be processed, and as the pyramid moves from bottom to top, its size and resolution are reduced. Each decomposition of discrete wavelet can form three high-frequency subband images and one low-frequency subband image. The three high-frequency subband images provide image information in vertical, horizontal, and diagonal directions, respectively. The low-frequency subband image provides a low-resolution image.


### 2.2.3. Normalized Eigenvector

According to the analysis in the previous section, the three differential componentsDj,pfx,y, p=1,2,3 can be used to represent the points in the j layer. In the case of point-to-point matching, in order to go about the correlation between the image matching process and the image gradation, normalization must be used [22]. Therefore define the following feature vector:(17)Bjx,y=Bj,1x,yBj,2x,yBj,3x,y,where Bj,p=Dj,px,y/Ajx,y, p=1,2,3.


### 2.2.4. Discrete Wavelet Face Template

According to the above analysis, after the image is decomposed by wavelet, a certain point on a certain decomposition layer can be represented byBjx,y. Now, we use it in face recognition, assuming that in the face image domain, N is the neighborhood of the key feature point pf=xf,yf of the face, which satisfies the following relationship:(18)Npf=Ix,yx,y−xpf,ypf<ς,whereς is defined as the size of the neighborhood.After the wavelet transform, the neighborhood of the key points in thej layer is defined as(19)Njpf=Ixj,yjxj,yj−xpf/2j,ypf/2j<ς/2j.Define the following variables on this neighborhood:(20)Aj=Aj,1,Aj,2,Aj,3T,Aj,p=∑Nj11+xj−xpf/2j2+yj−ypf/2j2B2j,pxj,yj,p=1,2,3Therefore, the key pointpf of the image field can be represented by the following vector:(21)Jet=Jetpf=A1pf,A2pf,⋯,AJpf,T.According to the previous definition, we can define the following face attribute mapC=N,A,E,J, where(1)
Node set:N=pii=1,2,K,N(2)
Undirected arc set:A=pi,pji,j=1,2,K,N(3)
Set of characteristic functions:J=Jetpii=1,2,K,N(4)
Euclidean distance function:E=Ei,jEi,j=Epi,pj,i,j=1,2,3,K,Nwhere pi represents the key feature point of the face image.


## 2.2.1. Two-Dimensional Discrete Wavelet Transform

In order to remove the redundant information after the specific wavelet transform, the scale factor and translation factor can be discretized. Now, we define the two-order wavelet space:(9)s=12j,u=k,v=l,andj,k,l∈Z.The corresponding two-order wavelet function and scaling function coefficient can be calculated by(10)cm=fx,ψmx=2j/2∫−∞∞fxψ2jx−kdx.The corresponding inverse wavelet transform function is(11)fx=∑m=0∞cmψm¯x.In this way, a continuous sequence of functions can be represented by a single infinite sequence, such as the Fourier sequence. According to formula (10) and (11), we can deduce the formula of discrete wavelet transform. At the same time, the two-order scaling function in the scale space can be expressed as(12)ψmx=sψsx−k,wherem is a function of j and k.


## 2.2.2. Resolution Image Analysis

Before performing multiresolution analysis on image functionfx,y, you need to understand the closed-scale subspace Vn⊂Vn−1⊂⋯⊂V1⊂V0. Let Aj be an approximation operator, and the image is roughly expressed as Ajf at the j layer resolution. A0 is the function itself, and Ajf belongs to space Vj. The scale factor at the j layer is s=1/2j. In practice, j=0,1,⋯,n is specified, where n layer is the roughest representation of the image, where the scaling function is s=1/2n. Here, the differential operator Dj is introduced, so that Djf represents the difference between the approximate image in the j layer Ajf and the (j−1) layer Aj−1f. In an approximate representation of the difference between Ajf and Aj−1f in a two-dimensional analysis, Mallat first proves that it can be represented by three components:(13)Djf=Aj−1f−Ajf,j=1,2,K,n.So the functionfx,y multidimensional analysis can be expressed as(14)fx,y=A1f+D1,1f+D1,2f+D1,3f=A2f+D2,1f+D2,2f+D2,3f+D1,1f+D1,2f+D1,3f=Anf+∑j=1nDj,1f+Dj,2f+Dj,3f,where the approximationAjfx,y and the difference Dj,pfx,y, p=1,2,3 can be completely represented by the two-dimensional scaling function Φx,y and the wavelet function Ψx,y:(15)Ajfx,y=∑k=−∞+∞∑l=−∞+∞αj,k,lΦj,k,lx,y,Dj,pfx,y=∑k=−∞+∞∑l=−∞+∞dj,k,lΨj,k,lx,y.Assuming thatx and y are not correlated, the two-dimensional scaling function Φx,y and the wavelet function Ψx,y are independent, so that the following formula can be derived:(16)Φx,y=ϕxϕy,Ψ1x,y=ϕxψy,Ψ2x,y=ψxϕy,Ψ3x,y=ψxψy.Among them, the one-dimensional scaling function and the one-dimensional wavelet function areϕx and ψx, respectively. It can be clearly seen that the details of the two-dimensional image function fx,y in the x-axis and y-axis, and diagonal directions are represented by Ψ1, Ψ2, and Ψ3, so this is called wavelet pyramid decomposition of a two-dimensional image.A series of image sets that are progressively reduced in resolution in a pyramid shape form a so-called image pyramid decomposition [19–21]. In general, the top of the pyramid is a low-resolution approximation, while the bottom is a high-resolution representation of the image to be processed, and as the pyramid moves from bottom to top, its size and resolution are reduced. Each decomposition of discrete wavelet can form three high-frequency subband images and one low-frequency subband image. The three high-frequency subband images provide image information in vertical, horizontal, and diagonal directions, respectively. The low-frequency subband image provides a low-resolution image.


## 2.2.3. Normalized Eigenvector

According to the analysis in the previous section, the three differential componentsDj,pfx,y, p=1,2,3 can be used to represent the points in the j layer. In the case of point-to-point matching, in order to go about the correlation between the image matching process and the image gradation, normalization must be used [22]. Therefore define the following feature vector:(17)Bjx,y=Bj,1x,yBj,2x,yBj,3x,y,where Bj,p=Dj,px,y/Ajx,y, p=1,2,3.


## 2.2.4. Discrete Wavelet Face Template

According to the above analysis, after the image is decomposed by wavelet, a certain point on a certain decomposition layer can be represented byBjx,y. Now, we use it in face recognition, assuming that in the face image domain, N is the neighborhood of the key feature point pf=xf,yf of the face, which satisfies the following relationship:(18)Npf=Ix,yx,y−xpf,ypf<ς,whereς is defined as the size of the neighborhood.After the wavelet transform, the neighborhood of the key points in thej layer is defined as(19)Njpf=Ixj,yjxj,yj−xpf/2j,ypf/2j<ς/2j.Define the following variables on this neighborhood:(20)Aj=Aj,1,Aj,2,Aj,3T,Aj,p=∑Nj11+xj−xpf/2j2+yj−ypf/2j2B2j,pxj,yj,p=1,2,3Therefore, the key pointpf of the image field can be represented by the following vector:(21)Jet=Jetpf=A1pf,A2pf,⋯,AJpf,T.According to the previous definition, we can define the following face attribute mapC=N,A,E,J, where(1)
Node set:N=pii=1,2,K,N(2)
Undirected arc set:A=pi,pji,j=1,2,K,N(3)
Set of characteristic functions:J=Jetpii=1,2,K,N(4)
Euclidean distance function:E=Ei,jEi,j=Epi,pj,i,j=1,2,3,K,Nwhere pi represents the key feature point of the face image.


## 2.3. Face Recognition

### 2.3.1. Face Elastic Template

The face elastic template is a property map (FBG) containing multiple (M) facial expressions, which is defined as follows:(22)FBG=NB,AB,JB,EB,where(23)NB=piB∣piB=1M∑m=0M∑i=1NpiBm,AB=piB,pjB∣i,j=1,K,N,JB=JjB∣JiB=JpiBm,m=1,K,M,i=1,K,N,EB=Ei,jB∣EpiB,pjB=1M∑m=0MEpiBm,pjBm,i,j=1,K,N.


### 2.3.2. Matching Strategy

Aiming at the matching between face elastic template and face image, this paper adopts rough matching and fine matching combined with matching strategy for face recognition matching [23–25].(1) Rough Match. In order to improve the matching speed, this paper adopts the strategy of combining the rough and the fine, and the specific steps of the rough matching strategy are as follows:(1)
Global search: in this paper, the face elasticity template is first set to a rigid model (λ=∞), which is fixed and cannot be deformed. Then, the image is moved in groups of 4 pixels on the face image, and the similarity between the average map and the corresponding point of the face image is calculated. Iteratively calculates the similarity of the evaluations to search, find the optimal position of each pixel to stop the search, and take the optimal position as the next input. In this step, it is possible to achieve an effect of concentrating the points in the feature relationship diagram of the test image in the vicinity of the corresponding points in the elastic template [26]Compressing the face elastic template map into an average graph is the key to the global search step, which helps to reduce the amount of calculation.(2)
Local adjustment: after a global search, the use of flexible templates does not require averaging but changes based on location and scale. After locating the key points of the face to be recognized in the global search, four different pixel offsets are selected as the new positions for exhaustive search. So that the Jet value of each node of the face image to be recognized is the most similar to the average Jet value of the corresponding node of the reference face image, and the angle-independent similar function is still used here(2) Fine Match. First, the definition uses the following functions to find the optimal solution for comparison:(24)SC,FBG=1N∑i=1NmaxmSJiC,JiBm−λE∑e=1EΔ⟶eC−Δ⟶eBΔ⟶eB,where SJ,J′=∑jAj⋅Aj′/∑jAj2∑jAj′2In this paper, the rough matching strategy is used to determine the key points of the face image, but this is not enough for the matching of face recognition. In order to more accurately locate the specific location of the key points of the face, this paper introduces a genetic algorithm to improve the matching precision of the key feature points of the face and achieve the effect of accurately locating the specific position of the key points of the face. The idea of genetic algorithm is an optimization algorithm based on the biological law of “natural selection, survival of the fittest” in the biological world. The specific algorithm process is as follows:(1)
Gene chain code: the biological information of the organism is determined by the chromosome of the biological genetic gene. In this paper, the sequence of feature points consisting of key feature points of the face is used as the gene coding, and each feature point is represented by coordinates(2)
Fitness: each gene chromosome corresponds to the optimal solution of a problem, and fitness refers to the degree of similarity between the optimal solution and the problem. In this paper, the similarity between the key feature points of the face and the face elastic template is studied, and the individual with the highest fitness value is reserved according to the principle of eliminating the fittest(3)
Cross: this paper adopts two-point intersection method, selects two different individuals to cross, and uses the roulette model to ensure that the probability that the individual is selected is proportional to its fitness value. Then, the two random positions in the sequence of feature point sequences in the randomly selected two individuals are exchanged coordinates to complete the intersection process(4)
Variation: variation is an individual gene mutation and is a means to expand the diversity of the population. In the optimization algorithm, using mutation in the optimal solution interval for traversal search. In this paper, the mutation operator is aimed at the sequence of feature points, randomly selects a position in the sequence string, randomly selects coordinate values in the neighborhood of the position, and mutates into a new individual


### 2.3.3. Face Recognition

After the appellate process is implemented, the facial feature graph is successfully extracted from the face image to be recognized. This paper only needs to compare the successfully extracted facial feature graph with the dynamic facial feature database constructed in this paper to realize face recognition. In this paper, the average value of the sum of Jet comparisons between the corresponding points of different feature graphs is used as the similarity function between feature graphs. The calculation formula is as follows:(25)SGGI,GM=1N′∑nSαJn′I,JnM,where GI is a facial feature attribute graph in face database, GM is the feature graph of face image to be recognized, and N′ represents the total number of nodes.The value of similarity function is sorted. If the maximum value of all the values is obviously too large, it shows that the face is in the face database. Otherwise, the face is not in the database.


## 2.3.1. Face Elastic Template

The face elastic template is a property map (FBG) containing multiple (M) facial expressions, which is defined as follows:(22)FBG=NB,AB,JB,EB,where(23)NB=piB∣piB=1M∑m=0M∑i=1NpiBm,AB=piB,pjB∣i,j=1,K,N,JB=JjB∣JiB=JpiBm,m=1,K,M,i=1,K,N,EB=Ei,jB∣EpiB,pjB=1M∑m=0MEpiBm,pjBm,i,j=1,K,N.


## 2.3.2. Matching Strategy

Aiming at the matching between face elastic template and face image, this paper adopts rough matching and fine matching combined with matching strategy for face recognition matching [23–25].(1) Rough Match. In order to improve the matching speed, this paper adopts the strategy of combining the rough and the fine, and the specific steps of the rough matching strategy are as follows:(1)
Global search: in this paper, the face elasticity template is first set to a rigid model (λ=∞), which is fixed and cannot be deformed. Then, the image is moved in groups of 4 pixels on the face image, and the similarity between the average map and the corresponding point of the face image is calculated. Iteratively calculates the similarity of the evaluations to search, find the optimal position of each pixel to stop the search, and take the optimal position as the next input. In this step, it is possible to achieve an effect of concentrating the points in the feature relationship diagram of the test image in the vicinity of the corresponding points in the elastic template [26]Compressing the face elastic template map into an average graph is the key to the global search step, which helps to reduce the amount of calculation.(2)
Local adjustment: after a global search, the use of flexible templates does not require averaging but changes based on location and scale. After locating the key points of the face to be recognized in the global search, four different pixel offsets are selected as the new positions for exhaustive search. So that the Jet value of each node of the face image to be recognized is the most similar to the average Jet value of the corresponding node of the reference face image, and the angle-independent similar function is still used here(2) Fine Match. First, the definition uses the following functions to find the optimal solution for comparison:(24)SC,FBG=1N∑i=1NmaxmSJiC,JiBm−λE∑e=1EΔ⟶eC−Δ⟶eBΔ⟶eB,where SJ,J′=∑jAj⋅Aj′/∑jAj2∑jAj′2In this paper, the rough matching strategy is used to determine the key points of the face image, but this is not enough for the matching of face recognition. In order to more accurately locate the specific location of the key points of the face, this paper introduces a genetic algorithm to improve the matching precision of the key feature points of the face and achieve the effect of accurately locating the specific position of the key points of the face. The idea of genetic algorithm is an optimization algorithm based on the biological law of “natural selection, survival of the fittest” in the biological world. The specific algorithm process is as follows:(1)
Gene chain code: the biological information of the organism is determined by the chromosome of the biological genetic gene. In this paper, the sequence of feature points consisting of key feature points of the face is used as the gene coding, and each feature point is represented by coordinates(2)
Fitness: each gene chromosome corresponds to the optimal solution of a problem, and fitness refers to the degree of similarity between the optimal solution and the problem. In this paper, the similarity between the key feature points of the face and the face elastic template is studied, and the individual with the highest fitness value is reserved according to the principle of eliminating the fittest(3)
Cross: this paper adopts two-point intersection method, selects two different individuals to cross, and uses the roulette model to ensure that the probability that the individual is selected is proportional to its fitness value. Then, the two random positions in the sequence of feature point sequences in the randomly selected two individuals are exchanged coordinates to complete the intersection process(4)
Variation: variation is an individual gene mutation and is a means to expand the diversity of the population. In the optimization algorithm, using mutation in the optimal solution interval for traversal search. In this paper, the mutation operator is aimed at the sequence of feature points, randomly selects a position in the sequence string, randomly selects coordinate values in the neighborhood of the position, and mutates into a new individual


## 2.3.3. Face Recognition

After the appellate process is implemented, the facial feature graph is successfully extracted from the face image to be recognized. This paper only needs to compare the successfully extracted facial feature graph with the dynamic facial feature database constructed in this paper to realize face recognition. In this paper, the average value of the sum of Jet comparisons between the corresponding points of different feature graphs is used as the similarity function between feature graphs. The calculation formula is as follows:(25)SGGI,GM=1N′∑nSαJn′I,JnM,where GI is a facial feature attribute graph in face database, GM is the feature graph of face image to be recognized, and N′ represents the total number of nodes.The value of similarity function is sorted. If the maximum value of all the values is obviously too large, it shows that the face is in the face database. Otherwise, the face is not in the database.


## 3. Experiments

In the experimental simulation work of this paper, the computer hardware configuration is as follows:(1)
Processor: Intel i5 2.50 GHz(2)
Memory: 4GB(3)
Operating system: Windows 7 64-bit Ultimate(4)
The simulation software is MATLAB 2014BThe simulation images are simulated by using star photos and ORL face database.


## 4. Discussion

In order to illustrate the method of this paper, this paper uses a picture to simulate the face detection effect of the AdaBoost learning algorithm. Figure2 shows the simulation result of the AdaBoost learning algorithm for detecting a human face. Firstly, face detection is performed on the original image (Figure 2(a)). After detecting the face, the image is clipped to get Figure 2(b). The results show that the AdaBoost learning algorithm can accurately find the face and cut it. Then, in order to reduce the impact of partial illumination and pose changes on the quality of the collected face images, we improve the accuracy of subsequent feature extraction and matching, and then improve the performance of the entire authentication system. After processing, Figure 2(c) is obtained. Compared with Figure 2(b), it can be clearly seen that the result of the gradation normalization is more clear. Features such as the eyebrows, eyes, and mouth are easier to identify than the surrounding area.Figure 2
AdaBoost learning algorithm face detection effect diagram.
(a)
The original image(b)
Crop image(c)
Grayscale normalizationIn order to solve the time-consuming problem of the original elastic template method using Gabor function to extract face features, this paper uses two-dimensional discrete wavelet transform to extract face features. In the matching strategy, rough matching and fine matching are used to superimpose. Figure3 shows the effect of rough matching and fine matching. It can be seen from Figure 3(a) that the rough matching strategy is not accurate for the location of the key points (eyes, mouths) of the face. In the feature selection, the left eye is slightly deviated, but the right eye positioning deviation is about half, and the lip positioning does not include the lower lip. Figure 3(a) is obtained after fine matching strategy. It can be seen that the problem of inaccurate location after rough matching strategy has been greatly improved. The left eye is almost accurate positioning, the right eye is only a little bit biased, and the whole face feature is almost captured.Figure 3
Matching strategy effect graph in this paper.
(a)
Rough matching strategy(b)
Fine matching strategyIn order to better illustrate the superiority and effectiveness of the matching strategy in this paper, this paper compares it with the traditional elastic template method matching strategy, as shown in Figure4. It can be seen that in the accuracy of feature point calibration, the traditional elastic template method has deviations in the positioning of the left and right eyes, which is not accurate enough compared to the improved elastic template method; this can be concluded: In this paper, the improvement of the traditional elastic template method has improved the problem that the traditional elastic template method is not accurate enough.Figure 4
Matching strategy effect contrast graph.
(a)
Traditional elastic template method(b)
Improved elastic template methodIn this paper, different face recognition methods such as eigenface method, hidden Markov method, traditional elastic template matching method, and dynamic connection matching method are compared with the method designed in this paper. The comparison results are shown in Table1. The number of categories used in the experiment was 40, and 10 images in the ORL face database per person with different expressions, poses, and illumination effects were simulated. Among them, the first five of 40 people (200 in total) were taken out for training, and the last five (200 in total) were used for testing. The test results of other methods in Table 1 are from the literature, and the comparison results are shown in Table 1:Table 1
Performance comparison of different face recognition methods.
MethodCorrect recognition rate (%)Feature face method90.5Hidden Markov method87Traditional elastic template matching96Dynamic connection matching92The method of this paper97.3It can be seen from Table1 that the proposed method, elastic template matching method, and dynamic connection matching method are face recognition methods that use the gray information and geometric features of the face to elastically match, which are less affected by illumination and the recognition rate is higher. However, the feature face method only uses gray information and does not use geometric structure features for elastic matching, which is greatly affected by illumination and has a low recognition rate.In order to prove that the intelligent algorithm based on facial features designed in this paper can effectively improve the inaccuracy of face recognition caused by different light, posture, make-up, and other problems in reality, this paper uses 20 males and 20 females as performance tests; they are between 20 and 29 years old. They were given different light, postures, make-up, and other simulation tests, and the results are shown in Table2:Table 2
Comparison of face recognition performance under different conditions.
CategoryConditionCorrect recognition rate (%)LightSunny day92.9Rainy day90.9Dark88.3PosturesHead-up93.5Look-up91.3Look-down91.1Make-upNo make-up93.1Light make-up91.7Heavy make-up89.5The histogram is as follows.Figure5 is a histogram of face recognition performance comparison under different conditions, in which conditions one, two, and three correspond to the conditional order in Table 2. It can be seen from Figure 5 and Table 2 that the accuracy of face recognition is different under the three environments, and the accuracy rate is reduced in the comparison of ORL face database simulation under three environments. First of all, for different light, this paper uses three kinds of light environment tests, such as sunny day, rainy day, and dark weather, corresponding to conditions 1, 2, and 3 in the histogram. It can be seen that the light has an influence on the accuracy of the face recognition of the system. Among them, the light of the sunny day is the best, the accuracy rate is the highest, and the accuracy rate is 92.9%; the rainy day is second, and the accuracy rate is 90.9; and under the dark condition, although there is light, the light is the worst, the accuracy of face recognition is the worst, and the accuracy rate is 88.3%.Figure 5
Comparison of face recognition performance under different conditions.For posture, this paper uses three conditions of head-up, look-up, and look-down to test, corresponding to conditions 1, 2, and 3 in the histogram. It can be seen that the best accuracy rate of face recognition of the three postures is head-up, the accuracy rate is 93.5%, and the difference between the accuracy of look-down and look-up is only 0.2%.Make-up is indispensable for modern women, so in the context of smart homes, face recognition testing about make-up is an indispensable part. In this paper, no make-up, light make-up, and heavy make-up three conditions were tested, corresponding to conditions 1, 2, and 3 in the histogram. It can be seen that for the simulation of the method designed in this paper, the face recognition accuracy of nonmake-up is the best, and the accuracy rate is 93.1%, followed by light make-up, the accuracy rate is 91.7%, the accuracy of heavy make-up is the lowest, and the accuracy rate is 89.5%.In summary, it can be explained that different light, postures, and make-up have an influence on the accuracy of face recognition in this design method, but the most influential is that under the condition of darkness, the accuracy rate is 88.3%. This accuracy is acceptable in practice and can be improved by increasing the intensity of night light. This shows that the method designed in this paper can also achieve a good face recognition effect in practice and can be applied to practice. Similarly, the intelligent algorithm based on facial features designed for identity authentication in smart home is an algorithm with good performance.


## 5. Conclusions

With the development of science and technology, more and more occasions need identity recognition, which makes identity recognition become the research hotspot of today’s era. People cannot meet the needs of today’s society by traditional authentication methods, such as identification items such as keys, certificates, and cards and identification knowledge such as user names and passwords. More and more research is focused on biometric identification technology, which provides a reliable solution for identity authentication through some biological characteristics such as the fingerprint, iris, voice, and face. This paper studies the problem that the authentication of the smart home identification system is basically based on feature matching and lacks intelligence. Especially for today make-up, facelift and posture problems will greatly reduce the system resolution accuracy proposed solutions. Firstly, the AdaBoost learning algorithm is used to construct the face detection and eye detection classifier, which realizes the detection and localization of face and eyes, and proposes a standardized processing method. It effectively reduces the influence of part of illumination and posture changes on the quality of the collected face images and improves the accuracy of subsequent feature extraction and matching; secondly, it uses two-dimensional discrete wavelet transform to extract face features and constructs a dynamic feature library of individual faces; finally, the improved elastic template matching algorithm is used to build an intelligent classification method of the dynamic face elastic model. The matching strategy in the elastic template matching algorithm is combined with rough matching and fine matching. The simulation shows that the proposed method can intelligently adapt to various environments without reducing the accuracy. The research and improvement of face recognition technology can not only promote the development of biometric technology but also lay a good foundation for the application of more accurate and reliable identity authentication system based on face features.



---

*Source: 5558578-2021-08-01.xml*