A face recognition method based on improved recursive least squares method

The improved recursive least squares method enhances face recognition accuracy and robustness by employing an innovative solution with elastic net regularization, incorporating L1 and L2 hybrid regularization, and employing scale-invariant feature transform (SIFT) and local binary pattern (LBP) for feature extraction, addressing diverse facial expressions and insufficient training samples.

CN114898423BActive Publication Date: 2024-12-24SOUTHEAST UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210338391.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-01
Publication Date
2024-12-24
Estimated Expiration
2042-04-01

AI Technical Summary

Technical Problem

Face recognition technologies face challenges such as diverse facial expressions, insufficient training samples, low recognition efficiency, and poor robustness due to environmental factors, with existing sparse reconstruction methods being unsuitable for real-time applications and having complex iterative formula derivations.

Method used

A face recognition method utilizing an improved recursive least squares method with elastic net regularization, incorporating L1 and L2 hybrid regularization, and employing scale-invariant feature transform (SIFT) and local binary pattern (LBP) for feature extraction, followed by sparse reconstruction and classification.

Benefits of technology

Enhances recognition accuracy and robustness by improving sparse characteristics and computing performance, ensuring high efficiency even with diverse facial expressions and insufficient training samples.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114898423B_ABST
    Figure CN114898423B_ABST
Patent Text Reader

Abstract

The present invention discloses a face recognition method based on an improved recursive least squares method. First, a face image acquired in advance is preprocessed and divided into training samples and test samples. Second, the preprocessed image is feature extracted based on scale-invariant feature transformation and local binary patterns. Then, a sparse vector is obtained by using an improved sparse representation method based on the recursive least squares method, and image sparse reconstruction is performed. Finally, the features after sparse reconstruction are matched with the features of the face image in the database to obtain the classification recognition result. The present invention has an excellent and robust recognition effect in face recognition, improves the accuracy of face recognition, and can also make up for the problem of insufficient samples through sparse representation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of artificial intelligence, and in particular relates to a face recognition method based on an improved recursive least squares method. Background Art

[0002] Face recognition technology uses image preprocessing, feature extraction, sparse reconstruction, recognition and classification to achieve the purpose of face recognition. However, the accuracy and robustness of face recognition are still affected by complex environmental factors, resulting in low recognition accuracy and poor robustness. In addition, under some conditions with high recognition requirements, existing face recognition technology cannot meet actual requirements. Face recognition technology faces many challenges: such as diverse facial expressions, interference from environmental factors, low image quality, insufficient training samples, and low recognition efficiency. These challenges and difficulties do not exist alone in actual situations. In the actual face recognition process, many factors that interfere with recognition are superimposed and combined with each other.

[0003] Most of the challenges that face recognition faces require the application of sparse reconstruction, and sparse representation is its main technology. Sparse representation refers to identifying only a few basic elements in a signal, and then using a linear combination of these basic elements to represent all or most of the original signal. At present, the relaxation algorithm and greedy algorithm for sparse representation usually operate offline on a batch of collected data, which is not suitable for real-time sparse representation and real-time sparse signal estimation. In response to the above problems, many studies have proposed recursive least squares algorithms, because recursive least squares can take into account past errors, but the iterative formula derivation process of many algorithms is too complicated, and the performance of the proposed related algorithms under sparsity needs to be improved, and good performance under non-sparse conditions and low signal-to-noise ratio conditions cannot be guaranteed. Summary of the invention

[0004] Purpose of the invention: In order to solve the above challenges existing in the prior art, such as diverse facial expressions, insufficient training samples, and low recognition efficiency, the present invention proposes a face recognition method based on an improved recursive least squares method.

[0005] Technical solution: The present invention provides a face recognition method based on an improved recursive least squares method, which specifically includes the following steps:

[0006] (1) Preprocessing the pre-acquired face images and dividing them into training samples and test samples;

[0007] (2) Feature extraction of the preprocessed image based on scale-invariant feature transform and local binary pattern;

[0008] (3) Using the improved recursive least squares method to obtain sparse vectors, the image is reconstructed;

[0009] (4) The features after sparse reconstruction are matched with the features of the database face images to obtain the classification and recognition results.

[0010] Furthermore, the image preprocessing in step (1) is to perform denoising, grayscale correction, histogram equalization, and normalization on the face image; after dividing the image spectrum into high frequency and low frequency, the low frequency part is histogram equalized, and then the high frequency part is subjected to denoising, and then the image edge is sharpened to highlight the image details, and finally the modified low frequency and high frequency parts are inversely processed to obtain a normalized image.

[0011] Furthermore, the implementation process of step (2) is as follows: use SIFT to search images in all scale spaces, and use Gaussian differential functions to identify potential points with strong scale and rotation robustness; at each candidate position, use a three-dimensional quadratic function to determine the position and scale; in the neighborhood around each key point, measure the local gradient of the image at the selected scale; use LBP to binarize the grayscale image, set a 3*3 square window, use the center pixel of the window as the threshold, compare the grayscale of the pixels in the adjacent 8 areas with the center pixel value, if it is greater than the center pixel value, record it as 1, if it is less than the center pixel value, record it as 0; the center point is represented by 8 bits of binary, calculate 256 types of LBP, and statistically analyze the histogram.

[0012] Furthermore, the implementation process of step (3) is as follows:

[0013] The improved recursive least squares method is a recursive least squares method based on elastic net hybrid regularization; the algorithm is divided into cost function design and recursive solution; the recursive solution includes optimal estimation relationship, iterative relationship derivation, iterative relationship update and approximate estimation; the cost function design is to add regularization to the basic cost function to achieve the purpose of sparseness or generalization, and add L1 and L2 hybrid regularization elastic combination to the algorithm to construct a new cost function; the optimal estimation relationship is obtained by partial derivative of the cost function to solve the function expression of the weight estimation vector; the iterative relationship is derived to derive the iterative relationship of the sub-expression of the weight estimation vector expression, and then obtain the iterative relationship of the weight estimation vector; the iterative relationship is updated by using the inversion lemma to avoid the large-scale inversion process of the sub-expression and obtain an iterative relationship that is easier to solve; the approximate estimation is to assume that there is no obvious sign of change in the value of the coefficient vector estimate in an iteration, and use the approximate estimation to obtain the vector estimate value in the iteration.

[0014] Furthermore, the implementation process of step (4) is as follows:

[0015] Classification recognition includes intra-class recognition and inter-class recognition. Intra-class recognition is to find the class that best matches the face to be recognized in the sample library; inter-class recognition is to determine whether the face to be recognized belongs to a class of faces that already exist in the sample library. Intra-class recognition requires judging whether the distance measurement between the face to be recognized and the known faces is less than a certain limit value; inter-class recognition requires finding the calculated distance between the face to be recognized and all the faces in the sample library, and the final result is determined by the minimum value. The representation error between each test sample and each class of samples in the training sample set is:

[0016] r k,i (y)=||y k -x i h k,i ||2

[0017] Among them, r k,i (y) represents the representation error between the kth test sample and each type of sample in the training sample set, y k represents the kth test sample, x i represents the i-th type of training sample in the training sample set, h k,i It represents the sparse coefficient vector corresponding to the i-th type of training sample when each test sample is linearly sparsely represented by the training sample set. The smaller the error, the more similar the input test sample is to the training sample of this type.

[0018] Furthermore, the cost function is:

[0019]

[0020] in,(·) T represents the inverse matrix of a matrix, (·) -1 represents the inverse matrix of the matrix, represents the square of the L1 norm, represents the square of the L2 norm; λ1+λ2=1,λ1,λ2>0, the two parameters λ1 and λ2 are used to adjust the ratio of L1 regularization and L2 regularization in the cost function; P(0) is the covariance matrix used for initialization, and P is set -1 (0) = q0; the input and output parameter estimates are given by the following standard relationship: Where h = [h0h1…h N-1 ] T represents the system weight vector, x(k)=[x0x1…x N-1 ] T is the input vector signal, y(k) is the output signal, n(k) is the measurement noise, k is the time index; h is the weight vector, is the estimated target of h at time k; h(0) is an initial estimate of h used for initialization; the parameter ρ is the regularization parameter, and ρ>0; when the weight vector h has only a few non-zero elements, it means that the solution is sparse.

[0021] Furthermore, the specific implementation process of obtaining the recursion is as follows:

[0022] The optimal estimate vector expression that minimizes the cost function is:

[0023]

[0024] where I is the identity matrix, sgn is the sign function applied to each component of the vector, X(k) = x(k)x(k-1)…x(k-N+1)] represents the set of inputs, and Y(k) = [y(k)y(k-1)…y(k-N+1)] represents the set of outputs; for compactness, To update the representation;

[0025] Defined as a new type of covariance matrix:

[0026] Through the relationship between the covariance matrix, the iterative relationship lies in the sign function matrix of the input matrix and the weight vector, and P is obtained. -1 (k) and P -1 The recursive relationship between (k-1) is as follows:

[0027]

[0028] When the matrix inverse lemma is applied to the iterative relationship between inverse matrices, the recursive form of P(k) is obtained as follows:

[0029] P(k)=P(k-1)-P(k-1)q(k)(I+s(k)P(k-1)q(k)) -1 s(k)P(k-1)

[0030] The correlation matrix is ​​defined as: According to the iterative relationship of the covariance matrix, the weight estimation vector is obtained and The recursive relation is:

[0031]

[0032] After multiplying the covariance matrix and the inverse matrix, we can get The recursive update equation of is:

[0033]

[0034] Where e(k) is e(k)=y(k)-h T The instantaneous error term given by (k-1)x(k);

[0035] In order to make the sign of the function known in the k-th recursion, assuming that the estimated value of the coefficient vector has no sign of changing significantly in one iteration, an approximate estimation method is used, that is, using and Replace and Estimation vector The iterative formula can be approximated as: And the recursive form of the covariance matrix P(k) changes to: P(k) = P(k-1)-P(k-1)Q(k)(I+S(k)P(k-1)Q(k)) -1 S(k)P(k-1)

[0036] Among them, P(0) = (q0 + ρλ2)I, this initialization value also produces a regularization effect; the correlation matrix is ​​defined as:

[0037]

[0038]

[0039] Beneficial effects: Compared with the prior art, the beneficial effects of the present invention are: facing the situation of diverse facial expressions and insufficient training samples, it can still ensure high recognition efficiency. Compared with the classic sparse representation algorithm, the recursive least squares method of the present invention has more superior sparse characteristics and computing performance, which improves the face recognition effect and enhances the robustness of face recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 is a flow chart of the present invention;

[0041] Figure 2 This is the SIFT feature extraction flow chart;

[0042] Figure 3 is the Gaussian pyramid model;

[0043] Figure 4 It is a schematic diagram of LBP feature description;

[0044] Figure 5 Flowchart of the improved recursive least squares algorithm. DETAILED DESCRIPTION

[0045] The present invention is further described in detail below in conjunction with the accompanying drawings:

[0046] The present invention proposes a face recognition method based on improved recursive least squares, which can solve the problems of diverse facial expressions, insufficient training samples, and low recognition efficiency by utilizing the sparse representation characteristics of recursive least squares to participate in the sparse reconstruction part of face recognition. Among them, a least squares method based on L1 and L2 mixed regularization recursion, adding L1 regularization can obtain a sparse solution for sparse representation, and adding L2 regularization can make our optimization solution stable and fast. Based on the synergy between the two, relevant feature node groups can be better selected, which means that the new recursive least squares method can benefit from the effects of ridge regression and sparse solution at the same time, obtain a sparse solution more stably, and better achieve the purpose of sparse reconstruction.

[0047] like Figure 1 As shown, the following steps are included:

[0048] Step 1: Preprocess the pre-acquired face images and divide them into training samples and test samples.

[0049] The collected face data samples are divided into training samples and test samples. The training sample processing mainly includes image preprocessing, feature extraction to construct redundant dictionary, sparse reconstruction, recognition and classification; the test sample processing mainly includes image preprocessing, feature extraction, sparse reconstruction, recognition and classification. Image preprocessing is a series of preprocessing such as grayscale correction, denoising, and normalization for images containing interference factors such as noise and background watermarks. The image spectrum is divided into two parts: high-frequency and low-frequency parts. The high-frequency part represents the edge, corresponding to the place where the brightness or grayscale changes violently. The low-frequency part represents the place where the change is not large and is strongly affected by the light. After the image spectrum is divided into high-frequency and low-frequency, the low-frequency part is histogram equalized, and then the high-frequency part is denoised. After that, the image edge is sharpened to highlight the details of the picture. Finally, the modified low-frequency and high-frequency parts are inversely processed to obtain the normalized image, that is, the preprocessed image.

[0050] Step 2: Feature extraction is performed on the preprocessed image based on scale-invariant feature transform (SIFT) and local binary pattern (LBP).

[0051] SIFT is used to search images in all scale spaces, and Gaussian differential functions are used to identify potential points that are robust to scale and rotation; at each candidate position, a finely fitted model (three-dimensional quadratic function) is used to determine the position and scale; in the neighborhood around each key point, the local gradient of the image is measured at the selected scale. The specific implementation process is as follows:

[0052] like Figure 2 The SIFT feature extraction flowchart shown realizes finding key points in different scale spaces and calculating the direction of the key points.

[0053] Scale space extreme point detection: construct Gaussian difference scale space (DOG), detect scale space extreme points, and construct DOG function:

[0054] D(a,b,σ)=[G(a,b,γσ)-G(a,b,σ)]*I(a,b)=L(a,b,kσ)-L(a,b,σ) where γ is the scale factor of two adjacent Gaussian scale spaces. The original image is defined as: I(a,b), L(a,b,σ) represents the Gaussian scale space of the image, and the Gaussian kernel function m,n represent the dimensions of the Gaussian template (determined by (6σ+1)*(6σ+1)), (a,b) represent the pixel positions of the image, and σ is the scale space factor. The smaller the σ value, the less the image is smoothed, and the smaller the corresponding scale. The Gaussian kernel function is based on Figure 3 The pyramid model shown in the figure continuously downsamples the original image in the scale space σ, and uses different parameters to perform Gaussian blur on an image in each layer of the image pyramid to obtain a series of images of different sizes, from large to small.

[0055] Key point positioning: Eliminate extreme points that do not meet the requirements, including low-contrast feature points and unstable edge response points.

[0056] Remove low-contrast feature points and apply Taylor expansion to the DOG function D(a) at point a:

[0057]

[0058] Among them, the offset a is the extreme point of D(a), D T , a T represents inversion, so taking the derivative of the above formula and setting it to 0, we get represents the target point. Let the contrast threshold be c. Then remove the feature points.

[0059] Eliminate unstable edge response points and use the 2×2 Hessian matrix to calculate stability:

[0060]

[0061] Stability formula: Where D aa ,D ab ,D bb It is obtained by taking the difference of the corresponding positions in the neighborhood of the candidate point.

[0062] If the extreme point does not satisfy the stability formula, the extreme point is removed, where r is the ratio of the maximum eigenvalue to the minimum eigenvalue, which is used to control the stability of the feature point.

[0063] The gradient direction distribution characteristics of the pixels in the key point area are used to specify the direction parameters for each key point, so that SIFT has rotation invariance. The gradient modulus m(a, b) and direction θ(a, b) of each point can be obtained by the following formula:

[0064]

[0065]

[0066] Get the position, scale, direction and other information of SIFT key points of the face image.

[0067] The significant advantages of LBP are that it is insensitive to illumination and resistant to viewing angle changes, such as Figure 4 The LBP window shown describes the key points, LBP binarizes the grayscale image, sets a 3*3 square window, takes the center pixel of the window as the threshold, compares the grayscale of the adjacent 8-field pixels with the center pixel value, and records it as 1 if it is greater than the center pixel value, and records it as 0 if it is less than the center pixel value; the center point is represented by 8-bit binary, 256 types of LBP are calculated, and the histogram is statistically analyzed. The present invention introduces LBP features and uses LBP to describe the key point area based on SIFT, combines the advantages of the two methods, and reduces the dimension of the key point descriptor.

[0068] The LBP value of the pixel at the center of the window is used to reflect the texture information of the area:

[0069]

[0070] Among them, (a c ,b c ) is the center pixel, and its pixel value is i c ,i p Represents the value of other pixels in the neighborhood, and sgn() is the sign function.

[0071] Step 3: Use the improved recursive least squares sparse representation method to obtain a sparse vector and perform sparse reconstruction of data or images. Figure 5 As shown, the process of implementing sparse reconstruction using the improved recursive least squares method is as follows:

[0072] The improved recursive least squares method is based on the elastic net regularized recursive least squares method, in which the algorithm can be divided into two parts: designing the cost function and obtaining the recursion, in which obtaining the iterative relationship can be divided into four small parts: obtaining the optimal estimation relationship, deriving the iterative relationship, updating the iterative relationship and approximate estimation. The cost function design part is to add regularization to the basic cost function part to achieve the purpose of sparseness or generalization; the optimal estimation relationship part solves the function expression of the weight estimation vector by taking the partial derivative of the cost function; the iterative relationship derivation part is to derive the iterative relationship of the sub-expression of the weight estimation vector expression, and then obtain the iterative relationship of the weight estimation vector; the iterative relationship update part refers to using the inversion lemma to avoid the large-scale inversion process of the sub-expression, and obtain an iterative relationship that is easier to solve; the approximate estimation part is to assume that there is no obvious sign of change in the value of the coefficient vector estimate in an iteration, and use approximate estimation to obtain the vector estimate value in the iteration. Since elastic net regularization is based on the synergy between L1 and L2 regularization, it can better select relevant feature node groups, so that recursive least squares method can benefit from the effects of ridge regression and sparse solution at the same time.

[0073] (1) Design cost function.

[0074] The present invention adopts a new cost function, and adopts a dynamic adjustment form to determine the proportion of two regularizations in the cost function, wherein the regularization part is composed of the square part of the L1 and L2 mixed regularization, and the initialization value of the covariance matrix. In the L1 and L2 mixed regularization parts, different proportions can be adopted by achieving the goal. When more sparsity is needed, increasing the L1 regularization part can achieve the purpose. When generalization is needed, the cost function benefits from ridge regression, and the proportion of L2 regularization can be increased. When the proportion of each part is set to zero, the elastic net regularization will be converted to L1 regularization or L2 regularization. In the present invention, since the sparse representation characteristics of L1 regularization are required to participate in the sparse reconstruction of face recognition, the L1 regularization proportion occupies the majority in the present invention.

[0075] If the test image y is a face image of a person in a certain class, then y can be represented by a linear combination of the dictionary x, that is, y = h T x, by calculating the weight vector h, determine the test image category. If the face image pixels are damaged, you can transform y = h T x+n to solve h, where n represents the noise generated by the damage, corresponding to the damaged pixels of the face image. In the following formula, (·) T represents the inverse matrix of a matrix, (·) -1 Represents the inverse of a matrix.

[0076] The cost function associated with the L1 and L2 mixed regularized least squares problem can be defined as:

[0077]

[0078] In the formula, λ1+λ2=1,λ1,λ2>0, and the two parameters λ1 and λ2 are used to adjust the ratio of L1 regularization and L2 regularization in the cost function. P(0) is also a covariance matrix for initialization, and P is set -1 (0) = q0, and the initial value of the covariance matrix will change later due to the definition of a new covariance matrix. The input and output parameter estimates are given by the following standard relationship: Where h = [h0h1…h N-1 ] T represents the system weight vector, x(k)=[x0x1…x N-1 ] T is the input vector signal, y(k) is the output signal, n(k) is the measurement noise, and k is the time index. The direct purpose of the present invention is to seek to estimate the system weight vector h in a recursive manner, using the input vector signal and output signal collected up to time k to obtain the estimated target value of h at time k. And h(0) is an initial estimate of h for initialization, and P(0) is also a covariance matrix for initialization. The parameter ρ is a regularization parameter, and ρ>0. Among them, when the weight vector h has only a few non-zero elements, it means that the solution is sparse.

[0079] (2) Obtain the optimal estimation relationship, that is, find the weight estimation vector that minimizes the cost function in a recursive manner.

[0080] Let the gradient of the cost function be 0, and we can get the expression of the optimal estimate vector. The following is the equation for the gradient of the cost function:

[0081]

[0082] Let X(k) = [x(k)x(k-1) ... x(k-N+1)] represent the input set, and let Y(k) = [y(k)y(k-1) ... y(k-N+1)] represent the output set. Represents a non-smooth function The sub-gradient of Represents a non-smooth function The sub-gradient. Since the L1 norm is the sum of the absolute values ​​of the vector values, there will be a positive and negative problem when calculating the gradient. The present invention can improve the calculation efficiency by introducing a sign function, and express the equation of the sub-gradient as a matrix product, which is convenient for deriving the iterative relationship. The sub-gradient can be calculated as:

[0083]

[0084] where sgn is the sign function applied to each component of the vector: It is easy to see that To improve compactness, use To update the representation, we can write: Since the L2 norm is the sum of the squares of the vector values ​​and then the derivative, there will be a positive and negative problem when calculating the gradient. However, after the derivative, it will be found that the positive and negative problems of the absolute value and the sign function are offset. Therefore, it is easier to obtain the optimal estimate of L2 regularization than L1. Then the estimated vector of L2 regularization can be calculated as: By calculating the subgradient equation and substituting the subgradient vector expression represented by the symbolic function, we can get the equation of the optimal estimate vector, and using basic inversion, we can get the optimal estimate vector expression that minimizes the cost function:

[0085]

[0086] Among them, I is the unit matrix. It can be seen that no recursive relationship can be found in the expression of the optimal estimation vector. The equation consists of two parts. The first part is composed of the sign function of the estimation vector, the initial value of the covariance matrix, the unit matrix and the input set. The second part is composed of the initial value of the covariance matrix, the input and output set and the initial value of the weight vector. In order to obtain the recursive relationship, the iteration must be found from the first part.

[0087] (3) Derive the iterative relationship, that is, the iterative relationship of the first part of the above optimal estimation vector.

[0088] The formula in part 1 is considered as a whole and is set as the inverse of a matrix to facilitate updating the iterative relationship. Therefore, the purpose of deriving the iterative relationship is to derive the calculation The recursive formula of , and the initial value of the matrix has changed. It is directly defined as a new covariance matrix, that is,

[0089] Through the relationship between the covariance matrix, the iteration relationship lies in the sign function matrix of the input matrix and the weight vector, so using the difference relationship between iterations, we can get P -1 (k) and P -1 The recursive relationship between (k-1) is as follows:

[0090]

[0091] (4) Update the iterative relationship.

[0092] If the above iterative relationship is used, each time an iteration is performed, an inversion process will be encountered. In order to obtain a more convenient recursive relationship between P(k) and P(k-1), the famous matrix inverse lemma can be used, that is, (A+BC) -1 =A -1 -A -1 B(I+CA -1 B)CA -1 , and obtain a more convenient iterative relationship of the covariance matrix.

[0093] When the matrix inverse lemma is applied to the iterative relationship between inverse matrices, the recursive form of P(k) can be obtained as follows:

[0094] P(k)=P(k-1)-P(k-1)q(k)(I+s(k)P(k-1)q(k)) -1 s(k)P(k-1)

[0095] The correlation matrix is ​​defined as: Then, according to the iterative relationship of the covariance matrix, it is easy to get the weight estimation vector and The recursive relation is:

[0096]

[0097] Therefore, after multiplying the covariance matrix and the inverse matrix, we can get The recursive update equation of is: where e(k) is e(k)=y(k)-h T The instantaneous error term given by (k-1)x(k).

[0098] (5) Approximate iteration.

[0099] The optimal estimation vector cannot be obtained through the recursive equation, because the value in the recursive function in the program must have been obtained in the previous recursion, otherwise it will cause the recursion to fail. It is necessary to base Calculation is impossible in one recursion, so approximate iteration is proposed.

[0100] In order to make the sign function known in the k-th recursion, assuming that the estimated value of the coefficient vector does not change significantly in one iteration, an approximate estimation method is used to solve it, that is, using and Replace and Then, the estimated vector The iterative formula can be approximated as: And the recursive form of the covariance matrix P(k) also needs to be changed to P(k)=P(k-1)-P(k-1)Q(k)(I+S(k)P(k-1)Q(k)) -1 S(k)P(k-1). Where P(0)=(q0+ρλ2)I, this initialization value also produces a regularization effect. And the correlation matrix is ​​defined as: The specific algorithm is shown in Table 1:

[0101] Table 1 Least squares algorithm based on elastic net regularized recursion

[0102]

[0103] Step 4: Match the sparsely reconstructed features with the features of the database face image to obtain the classification recognition result.

[0104] There are two main types of classification recognition: one is intra-class recognition, which is to find the class that best matches the face to be recognized in the sample library, and the other is inter-class recognition, which is to determine whether the face to be recognized belongs to a class of faces that already exist in the sample library. In intra-class recognition, it is necessary to determine whether the distance measurement between the face to be recognized and the known faces is less than a certain limit value; inter-class recognition requires finding the calculated distance between the face to be recognized and all the faces in the sample library, and the final result is determined by the minimum value. The representation error between each test sample and each class of samples in the training sample set is:

[0105] r k,i (y)=||y k -x i h k,i ||2

[0106] Among them, r k,i (y) represents the representation error between the kth test sample and each type of sample in the training sample set, y k represents the kth test sample, x i represents the i-th type of training sample in the training sample set, h k,i It represents the sparse coefficient vector corresponding to the i-th type of training sample when each test sample is linearly sparsely represented by the training sample set. The smaller the error, the more similar the input test sample is to the training sample of this type.

[0107] The specific embodiments described herein are merely examples of the spirit of the present invention. Those skilled in the art may make various modifications or additions to the specific embodiments described or replace them in similar ways, but they will not deviate from the spirit of the present invention or exceed the scope defined by the appended claims.

Claims

1. A face recognition method based on improved recursive least squares method, characterized in that: The following steps are involved: (1) Preprocessing the pre-acquired face images and dividing them into training samples and test samples; (2) Feature extraction of the preprocessed image based on scale-invariant feature transform and local binary pattern; (3) Using the improved recursive least squares method to obtain sparse vectors, the image is reconstructed; (4) The features after sparse reconstruction are matched with the features of the face images in the database to obtain the classification and recognition results; The implementation process of step (3) is as follows: The improved recursive least squares method is a recursive least squares method based on elastic net hybrid regularization; the algorithm is divided into designing a cost function and obtaining recursion; the obtaining recursion includes obtaining an optimal estimation relationship, deriving an iterative relationship, updating an iterative relationship and approximate estimation; wherein the design of the cost function is to add regularization to the basic cost function part to achieve the purpose of sparseness or generalization, and add L1 and L2 hybrid regularization elastic combination to the algorithm to construct a new cost function; obtaining the optimal estimation relationship by taking partial derivatives of the cost function, solving the function expression of the weight estimation vector; The derivation of the iterative relationship is to derive the iterative relationship of the sub-expressions of the weight estimation vector expression, and then obtain the iterative relationship of the weight estimation vector; Updating the iterative relation refers to using the inversion lemma to avoid the large-scale inversion process of sub-expressions and obtain an iterative relation that is easier to solve; approximate estimation is to assume that the value of the coefficient vector estimate has no obvious signs of changing in an iteration, and use approximate estimation to obtain the vector estimate in the iteration; The cost function is: in,(·) T represents the inverse matrix of a matrix, (·) -1 represents the inverse matrix of the matrix, represents the square of the L1 norm, represents the square of the L2 norm; λ1+λ2=1,λ1,λ2>0, the two parameters λ1 and λ2 are used to adjust the ratio of L1 regularization and L2 regularization in the cost function; P(0) is the covariance matrix used for initialization, and P is set -1 (0) = q0; the input and output parameter estimates are given by the following standard relationship: Where h = [h0h1…h N-1 ] T represents the system weight vector, x(k)=[x0x1…x N-1 ] T is the input vector signal, y(k) is the output signal, n(k) is the measurement noise, k is the time index; h is the weight vector, is the estimated target of h at time k; h(0) is an initial estimate of h used for initialization; parameter ρ is the regularization parameter, and ρ>0; when the weight vector h has only a few non-zero elements, it means that the solution is sparse; The specific implementation process of obtaining the recursion is as follows: The optimal estimate vector expression that minimizes the cost function is: where I is the identity matrix, sgn is the sign function applied to each component of the vector, X(k) = [x(k)x(k-1) ... x(k-N+1)] represents the set of inputs, and Y(k) = [y(k)y(k-1) ... y(k-N+1)] represents the set of outputs; for compactness, To update the representation; Defined as a new type of covariance matrix: Through the relationship between the covariance matrix, the iterative relationship lies in the sign function matrix of the input matrix and the weight vector, and P is obtained. -1 (k) and P -1 The recursive relationship between (k-1) is as follows: When the matrix inverse lemma is applied to the iterative relationship between inverse matrices, the recursive form of P(k) is obtained as follows: P(k)=P(k-1)-P(k-1)q(k)(I+s(k)P(k-1)q(k)) -1 s(k)P(k-1) The correlation matrix is ​​defined as: According to the iterative relationship of the covariance matrix, the weight estimation vector is obtained and The recursive relation is: After multiplying the covariance matrix and the inverse matrix, we can get The recursive update equation of is: Where e(k) is e(k)=y(k)-h T The instantaneous error term given by (k-1)x(k); In order to make the sign of the function known in the k-th recursion, assuming that the estimated value of the coefficient vector has no sign of changing significantly in one iteration, an approximate estimation method is used, that is, using and Replace and Estimation vector The iterative formula can be approximated as: And the recursive form of the covariance matrix P(k) changes to: P(k) = P(k-1)-P(k-1)Q(k)(I+S(k)P(k-1)Q(k)) -1 S(k)P(k-1) Among them, P(0) = (q0 + ρλ2)I, this initialization value also produces a regularization effect; the correlation matrix is ​​defined as:

2. The face recognition method based on improved recursive least squares method according to claim 1, characterized in that: The image preprocessing in step (1) is to perform denoising, grayscale correction, histogram equalization, and normalization on the face image; after dividing the image spectrum into high frequency and low frequency, the low frequency part is histogram equalized, and then the high frequency part is subjected to denoising, and then the image edge is sharpened to highlight the image details, and finally the modified low frequency and high frequency parts are inversely processed to obtain a normalized image.

3. The face recognition method based on improved recursive least squares method according to claim 1, characterized in that: The implementation process of step (2) is as follows: use SIFT to search images in all scale spaces, and use Gaussian differential functions to identify potential points that are robust to scale and rotation; at each candidate position, use a three-dimensional quadratic function to determine the position and scale; in the neighborhood around each key point, measure the local gradient of the image at the selected scale; use LBP to binarize the grayscale image, set a 3*3 square window, use the center pixel of the window as the threshold, compare the grayscale of the pixels in the adjacent 8 areas with the center pixel value, if it is greater than the center pixel value, record it as 1, if it is less than the center pixel value, record it as 0; The center point is represented by 8 bits of binary, 256 types of LBP are calculated, and the histogram is statistically generated.

4. The face recognition method based on improved recursive least squares method according to claim 1, characterized in that: The implementation process of step (4) is as follows: Classification recognition includes intra-class recognition and inter-class recognition. Intra-class recognition is to find the class that best matches the face to be recognized in the sample library; inter-class recognition is to determine whether the face to be recognized belongs to a class of faces that already exist in the sample library. Intra-class recognition requires judging whether the distance measurement between the face to be recognized and the known faces is less than a certain limit value; inter-class recognition requires finding the calculated distance between the face to be recognized and all the faces in the sample library, and the final result is determined by the minimum value. The representation error between each test sample and each class of samples in the training sample set is: r k,i (y)=||y k -x i h k,i ||2 Among them, r k,i (y) represents the representation error between the kth test sample and each type of sample in the training sample set, y k represents the kth test sample, x i represents the i-th type of training sample in the training sample set, h k,i It represents the sparse coefficient vector corresponding to the i-th type of training sample when each test sample is linearly sparsely represented by the training sample set. The smaller the error, the more similar the input test sample is to the training sample of this type.