Face recognition method and device, equipment and medium

By extracting and fusing facial images with different resolutions, forming a face projection space, the problem that the existing technology is difficult to take into account high-resolution image texture information and low-resolution image contour information, and achieving more efficient face recognition.

CN119919972APending Publication Date: 2025-05-02CHINA TELECOM ARTIFICIAL INTELLIGENCE TECHNOLOGY (BEIJING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411865911.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-17
Publication Date
2025-05-02

AI Technical Summary

Technical Problem

Existing face recognition methods are difficult to take into account both the face texture information of high-resolution images and the face contour information of low-resolution images, resulting in poor face recognition effect.

Method used

By obtaining face image matrix with different resolutions, mapping it to high-dimensional space, L1 regularization and projection variance maximization processing are used to extract the projection space of high-resolution images, and KPCA algorithm is used to extract the projection space of low-resolution images. Finally, the two are featured to form a face projection space for face recognition.

Benefits of technology

This method takes into account the face texture information of high-resolution images and the face contour information of low-resolution images, enhances the noise resistance and feature extraction capabilities of face recognition, and improves the accuracy and robustness of face recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119919972A_ABST
    Figure CN119919972A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a face recognition method, device and equipment and a medium, and the method comprises the steps: obtaining a face image and face image matrixes corresponding to different resolutions, and mapping the face image matrixes to a high-dimensional space to obtain face image kernel matrixes of different resolutions, and further extracting projection spaces corresponding to the face image kernel matrixes with the different resolutions by adopting different feature extraction methods for the face image kernel matrixes with the different resolutions, further performing feature fusion on the projection spaces with the different resolutions to obtain a fused face projection space, and performing face recognition through the face projection space. According to the embodiment of the invention, the face recognition is carried out through the face projection space fusing the features of the face images with different resolutions, the face texture information of the high-resolution image and the face contour information of the low-resolution image are considered, the anti-noise capability and feature extraction capability of the face recognition are enhanced, and the accuracy and robustness of the face recognition are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of face recognition technology, and in particular to a face recognition method, a face recognition device, an electronic device and a computer-readable storage medium. Background Art

[0002] With the development of biometric recognition technology, face recognition has attracted widespread attention due to its advantages such as non-contact and natural friendliness. However, face recognition faces many challenges in practical applications, including illumination changes, expression differences, posture changes, and processing of images with different resolutions. These problems have led to a significant decrease in the recognition performance of traditional methods in complex environments, making it difficult to meet the needs of practical applications.

[0003] Traditional face recognition methods are based on PCA (Principal Component Analysis), which performs poorly when faced with lighting changes, expression differences, and images of different resolutions. In recent years, although some studies have proposed using kernel methods to enhance the model's ability to understand data distribution, these methods often lack effective processing mechanisms for noise and outliers, and it is difficult to balance the impact of facial texture information and contour information on face recognition results, resulting in limited performance in practical applications. Summary of the invention

[0004] The embodiments of the present invention provide a face recognition method, device, equipment and medium to solve or partially solve the problem that the existing face recognition methods cannot simultaneously take into account the face texture information of high-resolution images and the face contour information of low-resolution images, resulting in poor face recognition effect.

[0005] The embodiment of the present invention discloses a face recognition method, which includes:

[0006] Acquire a facial image and a first facial image matrix and a second facial image matrix corresponding to the facial image, wherein the first facial image matrix and the second facial image matrix correspond to different resolutions respectively;

[0007] Mapping the first face image matrix and the second face image matrix to a high-dimensional space according to a preset kernel function to obtain a first face image kernel matrix corresponding to the first face image matrix and a second face image kernel matrix corresponding to the second face image matrix;

[0008] Performing L1 regularization and projection variance maximization processing on the first face image kernel matrix to obtain a first optimal projection vector, performing feature extraction on the first face image kernel matrix according to the first optimal projection vector to obtain an initial projection space corresponding to the first face image kernel matrix, and performing weighted processing on the initial projection space to obtain a first projection space corresponding to the first face image kernel matrix;

[0009] Performing L2 regularization and projection variance maximization processing on the second face image kernel matrix to obtain a second optimal projection vector, and performing feature extraction on the second face image kernel matrix according to the second optimal projection vector to obtain a second projection space corresponding to the second face image kernel matrix;

[0010] Perform feature fusion on the first projection space and the second projection space to obtain a face projection space;

[0011] The face projection space is used to perform face recognition on the face image.

[0012] In some feasible implementations, acquiring a facial image and a first facial image matrix and a second facial image matrix corresponding to the facial image include:

[0013] Acquire the facial image;

[0014] Performing matrix conversion on the facial image to obtain a first facial image matrix corresponding to the facial image;

[0015] Performing discrete cosine transform on the facial image to obtain a second facial image matrix corresponding to the facial image.

[0016] In some feasible implementations, the acquiring the facial image includes:

[0017] Acquire multi-angle facial images from a preset database, or collect multi-angle facial images through an imaging device;

[0018] The face image is grayscale processed to obtain a grayscale face image.

[0019] In some feasible implementations, before performing L1 regularization and projection variance maximization processing on the first face image kernel matrix to obtain the first optimal projection vector, the method further includes:

[0020] Performing centralization processing on the first face image kernel matrix to obtain a first face image central kernel matrix;

[0021] The performing L1 regularization and projection variance maximization processing on the first face image kernel matrix to obtain a first optimal projection vector, and performing feature extraction on the first face image kernel matrix according to the first optimal projection vector to obtain an initial projection space corresponding to the first face image kernel matrix, including:

[0022] Perform L1 regularization and projection variance maximization processing on the first face image central kernel matrix to obtain a first optimal projection vector, and perform feature extraction on the first face image central kernel matrix according to the first optimal projection vector to obtain an initial projection space corresponding to the first face image kernel matrix.

[0023] In some feasible implementations, before performing L2 regularization and projection variance maximization processing on the second facial image kernel matrix to obtain the second optimal projection vector, the method further includes:

[0024] Performing centralization processing on the second face image kernel matrix to obtain a second face image central kernel matrix;

[0025] The performing L2 regularization and projection variance maximization processing on the second face image kernel matrix to obtain a second optimal projection vector, and performing feature extraction on the second face image kernel matrix according to the second optimal projection vector to obtain a second projection space corresponding to the second face image kernel matrix, including:

[0026] Perform L2 regularization and projection variance maximization processing on the central kernel matrix of the second facial image to obtain a second optimal projection vector, and perform feature extraction on the central kernel matrix of the second facial image according to the second optimal projection vector to obtain a second projection space corresponding to the second facial image kernel matrix.

[0027] In some feasible implementations, the step of fusing features of the first projection space and the second projection space to obtain a face projection space includes:

[0028] The first projection space and the second projection space are weightedly fused according to a preset weight parameter to obtain the face projection space, and the weight parameter is determined by a resolution ratio between the first face image matrix and the second face image matrix.

[0029] In some feasible implementations, the step of performing face recognition on the face image using the face projection space includes:

[0030] Acquire a face image to be identified and a first face image matrix and a second face image matrix corresponding to the face image to be identified;

[0031] Projecting the first face image matrix and the second face image matrix corresponding to the face image to be identified into the face projection space to obtain a test projection coefficient corresponding to the face image to be identified;

[0032] A preset classifier is used to perform similarity calculation based on the test projection coefficient corresponding to the face image to be recognized and the training projection coefficient corresponding to the face projection space to obtain a face recognition result of the face image to be recognized.

[0033] The embodiment of the present invention further discloses a face recognition device, the device comprising:

[0034] An image acquisition module, used to acquire a facial image and a first facial image matrix and a second facial image matrix corresponding to the facial image, wherein the first facial image matrix and the second facial image matrix correspond to different resolutions respectively;

[0035] a matrix mapping module, used to map the first face image matrix and the second face image matrix to a high-dimensional space according to a preset kernel function, to obtain a first face image kernel matrix corresponding to the first face image matrix and a second face image kernel matrix corresponding to the second face image matrix;

[0036] a first projection module, configured to perform L1 regularization and projection variance maximization processing on the first face image kernel matrix to obtain a first optimal projection vector, perform feature extraction on the first face image kernel matrix according to the first optimal projection vector to obtain an initial projection space corresponding to the first face image kernel matrix, and perform weighted processing on the initial projection space to obtain a first projection space corresponding to the first face image kernel matrix;

[0037] a second projection module, configured to perform L2 regularization and projection variance maximization processing on the second face image kernel matrix to obtain a second optimal projection vector, and perform feature extraction on the second face image kernel matrix according to the second optimal projection vector to obtain a second projection space corresponding to the second face image kernel matrix;

[0038] A feature fusion module, used for fusing features of the first projection space and the second projection space to obtain a face projection space;

[0039] A face recognition module is used to perform face recognition on the face image using the face projection space.

[0040] In some feasible implementations, the image acquisition module includes:

[0041] An image acquisition submodule, used to acquire the face image;

[0042] A matrix conversion submodule, used for performing matrix conversion on the face image to obtain a first face image matrix corresponding to the face image;

[0043] The data dimension reduction submodule is used to perform discrete cosine transform on the face image to obtain a second face image matrix corresponding to the face image.

[0044] In some feasible implementations, the image acquisition submodule further includes:

[0045] An acquisition unit, used to acquire multi-angle facial images from a preset database, or to collect multi-angle facial images through an imaging device;

[0046] The grayscale processing unit is used to perform grayscale processing on the face image to obtain a grayscale face image.

[0047] In some feasible implementations, the first projection module is specifically used to perform centralization processing on the first face image kernel matrix to obtain the first face image central kernel matrix; perform L1 regularization and projection variance maximization processing on the first face image central kernel matrix to obtain a first optimal projection vector, and perform feature extraction on the first face image central kernel matrix based on the first optimal projection vector to obtain an initial projection space corresponding to the first face image kernel matrix.

[0048] In some feasible implementations, the second projection module is specifically used to perform centralization processing on the second facial image kernel matrix to obtain the second facial image central kernel matrix; perform L2 regularization and projection variance maximization processing on the second facial image central kernel matrix to obtain a second optimal projection vector, and perform feature extraction on the second facial image central kernel matrix based on the second optimal projection vector to obtain a second projection space corresponding to the second facial image kernel matrix.

[0049] In some feasible implementations, the feature fusion module is specifically used to perform weighted fusion of the first projection space and the second projection space according to a preset weight parameter to obtain the face projection space, and the weight parameter is determined by the resolution ratio between the first face image matrix and the second face image matrix.

[0050] In some feasible implementations, the face recognition module includes:

[0051] The image acquisition submodule to be identified is used to acquire the face image to be identified and the first face image matrix and the second face image matrix corresponding to the face image to be identified;

[0052] A projection submodule, used to project the first face image matrix and the second face image matrix corresponding to the face image to be identified into the face projection space to obtain a test projection coefficient corresponding to the face image to be identified;

[0053] The result generation submodule is used to perform similarity calculation based on the test projection coefficient corresponding to the face image to be recognized and the training projection coefficient corresponding to the face projection space through a preset classifier to obtain the face recognition result of the face image to be recognized.

[0054] The embodiment of the present invention further discloses an electronic device, comprising: a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0055] The memory is used to store computer programs;

[0056] The processor is used to implement the method described in the embodiment of the present invention when executing the program stored in the memory.

[0057] The embodiment of the present invention further discloses a computer-readable storage medium having instructions stored thereon, which, when executed by one or more processors, enables the processors to execute the method described in the embodiment of the present invention.

[0058] The embodiments of the present invention include the following advantages:

[0059] The embodiment of the present invention obtains a face image and a face image matrix corresponding to different resolutions, maps the face image matrix to a high-dimensional space to obtain a face image kernel matrix of different resolutions, further uses different feature extraction methods for the face image kernel matrices of different resolutions to respectively extract the projection space corresponding to the face image kernel matrices of different resolutions, and then fuses the features of the projection spaces of different resolutions to obtain a fused face projection space, and performs face recognition through the face projection space. The embodiment of the present invention performs face recognition through a face projection space that fuses the features of face images of different resolutions, taking into account the face texture information of high-resolution images and the face contour information of low-resolution images, enhancing the anti-noise ability and feature extraction ability of face recognition, and improving the accuracy and robustness of face recognition, and is suitable for a variety of complex scenes. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Figure 1 is a flowchart of a face recognition method provided in an embodiment of the present invention;

[0061] Figure 2 is a schematic diagram of a face recognition process provided in an embodiment of the present invention;

[0062] Figure 3 is a structural block diagram of a face recognition device provided in an embodiment of the present invention;

[0063] Figure 4 is a block diagram of an electronic device provided in an embodiment of the present invention;

[0064] Figure 5 is a schematic diagram of a computer-readable storage medium provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0065] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0066] As an example, the traditional face recognition method is based on PCA (Principal Component Analysis), which performs poorly when faced with lighting changes, expression differences, and images of different resolutions. In recent years, although some studies have proposed the use of kernel methods to enhance the model's ability to understand data distribution, these methods often lack effective processing mechanisms for noise and outliers, and it is difficult to balance the impact of facial texture information and contour information on face recognition results, resulting in limited performance in practical applications.

[0067] In this regard, in the present invention, by obtaining a face image and a face image matrix corresponding to different resolutions, and mapping the face image matrix to a high-dimensional space to obtain a face image kernel matrix of different resolutions, different feature extraction methods are further used for the face image kernel matrices of different resolutions to respectively extract the projection space corresponding to the face image kernel matrices of different resolutions, and then the projection spaces of different resolutions are subjected to feature fusion to obtain a fused face projection space, and face recognition is performed through the face projection space. The embodiment of the present invention performs face recognition through a face projection space that fuses features of face images of different resolutions, taking into account the face texture information of high-resolution images and the face contour information of low-resolution images, thereby enhancing the anti-noise ability and feature extraction ability of face recognition, and improving the accuracy and robustness of face recognition, and is suitable for a variety of complex scenes.

[0068] Reference Figure 1 , shows a flow chart of the steps of a face recognition method provided in an embodiment of the present invention, which may specifically include the following steps:

[0069] Step 101: Acquire a facial image and a first facial image matrix and a second facial image matrix corresponding to the facial image, wherein the first facial image matrix and the second facial image matrix correspond to different resolutions respectively;

[0070] In the embodiment of the present invention, firstly, facial image data, as well as a first facial image matrix and a second facial image matrix corresponding to the facial image are obtained, wherein the first facial image matrix is ​​a high-resolution facial image matrix, and the high-resolution image contains more detailed information, and thus the high-resolution facial image matrix is ​​suitable for fine feature extraction, such as the texture and wrinkles of the face, and the second facial image matrix is ​​a low-resolution facial image matrix, and the low-resolution image usually has less pixel information, but the calculation speed is faster, and thus the low-resolution facial image matrix is ​​suitable for preliminary feature extraction, such as the contour and shape of the face. In practical applications, the quality of facial images may be affected by many factors, such as illumination, occlusion, resolution, etc. By using image matrices of different resolutions, these complex environments can be better adapted, and thus the embodiment of the present invention realizes multi-level facial feature extraction by obtaining facial image matrices of different resolutions, and can capture facial features more comprehensively, thereby improving the accuracy, robustness and adaptability of face recognition.

[0071] In some embodiments, obtaining a facial image and a first facial image matrix and a second facial image matrix corresponding to the facial image include: obtaining the facial image; performing a matrix transformation on the facial image to obtain a first facial image matrix corresponding to the facial image; performing a discrete cosine transform on the facial image to obtain a second facial image matrix corresponding to the facial image.

[0072] In an embodiment of the present invention, after acquiring a facial image, the facial image is a facial image corresponding to a high resolution. The facial image can be further matrix-converted to obtain a corresponding first facial image matrix, i.e., a high-resolution facial image matrix. At the same time, data dimensionality reduction can be performed on the facial image to obtain a second facial image matrix, i.e., a low-resolution facial image matrix. Specifically, a discrete cosine transform (DCT) can be performed on the facial image. By retaining low-frequency coefficients and removing high-frequency coefficients through discrete cosine transform, high-dimensional data can be reduced to a lower dimension, and a low-resolution facial image matrix can be further obtained, thereby reducing computational complexity and storage requirements. Moreover, by retaining low-frequency coefficients, the main features of the image can be retained while removing high-frequency noise.

[0073] As an example, x(m,n) is an input face image, and the face image is subjected to discrete cosine transform according to the following formula to obtain the DCT coefficient Y(k,l):

[0074]

[0075] where \(m = 0, 1, \ldots, M - 1\), \(k = 0, 1, \ldots, M - 1\), \(n = 0, 1, \ldots, N - 1\), \(l = 0, 1, \ldots, N - 1\), \(m\) and \(n\) are the spatial domain indices of the input face image, \(k\) and \(l\) are the frequency domain indices of the DCT coefficients, and \(c(k)\), \(c(l)\) are normalization coefficients;

[0076] Furthermore, when the frequency domain variation factors \(k, l\) are relatively large, the value of the DCT coefficient \(Y(k, l)\) is very small, while in the upper left corner region where the main features of the image are concentrated, the value of the DCT coefficient \(Y(k, l)\) is relatively large. The low-frequency coefficients near the upper left corner can be retained, and the high-frequency coefficients near the lower right corner can be discarded. For example, only the upper left \(K \times L\) coefficients (\(K < M\), \(L < N\)) are retained, and the remaining coefficients are discarded;

[0077] Finally, the inverse two-dimensional discrete cosine transform (Inverse Discrete Cosine Transform, IDCT) is performed on the retained DCT coefficients according to the following formula to obtain the low-resolution face image matrix \(x'(m, n)\):

[0078]

[0079] where \(m = 0, 1, \ldots, M - 1\), \(k = 0, 1, \ldots, M - 1\), \(n = 0, 1, \ldots, N - 1\), \(l = 0, 1, \ldots, N - 1\), \(m\) and \(n\) are the spatial domain indices of the reconstructed face image, and \(k\) and \(l\) are the frequency domain indices of the retained DCT coefficients.

[0080] In some embodiments, the obtaining of the face image includes: obtaining face images at multiple angles from a preset database, or collecting face images at multiple angles through an image device; performing grayscale processing on the face images to obtain grayscale face images.

[0081] In the embodiments of the present invention, face images at multiple angles can be obtained from a preset database, or face images at multiple angles can be collected in real time through an image device (such as a camera). The face images at multiple angles can capture the features of the face in different poses, providing more comprehensive face features. Further, the obtained face images are converted into grayscale images, which can reduce the influence of color noise and can better reflect the contour information of the face image, optimizing the expression ability of the features.

[0082] Step 102: Map the first face image matrix and the second face image matrix to a high-dimensional space according to a preset kernel function to obtain a first face image kernel matrix corresponding to the first face image matrix and a second face image kernel matrix corresponding to the second face image matrix;

[0083] In an embodiment of the present invention, a first face image matrix and a second face image matrix of different resolutions are mapped to a high-dimensional space through a kernel function to obtain a first face image kernel matrix and a second face image kernel matrix of high-dimensional representation. It can be understood that, through kernel function mapping, a low-dimensional face image matrix is ​​converted into a high-dimensional face image kernel matrix. In the high-dimensional space, the features of the face image are more fully expressed, which is conducive to improving the performance of subsequent feature extraction and classification. The embodiment of the present invention obtains face image features in a high-dimensional space through kernel function mapping, which can more comprehensively capture the texture information and contour information of the face, thereby improving the accuracy of feature extraction and recognition performance.

[0084] Optionally, the preset kernel function may be a commonly used kernel function, such as a linear kernel function: K ij =x i ·x j , d-order polynomial kernel function: K ij =[(x i ·x j )+1] d , Gaussian kernel function: Multilayer Perceptron Kernel Function: K ij =tanh[v(x i ·x j )+c], etc., the present invention does not impose any specific limitation on this.

[0085] Step 103: performing L1 regularization and projection variance maximization processing on the first face image kernel matrix to obtain a first optimal projection vector, performing feature extraction on the first face image kernel matrix according to the first optimal projection vector to obtain an initial projection space corresponding to the first face image kernel matrix, and performing weighted processing on the initial projection space to obtain a first projection space corresponding to the first face image kernel matrix;

[0086] In the embodiment of the present invention, the L1-WKPCA (L1-Weighted Kernel Principal Component Analysis) algorithm is obtained by improving the KPCA (Kernel Principal Component Analysis) algorithm. Component Analysis, L1 weighted kernel principal component analysis) algorithm, and then extract features from the kernel matrix of the first face image through the L1-WKPCA algorithm to obtain the projection space. The improvement of the L1-WKPCA algorithm compared with the KPCA algorithm is as follows: the traditional KPCA algorithm is based on the L2 norm, but the L2 norm is very sensitive to outliers and is easily affected by noise. Therefore, the L1-WKPCA algorithm is changed to use the L1 norm. The L1 norm is more robust to outliers and can reduce the impact of outliers on recognition results. The use of the L1 norm also promotes the sparsity of the model solution, enhances the noise resistance and generalization performance. Further compared with the KPCA algorithm, the L1-WKPCA algorithm also introduces a weighting matrix for weighted processing of the projection space. The weighting matrix is ​​used to further optimize the expression ability of the features, enhance the weights of some important features, and weaken the weights of unimportant features, thereby obtaining a better projection space. The L1-WKPCA algorithm can more effectively extract the features of facial images and improve recognition accuracy by optimizing the L1 norm and weighted matrix.

[0087] Specifically, after obtaining the first face image kernel matrix corresponding to the first face image matrix through the kernel function, the first face image kernel matrix is ​​processed by L1 regularization and projection variance maximization to obtain an optimal projection vector, and then based on the first optimal projection vector, the first face image kernel matrix is ​​subjected to feature extraction to obtain an initial projection space, and finally the initial projection space is subjected to weighted processing to further optimize the feature expression capability to obtain a better first projection space. The embodiment of the present invention extracts features from the high-resolution face image matrix according to the L1-WKPCA algorithm to obtain a projection space, which can effectively capture the texture information of the face in the high-resolution face image, reduce the influence of noise and outliers, automatically select the features that contribute most to face recognition in the high-resolution face image, and optimize the expression of features, thereby providing high-quality input for subsequent face recognition tasks.

[0088] Furthermore, the specific implementation process also involves centralizing the first face image kernel matrix to obtain the first face image central kernel matrix, and further performing feature extraction based on the first face image central kernel matrix after the centralization to obtain the corresponding projection space.

[0089] As an example, input a high-resolution face image matrix By mapping the kernel function φ to the high-dimensional space, the high-resolution face image kernel matrix is ​​obtained:

[0090] Where d>>m;

[0091] Secondly, ψ is centralized according to the following formula to obtain

[0092]

[0093] Among them, 1 n is an n-dimensional column vector whose elements are all 1.

[0094] Then, the L1-W KPCA algorithm extracts features according to the objective function and obtains the initial projection space:

[0095]

[0096] Since the vector ν can be obtained from Linear span, so it can be expressed as:

[0097]

[0098] where α=(α1,α2,…,α n );

[0099] Define the kernel matrix as:

[0100]

[0101] The kernel function is chosen as the Gaussian kernel function:

[0102]

[0103] Will and Substitution Get the first optimal projection vector α * :

[0104]

[0105] Since the unnormalized kernel matrix is ​​K = ψ T ψ, then

[0106]

[0107] By solving α * , get the initial projection space Finally, the weighted matrix T(θ) is introduced for weighted processing to obtain the weighted projection space

[0108]

[0109] Among them, θ∈[0,1],

[0110] Step 104: performing L2 regularization and projection variance maximization processing on the second face image kernel matrix to obtain a second optimal projection vector, and performing feature extraction on the second face image kernel matrix according to the second optimal projection vector to obtain a second projection space corresponding to the second face image kernel matrix;

[0111] In an embodiment of the present invention, a process is provided for extracting features from a second facial image matrix, i.e., a low-resolution facial image matrix, using a KPCA algorithm to obtain a second projection space corresponding to the features of the second facial image. Specifically, after obtaining a second facial image kernel matrix corresponding to the second facial image matrix through a kernel function, the first facial image kernel matrix is ​​processed by L2 regularization and projection variance maximization to obtain an optimal projection vector, and then based on the second optimal projection vector, feature extraction is performed on the second facial image kernel matrix to obtain a second projection space corresponding to the second facial image matrix. The embodiment of the present invention uses a KPCA algorithm for low-resolution facial images to quickly extract facial contour information from low-resolution facial images, and uses different algorithms for images of different resolutions, which can better adapt to different data distributions and optimize overall computing efficiency.

[0112] The specific implementation process also involves centralizing the second face image kernel matrix to obtain the second face image central kernel matrix, and further performing feature extraction based on the central kernel matrix of the second face image after the centralization to obtain the corresponding projection space.

[0113] As an example, input a low-resolution face image matrix By mapping the kernel function φ to the high-dimensional space, the low-resolution face image kernel matrix is ​​obtained:

[0114]

[0115] Where d>>m;

[0116] Secondly, ψ′ is centralized to obtain

[0117]

[0118] Among them, 1 n is an n-dimensional column vector whose elements are all 1.

[0119] Then, the KPCA algorithm extracts features according to the objective function and obtains the second projection space:

[0120]

[0121] Since the vector ν can be obtained from Linear span, so it can be expressed as:

[0122]

[0123] where α=(α1,α2,…,α n ).

[0124] Define the kernel matrix as:

[0125]

[0126] The kernel function is chosen as the Gaussian kernel function:

[0127]

[0128] Will and Substitution Get the second optimal projection vector α * :

[0129]

[0130] Since the unnormalized kernel matrix is but

[0131]

[0132] By solving α * , and obtain the second projection space W′=(α1,α2,…,α n ).

[0133] Step 105: Fusing the first projection space and the second projection space to obtain a face projection space;

[0134] In an embodiment of the present invention, after obtaining the first projection space corresponding to the first face image matrix, i.e., the high-resolution face image matrix, and the second projection space corresponding to the second face image matrix, i.e., the low-resolution face image matrix, the first projection space and the second projection space are feature fused to form a face projection space that combines the features of the high-resolution face image and the features of the low-resolution face image. The face projection space is used to extract features from subsequent face recognition images. In an embodiment of the present invention, by fusing projection spaces of different resolutions, the expressive power of features is further optimized, so that the face projection space can better reflect the essential features of the face, and subsequent face recognition tasks provide higher quality input.

[0135] Furthermore, in the process of feature fusion, in order to perform weighted fusion on the first projection space and the second projection space using preset weight parameters so as to comprehensively utilize high-resolution and low-resolution features to form a more comprehensive feature representation, the weight parameters can be determined by the actual sizes of the high-resolution image and the low-resolution image.

[0136] Specifically, the first projection space and the second projection space Perform feature fusion according to the following formula to obtain the face projection space

[0137]

[0138] Among them, δ is the weight parameter, The mean size of high-resolution face images, is the mean size of low-resolution face images.

[0139] Optionally, the weight parameter may be determined according to a resolution ratio between the high-resolution image and the low-resolution image, and the weight parameter may be dynamically adjusted according to the resolution ratio.

[0140] Step 106: Perform face recognition on the face image using the face projection space.

[0141] In an embodiment of the present invention, the face projection space integrates high-resolution and low-resolution features, can simultaneously capture the texture information and contour information of the face, and extracts features of the face image through the face projection space, thereby effectively improving the accuracy and robustness of face recognition and adapting to complex scenes.

[0142] In the specific implementation process, the specific steps of face recognition of face images through face projection space are as follows: first, obtain the face image to be recognized and the corresponding high-resolution face image matrix and low-resolution face image matrix, directly project the high-resolution face image matrix and the low-resolution face image matrix into the face projection space, obtain the projection coefficient of the face image to be recognized in the face projection space, the projection coefficient is the feature representation of the face image to be recognized in the face projection space, further use the classifier to calculate the similarity of the training projection coefficient in the face projection space and the projection coefficient of the face image to be recognized in the face projection space according to the Euclidean formula, select the nearest training sample as the nearest neighbor of the face image to be recognized, and determine the category of the face image to be recognized according to the category of the nearest neighbor, and generate the face recognition result of the face image to be recognized. Optionally, the classifier is a K-Nearest Neighbors (KNN) classifier.

[0143] Reference Figure 2, shows a schematic diagram of a face recognition process provided by an embodiment of the present invention. In the face recognition process, the following steps are specifically included:

[0144] S1. Obtain multi-angle face images, convert the multi-angle face images into grayscale images, and divide the face images into a training set and a test set according to a fixed ratio;

[0145] S2, performing matrix transformation on the face training images in the training set to obtain a high-resolution face training image matrix;

[0146] S3, performing discrete cosine transform on the face training image in the training set to obtain a low-resolution face training image matrix;

[0147] S4, processing the high-resolution face training image matrix according to the L1-WKPCA algorithm to obtain a first projection space of the high-resolution face training image matrix;

[0148] S5. Processing the low-resolution face training image matrix according to the KPCA algorithm to obtain a second projection space of the low-resolution face training image matrix;

[0149] S6, performing feature fusion of the first projection space and the second projection space to obtain a face projection space and a training projection coefficient of a face training image;

[0150] S7, obtaining a face test image in a test set, and performing matrix transformation on the face test image to obtain a high-resolution face test image matrix;

[0151] S8, performing discrete cosine transform on the face test image to obtain a low-resolution face test image matrix;

[0152] S9, mapping the high-resolution face test image matrix and the low-resolution face test image matrix to the face projection space to obtain the test projection coefficients of the face test image;

[0153] S10. Calculate the similarity between the training projection coefficient and the test projection coefficient according to the Euclidean distance formula through the KNN nearest neighbor classifier, select the K training samples with the closest distance, and vote according to the categories of the K nearest neighbors to determine the category of the face test image, and obtain the face recognition result of the face test image.

[0154] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the following examples are used for exemplary description:

[0155] Example 1

[0156] The embodiment of the present invention uses the public data set ORL face database to verify the effectiveness and stability of the face recognition method based on discrete cosine transform, KPCA algorithm improvement and feature fusion proposed by the present invention. The ORL face database has a total of 40 folders, each folder has 10 images, each folder represents a different person, and all images are grayscale images stored in BMP (Bitmap) format, with an image size of 92 in width and 112 in height. The images of the same person are collected under different times, lighting, facial expressions and facial details, such as smiling or not smiling, wearing glasses or not, opening eyes or not, etc. All images are taken under a darker background, and the plane and depth rotation can reach up to 20°. The scale of the face also changes by up to 10%. It is the most widely used standard face image.

[0157] In the experiment, the first 5 images or the first 6 images of each person were selected from the ORL face database for comparison experiments, and the number of principal components of about 10%, 20%, and 30% of the kernel space dimension was selected as a comparison experiment. The recognition rate of the face recognition method of the present invention was compared with that of the face recognition method based on the KPCA algorithm and the face recognition method based on the PCA (Principal Component Analysis) algorithm of the SVM (Support Vector Machine) to test whether the face recognition method proposed by the present invention has better recognition effect than the traditional face recognition algorithm under various conditions. In the face recognition method proposed by the present invention and the face recognition method based on the KPCA algorithm, Gaussian kernel function and K nearest neighbor algorithm classifier are used. Table 1 below is the test results of the ORL face database:

[0158] Table 1 ORL face database test results

[0159]

[0160] In the present invention, the L2 norm in KPCA is changed to the L1 norm, the face image is transformed by discrete cosine to output a low-resolution face image, and the features corresponding to face images of different resolutions are fused, all of which make the face recognition method proposed in the present invention have better robustness and better reduce the influence of external interference factors on the face recognition results.

[0161] Furthermore, Gaussian noise is added to the ORL face database to artificially add interference factors to it, so as to experimentally test the recognition performance of the face recognition method proposed in the present invention. The following Table 2 shows the test results of the noisy ORL face database:

[0162] Table 2 Test results of the noisy ORL face database

[0163]

[0164] According to the test results in Table 1 and Table 2, it can be seen that no matter under which conditions, the recognition rate of the face recognition method proposed in the present invention is better than that of the other two methods. The face recognition method based on the KPCA algorithm is more sensitive to interference information, and the recognition rate is easily affected by noise; while the face recognition method based on the SVM PCA algorithm is more sensitive to the proportion of the training set. When the training set is small, it will lead to insufficient training of the SVM, thereby affecting the face recognition rate. In comparison, the improved method proposed in the present invention has better stability in both aspects and is not easily affected by the reduction of the proportion of the training set, image noise, etc.

[0165] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

[0166] It should be noted that the embodiments of the present invention include but are not limited to the above examples. It is understandable that those skilled in the art can also make settings according to actual needs under the guidance of the ideas of the embodiments of the present invention, and the present invention is not limited to this.

[0167] Reference Figure 3 , shows a structural block diagram of a face recognition device provided in an embodiment of the present invention, the device comprising:

[0168] An image acquisition module 301 is used to acquire a face image and a first face image matrix and a second face image matrix corresponding to the face image, wherein the first face image matrix and the second face image matrix correspond to different resolutions respectively;

[0169] A matrix mapping module 302, configured to map the first face image matrix and the second face image matrix to a high-dimensional space according to a preset kernel function, to obtain a first face image kernel matrix corresponding to the first face image matrix and a second face image kernel matrix corresponding to the second face image matrix;

[0170] A first projection module 303 is used to perform L1 regularization and projection variance maximization processing on the first face image kernel matrix to obtain a first optimal projection vector, perform feature extraction on the first face image kernel matrix according to the first optimal projection vector to obtain an initial projection space corresponding to the first face image kernel matrix, and perform weighted processing on the initial projection space to obtain a first projection space corresponding to the first face image kernel matrix;

[0171] A first projection module 303 is used to perform L2 regularization and projection variance maximization processing on the second face image kernel matrix to obtain a second optimal projection vector, and perform feature extraction on the second face image kernel matrix according to the second optimal projection vector to obtain a second projection space corresponding to the second face image kernel matrix;

[0172] A feature fusion module 305, configured to perform feature fusion on the first projection space and the second projection space to obtain a face projection space;

[0173] The face recognition module 306 is used to perform face recognition on the face image using the face projection space.

[0174] In some feasible implementations, the image acquisition module 301 includes:

[0175] An image acquisition submodule, used to acquire the face image;

[0176] A matrix conversion submodule, used to perform matrix conversion on the face image to obtain a first face image matrix corresponding to the face image;

[0177] The data dimension reduction submodule is used to perform discrete cosine transform on the face image to obtain a second face image matrix corresponding to the face image.

[0178] In some feasible implementations, the image acquisition submodule includes:

[0179] An acquisition unit, used to acquire multi-angle facial images from a preset database, or to collect multi-angle facial images through an imaging device;

[0180] The grayscale processing unit is used to perform grayscale processing on the face image to obtain a grayscale face image.

[0181] In some feasible implementations, the first projection module 303 is specifically used to perform centralization processing on the first face image kernel matrix to obtain the first face image central kernel matrix; perform L1 regularization and projection variance maximization processing on the first face image central kernel matrix to obtain a first optimal projection vector, and perform feature extraction on the first face image central kernel matrix based on the first optimal projection vector to obtain an initial projection space corresponding to the first face image kernel matrix.

[0182] In some feasible implementations, the first projection module 303 is specifically used to perform centralization processing on the second facial image kernel matrix to obtain the second facial image central kernel matrix; perform L2 regularization and projection variance maximization processing on the second facial image central kernel matrix to obtain a second optimal projection vector, and perform feature extraction on the second facial image central kernel matrix based on the second optimal projection vector to obtain a second projection space corresponding to the second facial image kernel matrix.

[0183] In some feasible implementations, the feature fusion module 305 is specifically used to perform weighted fusion of the first projection space and the second projection space according to a preset weight parameter to obtain the face projection space, and the weight parameter is determined by the resolution ratio between the first face image matrix and the second face image matrix.

[0184] In some feasible implementations, the face recognition module 306 includes:

[0185] The image acquisition submodule to be identified is used to acquire the face image to be identified and the first face image matrix and the second face image matrix corresponding to the face image to be identified;

[0186] A projection submodule, used to project the first face image matrix and the second face image matrix corresponding to the face image to be identified into the face projection space to obtain a test projection coefficient corresponding to the face image to be identified;

[0187] The result generation submodule is used to perform similarity calculation based on the test projection coefficient corresponding to the face image to be recognized and the training projection coefficient corresponding to the face projection space through a preset classifier to obtain the face recognition result of the face image to be recognized.

[0188] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the device embodiment.

[0189] In addition, an embodiment of the present invention further provides an electronic device, such as Figure 4As shown, it includes a processor 401, a communication interface 402, a memory 403 and a communication bus 404, wherein the processor 401, the communication interface 402, and the memory 403 communicate with each other through the communication bus 404.

[0190] Memory 403, used for storing computer programs;

[0191] The processor 401 is used to execute the program stored in the memory 403 to implement the various processes of the above method embodiment and achieve the same technical effect. To avoid repetition, it will not be described here.

[0192] The communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0193] The communication interface is used for communication between the above terminal and other devices.

[0194] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0195] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0196] like Figure 5As shown, in another embodiment provided by the present invention, a computer-readable storage medium 501 is also provided, in which instructions are stored. When executed by one or more processors, the processors execute the various processes of the above-mentioned method embodiment and can achieve the same technical effect. To avoid repetition, they are not repeated here.

[0197] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0198] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0199] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation modes, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection of the present invention.

[0200] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the embodiments of the present invention can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0201] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0202] In the embodiments provided by the present invention, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0203] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0204] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0205] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, ROM, RAM, magnetic disks, or optical disks.

[0206] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A face recognition method, characterized in that: The method comprises: Acquire a facial image and a first facial image matrix and a second facial image matrix corresponding to the facial image, wherein the first facial image matrix and the second facial image matrix correspond to different resolutions respectively; Mapping the first face image matrix and the second face image matrix to a high-dimensional space according to a preset kernel function to obtain a first face image kernel matrix corresponding to the first face image matrix and a second face image kernel matrix corresponding to the second face image matrix; Performing L1 regularization and projection variance maximization processing on the first face image kernel matrix to obtain a first optimal projection vector, performing feature extraction on the first face image kernel matrix according to the first optimal projection vector to obtain an initial projection space corresponding to the first face image kernel matrix, and performing weighted processing on the initial projection space to obtain a first projection space corresponding to the first face image kernel matrix; Performing L2 regularization and projection variance maximization processing on the second face image kernel matrix to obtain a second optimal projection vector, and performing feature extraction on the second face image kernel matrix according to the second optimal projection vector to obtain a second projection space corresponding to the second face image kernel matrix; Perform feature fusion on the first projection space and the second projection space to obtain a face projection space; The face projection space is used to perform face recognition on the face image.

2. The method according to claim 1, characterized in that: The step of acquiring a facial image and a first facial image matrix and a second facial image matrix corresponding to the facial image comprises: Acquire the facial image; Performing matrix conversion on the facial image to obtain a first facial image matrix corresponding to the facial image; Performing discrete cosine transform on the facial image to obtain a second facial image matrix corresponding to the facial image.

3. The method according to claim 2, characterized in that: The acquiring of the face image comprises: Acquire multi-angle facial images from a preset database, or collect multi-angle facial images through an imaging device; The face image is grayscale processed to obtain a grayscale face image.

4. The method according to claim 1, characterized in that: Before performing L1 regularization and projection variance maximization processing on the first face image kernel matrix to obtain the first optimal projection vector, the method further includes: Performing centralization processing on the first face image kernel matrix to obtain a first face image central kernel matrix; The performing L1 regularization and projection variance maximization processing on the first face image kernel matrix to obtain a first optimal projection vector, and performing feature extraction on the first face image kernel matrix according to the first optimal projection vector to obtain an initial projection space corresponding to the first face image kernel matrix, including: Perform L1 regularization and projection variance maximization processing on the first face image central kernel matrix to obtain a first optimal projection vector, and perform feature extraction on the first face image central kernel matrix according to the first optimal projection vector to obtain an initial projection space corresponding to the first face image kernel matrix.

5. The method according to claim 1, characterized in that: Before performing L2 regularization and projection variance maximization processing on the second face image kernel matrix to obtain the second optimal projection vector, the method further includes: Performing centralization processing on the second face image kernel matrix to obtain a second face image central kernel matrix; The performing L2 regularization and projection variance maximization processing on the second face image kernel matrix to obtain a second optimal projection vector, and performing feature extraction on the second face image kernel matrix according to the second optimal projection vector to obtain a second projection space corresponding to the second face image kernel matrix, including: Perform L2 regularization and projection variance maximization processing on the central kernel matrix of the second facial image to obtain a second optimal projection vector, and perform feature extraction on the central kernel matrix of the second facial image according to the second optimal projection vector to obtain a second projection space corresponding to the second facial image kernel matrix.

6. The method according to claim 1, characterized in that: The step of fusing features of the first projection space and the second projection space to obtain a face projection space includes: The first projection space and the second projection space are weightedly fused according to a preset weight parameter to obtain the face projection space, and the weight parameter is determined by a resolution ratio between the first face image matrix and the second face image matrix.

7. The method according to claim 1, characterized in that: The step of performing face recognition on the face image using the face projection space comprises: Acquire a face image to be identified and a first face image matrix and a second face image matrix corresponding to the face image to be identified; Projecting the first face image matrix and the second face image matrix corresponding to the face image to be identified into the face projection space to obtain a test projection coefficient corresponding to the face image to be identified; A preset classifier is used to perform similarity calculation based on the test projection coefficient corresponding to the face image to be recognized and the training projection coefficient corresponding to the face projection space to obtain a face recognition result of the face image to be recognized.

8. A face recognition device, characterized in that: The device comprises: An image acquisition module, used to acquire a facial image and a first facial image matrix and a second facial image matrix corresponding to the facial image, wherein the first facial image matrix and the second facial image matrix correspond to different resolutions respectively; a matrix mapping module, used to map the first face image matrix and the second face image matrix to a high-dimensional space according to a preset kernel function, to obtain a first face image kernel matrix corresponding to the first face image matrix and a second face image kernel matrix corresponding to the second face image matrix; a first projection module, configured to perform L1 regularization and projection variance maximization processing on the first face image kernel matrix to obtain a first optimal projection vector, perform feature extraction on the first face image kernel matrix according to the first optimal projection vector to obtain an initial projection space corresponding to the first face image kernel matrix, and perform weighted processing on the initial projection space to obtain a first projection space corresponding to the first face image kernel matrix; a second projection module, configured to perform L2 regularization and projection variance maximization processing on the second face image kernel matrix to obtain a second optimal projection vector, and perform feature extraction on the second face image kernel matrix according to the second optimal projection vector to obtain a second projection space corresponding to the second face image kernel matrix; A feature fusion module, used for fusing features of the first projection space and the second projection space to obtain a face projection space; A face recognition module is used to perform face recognition on the face image using the face projection space.

9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; The memory is used to store computer programs; The processor is used to implement the method according to any one of claims 1 to 7 when executing the program stored in the memory.

10. A computer-readable storage medium having instructions stored thereon, which, when executed by one or more processors, cause the processors to perform the method according to any one of claims 1 to 7.