A facial image reconstruction method, system and data dimension reduction method
Through the face image reconstruction method, the weight matrix and feature selection method are used to construct the optimal feature subset, which solves the problem of feature extraction under the influence of noise and improves the accuracy of face recognition and data dimensionality reduction.
Patent Information
- Application Number
- CN202111305367.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-05
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2041-11-05
AI Technical Summary
The performance of existing unsupervised feature selection methods decreases when dealing with noise and outliers, making it difficult to effectively extract features of face images, resulting in reduced recognition accuracy.
The face image reconstruction method is used to cut the original image data into sample vectors, initialize the reconstruction transformation matrix and eigenvalue regression coefficient matrix, calculate the weight matrix and update the coordinate base and coding matrix, combined with the data self-representation method or vertical basis aggregation. Class feature selection method, gradually builds the optimal feature subset, denoises and reconstructs face images.
The discriminative performance and robust performance of face image recognition are improved, especially in noisy environments, the recognition rate is significantly improved, and the accuracy of data dimensionality reduction is improved through the data dimensionality reduction method.
Smart Images

Figure CN114120397B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data and image processing, and in particular to a facial image reconstruction method, system and data dimension reduction method. Background Art
[0002] With the rapid development of biological science and information technology, the data dimension in fields such as data mining, machine learning, computer vision and bioinformatics has exploded. If these high-dimensional data are used directly, unimportant data features in the learning task will lead to increased computational complexity and a serious decline in the performance of the learning task, and will also interfere with the algorithm's extraction of the essential structure of the data. In fact, not all features of the data are related to the learning task or have an important impact on the learning task. Many features are often irrelevant, redundant, and some are even noise features. Therefore, how to perform targeted preprocessing of high-dimensional data has become an important research field.
[0003] The way to process high-dimensional data is usually to create a low-dimensional structure that can reflect the essential structure of the data. Under this idea, there are two different research directions, namely feature selection and feature extraction (subspace learning). Feature extraction is to map the original data to a low-dimensional space that can reflect the essential structural characteristics of the data. Feature extraction is not a simple and direct selection of the features of the original data to form a new feature subset, but is obtained by spatially transforming the data according to a certain strategy. Therefore, under a good transformation strategy, the feature extraction method can ensure the quality of dimensionality reduction while extracting the low-dimensional popular structure of the data, effectively eliminating the influence of noise and outliers.
[0004] Feature selection is the process of selecting relevant feature subsets from the original feature set. Feature selection is divided into supervised feature selection and unsupervised feature selection, depending on whether the label information of the data is used. Supervised feature selection uses the label information of the data to guide the direction of model optimization and selects a feature subset that can represent the data. Supervised feature selection usually first trains the model to optimize the parameters and then tests the model. Due to the introduction of data label information, the test results of supervised feature selection methods are generally better than those of unsupervised feature selection. However, in practical applications, it is costly to obtain data label information, so unsupervised feature selection methods have a wider range of applications.
[0005] Many unsupervised feature selection methods have been proposed to find the optimal feature subset. Laplacian Score (LS) measures the importance of features by calculating the local correlation between different features. Multi-Cluster Feature Selection (MCFS) uses spectral analysis theory to retain the multi-cluster structure of the data and consider the correlation between features to select the optimal feature subset. Both LS and MCFS consider the correlation between features when selecting feature subsets, so they can produce better results than traditional feature selection methods that ignore the correlation between features. Subsequently, feature selection algorithms focus on using the discriminant information (pseudo-labels) of the data set to guide the optimization of the feature selection process. Unsupervised Discriminative Feature Selection (UDFS) obtains local discriminant information of the data by restricting the feature weight matrix. Non-negative discriminative feature selection (NDFS) obtains pseudo labels, that is, the discriminant information of the data, by spectral clustering of the data, which is used to optimize feature selection. The simultaneous vertical basis clustering feature selection (Simultaneous Orthogonal basis Clustering Feature Selection, SOCFS) proposed by Han et al. integrates the two processes of vertical basis clustering and feature selection into one formula in the objective equation. The vertical basis clustering process and the feature selection process are carried out simultaneously, and the discriminant information of the data is obtained through the pseudo labels generated by vertical basis clustering, thereby improving the effect of feature selection.
[0006] The feature selection methods proposed above do not consider the case where the data contains a large amount of noise features. In the case of poor data quality, if feature selection is performed directly on the original data set, the noise features and outlier sample points may interfere with the feature selection algorithm in finding the most effective feature subset, resulting in poor algorithm performance.
[0007] Subsequently, the robust feature selection algorithm considers the impact of noise features on the data and enhances the robustness of the algorithm to noise. Robust Unsupervised Feature Selection (RUFS) proposed a local learning regularized robust non-negative matrix factorization method to generate cluster pseudo-labels, and used norm enhancement to enhance the robustness of the algorithm to outliers and noise. Robust Spectral learning for unsupervised Feature Selection (RSFS) proposed a feature selection algorithm that combines a robust graph embedding process (pseudo-labels) with a robust spectral regression process to enhance the robustness of the algorithm to noise and outliers. Recently, Yi et al. proposed Adaptive Weighted Sparse Principal Component Analysis (AW-SPCA), which combines feature selection and feature extraction, focusing on the reconstructed data obtained after the original data is transformed to enhance the performance of the algorithm on heavily polluted data.
[0008] Feature selection selects a subset of features on the original data, which can preserve data information more completely, reflect the nature of the data, and has good interpretability. However, if the original data is contaminated by noise, the accuracy of the feature selection algorithm will be greatly reduced. Summary of the invention
[0009] The purpose of the present invention is to provide a facial image reconstruction method, system and data dimensionality reduction method to improve the accuracy of facial image extraction and the accuracy of data dimensionality reduction.
[0010] To achieve the above object, the present invention provides a facial image reconstruction method, the method comprising:
[0011] Step S1: Cut the original image data into sample vectors X;
[0012] Step S2: Initialize the reconstruction transformation matrix W as the unit matrix, the transformation matrix Q as the unit matrix, the eigenvalue regression coefficient matrix A as the unit matrix, the coordinate basis B as the unit matrix, and the encoding matrix E as the unit matrix;
[0013] Step S3: Calculate the weight matrix P based on the sample vector X, the reconstruction transformation matrix W, the transformation matrix Q, the eigenvalue regression coefficient matrix A, the coordinate basis B and the encoding matrix E;
[0014] Step S4: Use the weight matrix P to update the coordinate basis B, the encoding matrix E, the new transformation matrix Q and the reconstructed transformation matrix W;
[0015] Step S5: Determine whether the termination condition is met; if the termination condition is met, execute "Step S6"; if the termination condition is not met, return to "Step S3";
[0016] Step S6: sort the eigenvectors in the updated reconstruction transformation matrix, and select the first d largest eigenvectors to construct the optimal feature subset W′; d is a positive integer greater than or equal to 1;
[0017] Step S7: Use the optimal feature subset W′ to perform image denoising and face reconstruction on the test sample image to obtain a face image.
[0018] Optionally, the termination condition includes:
[0019] The number of iterations reaches the set number;
[0020] Or the difference ΔJ of the target value J obtained from two adjacent iterations is less than the set threshold.
[0021] Optionally, the calculating of the weight matrix P based on the sample vector X, the reconstruction transformation matrix W, the transformation matrix Q, the eigenvalue regression coefficient matrix A, the coordinate basis B and the encoding matrix E specifically includes:
[0022] Step S31: Using the data self-representation method, the minimized reconstruction error matrix G is calculated based on the sample vector X, the reconstruction transformation matrix W, the transformation matrix Q and the eigenvalue regression coefficient matrix A; G = [g1, g2, ... g n ] T , g n represents the reconstruction error of the nth sample;
[0023] Or step S31: using a vertical basis clustering feature selection method, the minimized reconstruction error matrix G is calculated based on the sample vector X, the transformation matrix Q, the eigenvalue regression coefficient matrix A, the coordinate basis B and the encoding matrix E;
[0024] Step S32: According to Calculate the weight matrix P; where P = [p1, p2, ... p n ] T , p n represents the weight corresponding to the nth reconstruction error, (·) + represents max(·,0), c represents the number of activated samples, i=1,2,…n.
[0025] Optionally, the method of using the data self-representation method to calculate the minimized reconstruction error matrix G based on the sample vector X, the reconstruction transformation matrix W, the transformation matrix Q and the eigenvalue regression coefficient matrix A specifically includes:
[0026] Step S311: According to
[0027] Calculate the center vector matrix v; where, The operator represents the Kronecker product; 1 represents a column vector of all 1s, I represents the identity matrix, P represents the reconstruction error matrix, vec() represents vectorizing the matrix by column, v represents the center vector matrix, and X represents the sample vector;
[0028] Step S312: Decentralize the sample vector X based on the center vector matrix v to obtain a decentralized matrix M;
[0029] Step S313: Pass Compute the minimized reconstruction error matrix G.
[0030] Optionally, the vertical basis clustering feature selection method is used to calculate the minimized reconstruction error matrix G based on the sample vector X, the transformation matrix Q, the eigenvalue regression coefficient matrix A, the coordinate basis B and the encoding matrix E, specifically:
[0031] according to Compute the minimized reconstruction error matrix G.
[0032] The present invention also provides a facial image reconstruction system, the system comprising:
[0033] Image cutting module, used to cut the original image data into sample vector X;
[0034] Initialization module, used to initialize the reconstruction transformation matrix W to the unit matrix, the transformation matrix Q to the unit matrix, the eigenvalue regression coefficient matrix A to the unit matrix, the coordinate basis B to the unit matrix, and the encoding matrix E to the unit matrix;
[0035] A weight matrix P calculation module is used to calculate the weight matrix P based on the sample vector X, the reconstruction transformation matrix W, the transformation matrix Q, the eigenvalue regression coefficient matrix A, the coordinate basis B and the encoding matrix E;
[0036] An update module, used to update the coordinate basis B, the encoding matrix E, the new transformation matrix Q and the reconstructed transformation matrix W using the weight matrix P;
[0037] The judgment module is used to judge whether the termination condition is met; if the termination condition is met, the "feature vector selection module" is executed; if the termination condition is not met, the "weight matrix P calculation module" is returned;
[0038] The feature vector selection module is used to sort the feature vectors in the updated reconstruction transformation matrix, and select the first d largest feature vectors to construct the optimal feature subset W′; d is a positive integer greater than or equal to 1;
[0039] The face image reconstruction module is used to perform image denoising and face reconstruction on the test sample image using the optimal feature subset W′ to obtain a face image.
[0040] The present invention also provides a data dimension reduction method, the method comprising:
[0041] Step S1: Cut the original data into sample vectors X;
[0042] Step S2: Initialize the reconstruction transformation matrix W as the unit matrix, the transformation matrix Q as the unit matrix, the eigenvalue regression coefficient matrix A as the unit matrix, the coordinate basis B as the unit matrix, and the encoding matrix E as the unit matrix;
[0043] Step S3: Calculate the weight matrix P based on the sample vector X, the reconstruction transformation matrix W, the transformation matrix Q, the eigenvalue regression coefficient matrix A, the coordinate basis B and the encoding matrix E;
[0044] Step S4: Use the weight matrix P to update the coordinate basis B, the encoding matrix E, the new transformation matrix Q and the reconstructed transformation matrix W;
[0045] Step S5: Determine whether the termination condition is met; if the termination condition is met, execute "Step S6"; if the termination condition is not met, return to "Step S3";
[0046] Step S6: sort the eigenvectors in the updated reconstruction transformation matrix, and select the first d largest eigenvectors to construct the optimal feature subset W′;
[0047] Step S7: Use the optimal feature subset W′ to perform dimensionality reduction processing on the data to be reduced in dimension to obtain processed data; the data to be reduced in dimension is image data, video data, document data or website data.
[0048] Optionally, the calculating of the weight matrix P based on the sample vector X, the reconstruction transformation matrix W, the transformation matrix Q, the eigenvalue regression coefficient matrix A, the coordinate basis B and the encoding matrix E specifically includes:
[0049] Step S31: using a data self-representation method, the minimized reconstruction error matrix G is calculated based on the sample vector X, the reconstruction transformation matrix W, the transformation matrix Q and the eigenvalue regression coefficient matrix A;
[0050] Or step S31: using the vertical basis clustering feature selection method, based on the sample vector X, the transformation matrix Q, the eigenvalue regression coefficient matrix A, the coordinate basis B and the encoding matrix E, the reconstruction error matrix G to be minimized is calculated; G = [g1, g2, ... g n ] T , g n represents the reconstruction error of the nth sample;
[0051] Step S32: According to Calculate the weight matrix P; where P = [p1, p2, ... p n ] T , p n represents the weight corresponding to the nth reconstruction error, (·) + represents max(·,0), c represents the number of activated samples, i=1,2,…n.
[0052] Optionally, the method of using the data self-representation method to calculate the minimized reconstruction error matrix G based on the sample vector X, the reconstruction transformation matrix W, the transformation matrix Q and the eigenvalue regression coefficient matrix A specifically includes:
[0053] Step S311: According to
[0054] Calculate the center vector matrix v; where, The operator represents the Kronecker product; 1 represents a column vector of all 1s, I represents the identity matrix, P represents the reconstruction error matrix, vec() represents vectorizing the matrix by column, v represents the center vector matrix, and X represents the sample vector;
[0055] Step S312: Decentralize the sample vector X based on the center vector matrix v to obtain a decentralized matrix M;
[0056] Step S313: Pass Compute the minimized reconstruction error matrix G.
[0057] Optionally, the vertical basis clustering feature selection method is used to calculate the minimized reconstruction error matrix G based on the sample vector X, the transformation matrix Q, the eigenvalue regression coefficient matrix A, the coordinate basis B and the encoding matrix E, specifically:
[0058] according to Compute the minimized reconstruction error matrix G.
[0059] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:
[0060] The image reconstruction method disclosed in the present invention has better discrimination performance and robust performance, especially has a higher recognition rate in the recognition of noisy face images. In addition, the data dimensionality reduction method disclosed in the present invention can perform data dimensionality reduction on image data, video data, document data or website data, thereby improving the accuracy of data dimensionality reduction. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0062] Figure 1 This is a flow chart of the image reconstruction method of the present invention;
[0063] Figure 2 This is a structural diagram of the image reconstruction system of the present invention;
[0064] Figure 3 The cluster recognition accuracy and projection dimension change curve on the original handwritten data set BinaryAlphadigits;
[0065] Figure 4 This is the curve chart of COIL20 recognition accuracy and projection dimension change;
[0066] Figure 5 This is the effect of adding salt and pepper noise to ORL;
[0067] Figure 6 This is a curve of ORL recognition accuracy and projection dimension change with the addition of salt and pepper noise. DETAILED DESCRIPTION
[0068] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0069] The purpose of the present invention is to provide a facial image reconstruction method, system and data dimensionality reduction method to improve the accuracy of facial image extraction and the accuracy of data dimensionality reduction.
[0070] 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.
[0071] Example 1
[0072] like Figure 1 As shown, the present invention discloses a facial image reconstruction method, the method comprising:
[0073] Step S1: Cut the original image data into sample vectors X.
[0074] Step S2: Initialize the reconstruction transformation matrix W as the unit matrix, the transformation matrix Q as the unit matrix, the eigenvalue regression coefficient matrix A as the unit matrix, the coordinate basis B as the unit matrix, and the encoding matrix E as the unit matrix.
[0075] Step S3: Calculate the weight matrix P based on the sample vector X, the reconstruction transformation matrix W, the transformation matrix Q, the eigenvalue regression coefficient matrix A, the coordinate basis B and the encoding matrix E.
[0076] Step S4: Use the weight matrix P to update the coordinate basis B, the encoding matrix E, the new transformation matrix Q and the reconstructed transformation matrix W.
[0077] Step S5: Determine whether the termination condition is met; if the termination condition is met, execute "Step S6"; if the termination condition is not met, return to "Step S3".
[0078] Step S6: sort the eigenvectors in the updated reconstruction transformation matrix, and select the first d largest eigenvectors to construct the optimal feature subset W′; d is a positive integer greater than or equal to 1.
[0079] Step S7: Use the optimal feature subset W′ to perform image denoising and face reconstruction on the test sample image to obtain a face image.
[0080] The following is a detailed discussion of each step:
[0081] Step S2: Initialize the reconstruction transformation matrix W as the unit matrix, the transformation matrix Q that projects the original high-dimensional matrix into the low-dimensional space is the unit matrix, the eigenvalue regression coefficient matrix A is the unit matrix, the k mutually perpendicular and independent coordinate bases B with dimensions m in the clustering process are the unit matrix, and the encoding matrix E of each sample based on the encoding auxiliary matrix F is the unit matrix. W∈R m×m , Q∈R m×m , A∈R m×m , B∈R m×k , E∈R n×k .
[0082] Step S3: Calculate the weight matrix P based on the sample vector X, the reconstruction transformation matrix W, the transformation matrix Q, the eigenvalue regression coefficient matrix A, the coordinate basis B and the encoding matrix E, specifically including:
[0083] Step S31: using the data self-representation method, based on the sample vector X, the reconstruction transformation matrix W, the transformation matrix Q and the eigenvalue regression coefficient matrix A, the reconstruction error matrix G to be minimized is calculated, specifically including:
[0084] Step S311: According to
[0085] Calculate the center vector matrix v; where, The operator represents the Kronecker product; 1 represents a column vector of all ones, I represents the identity matrix, P represents the reconstruction error matrix, vec() represents vectorizing the matrix by column, v represents the center vector matrix, and X represents the sample vector.
[0086] Step S312: Decentralize the sample vector X based on the center vector matrix v to obtain a decentralized matrix M. The specific formula is: M = X-v1 T , where M represents the decentralized matrix, X represents the sample vector, and 1 represents a column vector of all 1s.
[0087] Step S313: Pass Calculate the minimized reconstruction error matrix G, G = [g1, g2, ... g n ] T , g n represents the reconstruction error of the nth sample.
[0088] Or step S31: using the vertical basis clustering feature selection method, based on the sample vector X, the transformation matrix Q, the eigenvalue regression coefficient matrix A, the coordinate basis B and the encoding matrix E, the reconstruction error matrix G that is minimized is calculated, specifically including:
[0089] according to Calculate the minimized reconstruction error matrix G, G = [g1, g2, ... g n ] T , g n represents the reconstruction error of the nth sample, B represents the k mutually independent coordinate bases with dimension m in the clustering process, E represents the encoding matrix of each sample based on the encoding auxiliary matrix F, Q represents the transformation matrix that projects the original high-dimensional matrix into the low-dimensional space, and A represents the eigenvalue regression coefficient matrix.
[0090] Step S32: According to Calculate the weight matrix P; where P = [p1, p2, ... p n ] T , p n represents the weight corresponding to the nth reconstruction error, (·) + represents max(·,0), c represents the number of activated samples, i=1,2,…n, c is usually 50% to 80% of the number of samples and must be rounded.
[0091] Step S4: using the weight matrix P to update the coordinate basis B, the encoding matrix E, the new transformation matrix Q and the reconstructed transformation matrix W, specifically including:
[0092] Step S41: T PM T QAT Perform singular value decomposition and obtain the left singular matrix V B and the right singular matrix U B ; Where P represents the weight matrix, E represents the encoding matrix of each sample based on the coordinate basis F, Q represents the transformation matrix that projects the original high-dimensional matrix into the low-dimensional space, A represents the eigenvalue regression coefficient matrix, and M represents the decentralized matrix.
[0093] Step S42: According to Update the coordinate base B; where I m,k Represents a matrix with m rows and k columns containing all 1s.
[0094] Step S43: For B T AQ T MP+γF T Perform singular value decomposition to obtain the left singular matrix U E and the right singular matrix V E , where γ represents the regularization parameter, which is a positive number greater than 0. .
[0095] Step S44: According to Update the encoding matrix E; where I n,k Represents a matrix with n rows and k columns filled with all 1s.
[0096] Step S45: According to Update the transformation matrix Q.
[0097] Among them, D represents the diagonal matrix, M represents the decentralized matrix, P represents the weight matrix, E represents the encoding matrix, V B represents the left singular matrix, U B represents the right singular matrix, B represents the coordinate basis, A represents the eigenvalue regression coefficient matrix, W represents the reconstruction transformation matrix, and λ represents the Lagrange multiplier, which is a positive number greater than 0. The diagonal elements in the diagonal matrix are D ii =1 / (2||Q i ||2+ζ), ||Q i ||2 represents the two-dimensional norm of the i-th eigenvector in the transformation matrix Q, ζ represents a very small constant, in order to prevent the denominator from being 0,
[0098] Step S46: Q T MM T Perform singular value decomposition to obtain the left singular matrix U W and the right singular matrix V W .
[0099] Step S47: According to Update the reconstruction transformation matrix W.
[0100] Step S6: sort the eigenvectors in the updated reconstruction transformation matrix, and select the first d largest eigenvectors to construct the optimal feature subset W′; d is a positive integer greater than or equal to 1.
[0101] Step S7: Use the optimal feature subset W′ to perform image denoising and face reconstruction on the test sample image to obtain a face image. The specific formula is:
[0102] Y=W′ T X; where Y represents a face image, which contains key feature information, and X represents a sample image to be tested.
[0103] Step S7 removes some irrelevant information, thus achieving the purpose of data dimensionality reduction and denoising.
[0104] The coordinate base B of the present invention must satisfy B T B=I orthogonal constraint; the encoding matrix E needs to satisfy E T The condition E=I,E≥0; in order to ensure the non-negativity of the encoding matrix E, an auxiliary variable matrix F is introduced so that E=F, as a constraint.
[0105] The present invention further comprises S8: using ACC and NMI to identify the face image after dimensionality reduction, and analyzing the quality of dimensionality reduction and denoising; wherein, using The clustering recognition accuracy of multiple reconstructed face images; where l i represents the i-th real face image, c i represents the face image obtained by reconstructing the i-th face, N represents the total number of real face images, map(·) represents the function that maps each cluster index to the optimal class label, δ(·) represents the δ function, and ACC represents the accuracy of cluster recognition.
[0106] For the face recognition process, the clustering results of the images were further compared using the k-means classifier, where the accuracy of cluster recognition l i represents the real number label of the ith instance (also known as the ith real face image), and c i is the corresponding cluster index (the face image obtained by reconstructing the i-th face). map(·) represents the function that maps each cluster index to the best class label. δ(·) represents the δ function, that is, when the two input parameters l i and c i If they are the same, the value is 1, otherwise it is 0. The larger the ACC value is, the higher the cluster recognition accuracy is. In addition, the standard mutual information entropy NMI is used as a control. Similarly, the larger the NMI is, the higher the cluster recognition rate is.
[0107] In addition, the standard mutual information entropy NMI is used as a control. For two different clustering results A and B, the standard mutual information is defined as follows:
[0108]
[0109] Where n is the number of samples, C is the confusion matrix, and the element C ij represents the number of samples that belong to both the i-th class of clustering result of class A and the j-th class of clustering result of class B, C A (C B ) represents the total number of clusters in the clustering result of A(B). The larger the NMI value, the more similar the clustering results A and B are.
[0110] Example 2
[0111] like Figure 2 As shown, the present invention also provides a face image reconstruction system, the system comprising:
[0112] The image cutting module 201 is used to cut the original image data into sample vectors X.
[0113] The initialization module 202 is used to initialize the reconstruction transformation matrix W to the unit matrix, the transformation matrix Q to the unit matrix, the eigenvalue regression coefficient matrix A to the unit matrix, the coordinate basis B to the unit matrix, and the encoding matrix E to the unit matrix.
[0114] The weight matrix P calculation module 203 is used to calculate the weight matrix P based on the sample vector X, the reconstruction transformation matrix W, the transformation matrix Q, the eigenvalue regression coefficient matrix A, the coordinate basis B and the encoding matrix E.
[0115] The updating module 204 is used to update the coordinate basis B, the encoding matrix E, the new transformation matrix Q and the reconstructed transformation matrix W using the weight matrix P.
[0116] The judgment module 205 is used to judge whether the termination condition is met; if the termination condition is met, the "feature vector selection module" is executed; if the termination condition is not met, the module returns to the "weight matrix P calculation module".
[0117] The feature vector selection module 206 is used to sort the feature vectors in the updated reconstruction transformation matrix, and select the first d largest feature vectors to construct the optimal feature subset W′; d is a positive integer greater than or equal to 1.
[0118] The face image reconstruction module 207 is used to perform image denoising and face reconstruction on the test sample image using the optimal feature subset W′ to obtain a face image.
[0119] The same contents as those in Example 1 are not repeated here.
[0120] Example 3
[0121] The present invention also discloses a data dimension reduction method, which comprises:
[0122] Step S1: Cut the original data into sample vectors X.
[0123] Step S2: Initialize the reconstruction transformation matrix W as the unit matrix, the transformation matrix Q as the unit matrix, the eigenvalue regression coefficient matrix A as the unit matrix, the coordinate basis B as the unit matrix, and the encoding matrix E as the unit matrix.
[0124] Step S3: Calculate the weight matrix P based on the sample vector X, the reconstruction transformation matrix W, the transformation matrix Q, the eigenvalue regression coefficient matrix A, the coordinate basis B and the encoding matrix E.
[0125] Step S4: Use the weight matrix P to update the coordinate basis B, the encoding matrix E, the new transformation matrix Q and the reconstructed transformation matrix W.
[0126] Step S5: Determine whether the termination condition is met; if the termination condition is met, execute "Step S6"; if the termination condition is not met, return to "Step S3".
[0127] Step S6: Sort the eigenvectors in the updated reconstruction transformation matrix, and select the first d largest eigenvectors to construct the optimal feature subset W′.
[0128] Step S7: Use the optimal feature subset W′ to perform dimensionality reduction processing on the data to be reduced in dimension to obtain processed data; the data to be reduced in dimension is image data, video data, document data or website data.
[0129] The following is a detailed discussion of each step:
[0130] Step S1: Cut the original data into sample vectors X, X∈R m×n , where m is the dimension of the sample, n is the number of samples, and the original data includes but is not limited to image data, video data, text data, and website data.
[0131] Step S2: Initialize the reconstruction transformation matrix W as the unit matrix, the transformation matrix Q that projects the original high-dimensional matrix into the low-dimensional space is the unit matrix, the eigenvalue regression coefficient matrix A is the unit matrix, the k mutually perpendicular and independent coordinate bases B with dimensions m in the clustering process are the unit matrix, and the encoding matrix E of each sample based on the encoding auxiliary matrix F is the unit matrix. W∈R m×m , Q∈R m×m , A∈R m×m , B∈R m×k , E∈R n×k .
[0132] Step S3: Calculate the weight matrix P based on the sample vector X, the reconstruction transformation matrix W, the transformation matrix Q, the eigenvalue regression coefficient matrix A, the coordinate basis B and the encoding matrix E, specifically including:
[0133] Step S31: using the data self-representation method, based on the sample vector X, the reconstruction transformation matrix W, the transformation matrix Q and the eigenvalue regression coefficient matrix A, the reconstruction error matrix G to be minimized is calculated, specifically including:
[0134] Step S311: According to
[0135] Calculate the center vector matrix v; where, The operator represents the Kronecker product; 1 represents a column vector of all ones, I represents the identity matrix, P represents the reconstruction error matrix, vec() represents vectorizing the matrix by column, v represents the center vector matrix, and X represents the sample vector.
[0136] Step S312: Decentralize the sample vector X based on the center vector matrix v to obtain a decentralized matrix M. The specific formula is: M = X-v1 T , where M represents the decentralized matrix, X represents the sample vector, and 1 represents a column vector of all 1s.
[0137] Step S313: Pass Calculate the minimized reconstruction error matrix G, G = [g1, g2, ... g n ] T , g n represents the reconstruction error of the nth sample.
[0138] Or step S31: using the vertical basis clustering feature selection method, based on the sample vector X, the transformation matrix Q, the eigenvalue regression coefficient matrix A, the coordinate basis B and the encoding matrix E, the reconstruction error matrix G that is minimized is calculated, specifically including:
[0139] according to Calculate the minimized reconstruction error matrix G, G = [g1, g2, ... g n ] T , g n represents the reconstruction error of the nth sample, B represents the k mutually independent coordinate bases with dimension m in the clustering process, E represents the encoding matrix of each sample based on the encoding auxiliary matrix F, Q represents the transformation matrix that projects the original high-dimensional matrix into the low-dimensional space, and A represents the eigenvalue regression coefficient matrix.
[0140] Step S32: According to Calculate the weight matrix P; where P = [p1, p2, ... p n] T , p n represents the weight corresponding to the nth reconstruction error, (·) + represents max(·,0), c represents the number of activated samples, i=1,2,…n.
[0141] Step S4: using the weight matrix P to update the coordinate basis B, the encoding matrix E, the new transformation matrix Q and the reconstructed transformation matrix W, specifically including:
[0142] Step S41: T PM T QA T Perform singular value decomposition and obtain the left singular matrix V B and the right singular matrix U B ; Where P represents the weight matrix, E represents the encoding matrix of each sample based on the coordinate basis F, Q represents the transformation matrix that projects the original high-dimensional matrix into the low-dimensional space, A represents the eigenvalue regression coefficient matrix, and M represents the decentralized matrix.
[0143] Step S42: According to Update coordinate basis B.
[0144] Step S43: For B T AQ T MP+γF T Perform singular value decomposition to obtain the left singular matrix U E and the right singular matrix V E .
[0145] Step S44: According to Update the encoding matrix E.
[0146] Step S45: According to Update the transformation matrix Q; where D represents the diagonal matrix, M represents the decentralized matrix, P represents the weight matrix, E represents the encoding matrix, and V B represents the left singular matrix, U B represents the right singular matrix, B represents the coordinate basis, A represents the eigenvalue regression coefficient matrix, W represents the reconstruction transformation matrix, and λ represents the Lagrange multiplier, which is a positive number greater than 0. The diagonal elements in the diagonal matrix are ||Q i ||2 represents the two-dimensional norm of the i-th eigenvector in the transformation matrix Q, ζ represents a very small constant, in order to prevent the denominator from being 0,
[0147] Step S46: Q T MM T Perform singular value decomposition to obtain the left singular matrix U W and the right singular matrix V W .
[0148] Step S47: According to Update the reconstruction transformation matrix W.
[0149] Step S5: Determine whether the termination condition is met; if the termination condition is met, execute "Step S6"; if the termination condition is not met, return to "Step S3". In this embodiment, the termination condition includes: the number of iterations reaches the set number; or the difference ΔJ of the target value J obtained by two adjacent iterations is less than the set threshold, that is, |ΔJ(Q,W,A,B,E,v,p)|<ε.
[0150] The present invention uses vertical clustering to obtain the discriminant information of the data to guide the direction of feature selection optimization; secondly, the feature extraction method is integrated into it to reduce the loss of effective information caused by a single discriminant criterion; finally, a data reconstruction item is added to project the data to improve the quality of the data set and enhance the robustness to noise. Compared with traditional feature selection methods such as LS, MCFS, RUFS and SCOFS, the unsupervised feature selection method based on spectral regularization principal component analysis has better discriminant performance and robust performance, and has a higher recognition rate in noisy face image recognition.
[0151] Example 4
[0152] The object dataset Coil20 is used as an example to illustrate the implementation scheme. The sample image is divided into multiple face images of 32×32 pixels, so that each sample image is cut into vectors That is, all pixels of a sample image are arranged in a row to form a sample vector, and the sample image corresponds to the sample vector one by one. The above sample vector is applied to the method disclosed in Example 1 to reconstruct the face image, and the specific steps are not repeated one by one.
[0153] In order to verify the effectiveness and correctness of the method disclosed in the present invention, its performance is compared with classic unsupervised feature selection algorithms such as UDFS, MCFS, LS and SOCFS.
[0154] Clustering effect on the original data set: from Figure 3 and Figure 4 It can be seen that the algorithm proposed in the present invention is relatively better than other feature selection algorithms under the ACC index for the Binary Alphadigits dataset and the COIL20 object dataset under different features, which verifies the effectiveness of the algorithm proposed in the present invention. Figure 3 and Figure 4It can be seen that the algorithm disclosed in the present invention is connected to the AW-SPCA, UDFS and MCFS algorithms by the same red line, indicating that there is no significant difference between the four algorithms, but the algorithm disclosed in the present invention is significantly better than SOCFS, LS and the baseline. Compared with SOCFS, the algorithm disclosed in the present invention introduces feature extraction and data reconstruction items, which enhances the algorithm's discriminability for data-related features and reduces the loss of useful features caused by a single discriminant criterion. For the robust feature selection algorithms AW-SPCA and UDFS, the performance on different data sets is relatively stable, while LS and MCFS fully consider the correlation between features, and their performance level is generally positively correlated with the number of feature selections.
[0155] Clustering effect on contaminated data sets: In order to further prove the processing ability of the algorithm disclosed in the present invention on contaminated data, the present invention conducted a clustering experiment on a contaminated data set. Figure 5 The face images after adding noise to the first three categories of face data in the ORL dataset are shown. Figure 6 This is the clustering effect diagram after adding salt and pepper noise to the ORL dataset.
[0156] from Figure 6 It can be found that the performance of all algorithms has declined to a certain extent. The results of the algorithm disclosed in the present invention in ORL are much better than those of other algorithms. This is because the algorithm disclosed in the present invention adds the RWL-AN framework and performs projection transformation on the data, which enhances the robustness of the algorithm.
[0157] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0158] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the method and core idea of the present invention. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A facial image reconstruction method, characterized in that: The method comprises: Step S1: Cut the original image data into sample vectors X; Step S2: Initialize the reconstruction transformation matrix W as the unit matrix, the transformation matrix Q as the unit matrix, the eigenvalue regression coefficient matrix A as the unit matrix, the coordinate basis B as the unit matrix, and the encoding matrix E as the unit matrix; Step S3: Calculate the weight matrix P based on the sample vector X, the reconstruction transformation matrix W, the transformation matrix Q, the eigenvalue regression coefficient matrix A, the coordinate basis B and the encoding matrix E; specifically including: Step S31: Using the data self-representation method, the minimized reconstruction error matrix G is calculated based on the sample vector X, the reconstruction transformation matrix W, the transformation matrix Q and the eigenvalue regression coefficient matrix A; G = [g1, g2, ... g n ] T , g n represents the reconstruction error of the nth sample; Or step S31: using a vertical basis clustering feature selection method, the minimized reconstruction error matrix G is calculated based on the sample vector X, the transformation matrix Q, the eigenvalue regression coefficient matrix A, the coordinate basis B and the encoding matrix E; Step S32: According to Calculate the weight matrix P; where P = [p1, p2, ... p n ] T , pn represents the weight corresponding to the nth reconstruction error, (·) + represents max(·,0), c represents the number of activated samples, i=1,2,…n; The minimized reconstruction error matrix G is calculated based on the sample vector X, the reconstruction transformation matrix W, the transformation matrix Q and the eigenvalue regression coefficient matrix A, specifically including: Step S311: According to Calculate the center vector matrix v; where, The operator represents the Kronecker product; 1 represents a column vector of all 1s, I represents the identity matrix, P represents the reconstruction error matrix, vec() represents vectorizing the matrix by column, v represents the center vector matrix, and X represents the sample vector; Step S312: Decentralize the sample vector X based on the center vector matrix v to obtain a decentralized matrix M; Step S313: Pass Calculate the minimized reconstruction error matrix G; Step S4: Use the weight matrix P to update the coordinate basis B, the encoding matrix E, the new transformation matrix Q and the reconstructed transformation matrix W; Step S5: Determine whether the termination condition is met; if the termination condition is met, execute "Step S6"; if the termination condition is not met, return to "Step S3"; Step S6: sort the eigenvectors in the updated reconstruction transformation matrix, and select the first d largest eigenvectors to construct the optimal feature subset W′; d is a positive integer greater than or equal to 1; Step S7: Use the optimal feature subset W′ to perform image denoising and face reconstruction on the test sample image to obtain a face image.
2. The facial image reconstruction method according to claim 1, characterized in that: The termination conditions include: The number of iterations reaches the set number; Or the difference ΔJ of the target value J obtained from two adjacent iterations is less than the set threshold.
3. The facial image reconstruction method according to claim 1, characterized in that: The vertical basis clustering feature selection method is used to calculate the minimized reconstruction error matrix G based on the sample vector X, the transformation matrix Q, the eigenvalue regression coefficient matrix A, the coordinate basis B and the encoding matrix E, specifically: according to Compute the minimized reconstruction error matrix G.
4. A facial image reconstruction system, characterized in that: The system comprises: Image cutting module, used to cut the original image data into sample vector X; Initialization module, used to initialize the reconstruction transformation matrix W to the unit matrix, the transformation matrix Q to the unit matrix, the eigenvalue regression coefficient matrix A to the unit matrix, the coordinate basis B to the unit matrix, and the encoding matrix E to the unit matrix; The weight matrix P calculation module is used to calculate the weight matrix P based on the sample vector X, the reconstruction transformation matrix W, the transformation matrix Q, the eigenvalue regression coefficient matrix A, the coordinate basis B and the encoding matrix E; specifically includes: The data self-representation method is used to calculate the minimized reconstruction error matrix G based on the sample vector X, the reconstruction transformation matrix W, the transformation matrix Q and the eigenvalue regression coefficient matrix A; G = [g1, g2, ... g n ] T , g n represents the reconstruction error of the nth sample; The vertical basis clustering feature selection method is used to calculate the minimized reconstruction error matrix G based on the sample vector X, the transformation matrix Q, the eigenvalue regression coefficient matrix A, the coordinate basis B and the encoding matrix E; according to Calculate the weight matrix P; where P = [p1, p2, ... p n ] T , p n represents the weight corresponding to the nth reconstruction error, (·) + represents max(·,0), c represents the number of activated samples, i=1,2,…n; The minimized reconstruction error matrix G is calculated based on the sample vector X, the reconstruction transformation matrix W, the transformation matrix Q and the eigenvalue regression coefficient matrix A, specifically including: according to Calculate the center vector matrix v; where, The operator represents the Kronecker product; 1 represents a column vector of all 1s, I represents the identity matrix, P represents the reconstruction error matrix, vec() represents vectorizing the matrix by column, v represents the center vector matrix, and X represents the sample vector; based on the center vector matrix v, the sample vector X is decentralized to obtain the decentralized matrix M; through Calculate the minimized reconstruction error matrix G; An update module, used to update the coordinate basis B, the encoding matrix E, the new transformation matrix Q and the reconstructed transformation matrix W using the weight matrix P; The judgment module is used to judge whether the termination condition is met; if the termination condition is met, the "feature vector selection module" is executed; if the termination condition is not met, the module returns to the "weight matrix P calculation module"; The feature vector selection module is used to sort the feature vectors in the updated reconstruction transformation matrix, and select the first d largest feature vectors to construct the optimal feature subset W′; d is a positive integer greater than or equal to 1; The face image reconstruction module is used to perform image denoising and face reconstruction on the test sample image using the optimal feature subset W′ to obtain a face image.
5. A data dimensionality reduction method, characterized in that: The method comprises: Step S1: Cut the original data into sample vectors X; Step S2: Initialize the reconstruction transformation matrix W as the unit matrix, the transformation matrix Q as the unit matrix, the eigenvalue regression coefficient matrix A as the unit matrix, the coordinate basis B as the unit matrix, and the encoding matrix E as the unit matrix; Step S3: Calculate the weight matrix P based on the sample vector X, the reconstruction transformation matrix W, the transformation matrix Q, the eigenvalue regression coefficient matrix A, the coordinate basis B and the encoding matrix E; specifically including: Step S31: using a data self-representation method, the minimized reconstruction error matrix G is calculated based on the sample vector X, the reconstruction transformation matrix W, the transformation matrix Q and the eigenvalue regression coefficient matrix A; Or step S31: using the vertical basis clustering feature selection method, based on the sample vector X, the transformation matrix Q, the eigenvalue regression coefficient matrix A, the coordinate basis B and the encoding matrix E, the reconstruction error matrix G to be minimized is calculated; G = [g1, g2, ... g n ] T , g n represents the reconstruction error of the nth sample; Step S32: According to Calculate the weight matrix P; where P = [p1, p2, ... p n ] T , pn represents the weight corresponding to the nth reconstruction error, (·) + represents max(·,0), c represents the number of activated samples, i=1,2,…n; The minimized reconstruction error matrix G is calculated based on the sample vector X, the reconstruction transformation matrix W, the transformation matrix Q and the eigenvalue regression coefficient matrix A, specifically including: Step S311: According to Calculate the center vector matrix v; where, The operator represents the Kronecker product; 1 represents a column vector of all 1s, I represents the identity matrix, P represents the reconstruction error matrix, vec() represents vectorizing the matrix by column, v represents the center vector matrix, and X represents the sample vector; Step S312: Decentralize the sample vector X based on the center vector matrix v to obtain a decentralized matrix M; Step S313: Pass Calculate the minimized reconstruction error matrix G; Step S4: Use the weight matrix P to update the coordinate basis B, the encoding matrix E, the new transformation matrix Q and the reconstructed transformation matrix W; Step S5: Determine whether the termination condition is met; if the termination condition is met, execute "Step S6"; if the termination condition is not met, return to "Step S3"; Step S6: sort the eigenvectors in the updated reconstruction transformation matrix, and select the first d largest eigenvectors to construct the optimal feature subset W′; Step S7: Use the optimal feature subset W′ to perform dimensionality reduction processing on the data to be reduced in dimension to obtain processed data; the data to be reduced in dimension is image data, video data, document data or website data.
6. The data dimension reduction method according to claim 5, characterized in that: The vertical basis clustering feature selection method is used to calculate the minimized reconstruction error matrix G based on the sample vector X, the transformation matrix Q, the eigenvalue regression coefficient matrix A, the coordinate basis B and the encoding matrix E, specifically: according to Compute the minimized reconstruction error matrix G.
