Face feature extraction method based on image data
By using tensor principal component analysis (TPCA) algorithm and multi-task optimization ratio model in facial feature extraction, the problem that traditional methods cannot capture high-level semantic information is solved, and the high-robust features are extracted, which improves the model. Performance in complex scenarios.
Patent Information
- Application Number
- CN202411093985.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-09
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2044-08-09
AI Technical Summary
Traditional facial feature extraction methods based on image data cannot capture the high-level semantic information of facial images, resulting in limited discrimination and expression ability of features, especially in complex scenarios (such as severe occlusion or poor lighting conditions) that cannot be extracted accurately. facial features.
The feature extraction is performed using the tensor principal component analysis (TPCA) algorithm, and the ratio model is optimized dynamically in the process of feature selection and weighting through multi-task optimization ratio model, optimize the projection distance with the area projection model, and reconstruct the error multi-task optimization.
Features with high robustness and strong robustness to lighting, expressions, postures and occlusion are extracted, which improves the discriminant and expressive ability of the features and enhances the model's performance ability in complex scenarios.
Smart Images

Figure CN119007265B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of facial feature extraction, and in particular to a facial feature extraction method based on image data. Background Art
[0002] Facial feature extraction is to extract representative and distinctive information from facial images. It is usually used in applications such as face recognition, expression analysis, and posture estimation in the field of computer vision and pattern recognition. Facial features can be divided into two categories: local features and global features. Local features include point features, edge features, and texture features, which respectively describe the key information of local areas in facial images. Global features include shape features and color features, which are used to describe the overall face shape and color information. There are many methods for facial feature extraction, including but not limited to principal component analysis, independent component analysis, non-negative matrix decomposition, and deep learning methods.
[0003] For example, a Chinese patent discloses a facial feature extraction method based on clustered IoT, CN116682167B, in which the extraction of feature values is completed by different IoT devices respectively; the server generates a full facial feature file corresponding to the IoT device, and the full facial feature file contains the identification information of the facial photos corresponding to the IoT device, the link of the part of the facial photos in the file storage service, and the existing feature values of the part of the facial photos; the IoT device pulls the facial photos that lack feature values from the file storage service based on the full facial feature file; after the IoT device completes the extraction of feature values, it sends the identification information of the facial photos and the corresponding feature values to the server. The present invention avoids the problem of repeated extraction of the same photo, reduces the number of photos to be extracted by each IoT device, significantly shortens the extraction time, and also reduces the consumption of network traffic, reduces the cost of compilation, operation and maintenance, and the requirements for resources.
[0004] Although the above scheme has the above advantages, the traditional facial feature extraction method based on image data only relies on simple feature representation methods, such as Haar features and HOG features. Such features cannot capture the high-level semantic information of facial images, resulting in limited feature discriminability and expression capabilities. At the same time, they often perform poorly when dealing with face recognition problems in complex scenes. For example, under conditions of severe occlusion or poor lighting conditions, accurate facial features cannot be extracted. Therefore, a facial feature extraction method based on image data is urgently needed to solve such problems. Summary of the invention
[0005] In view of the shortcomings of the prior art, the present invention provides a facial feature extraction method based on image data to solve the problem that the prior art cannot capture high-level semantic information of facial images, resulting in limited feature discriminability and expression capabilities, and often performs poorly when dealing with face recognition problems in complex scenes. For example, under conditions of severe occlusion or poor lighting conditions, accurate facial features cannot be extracted.
[0006] To achieve the above objectives, the present invention is implemented through the following technical solutions:
[0007] The present invention provides a method for extracting facial features based on image data, comprising:
[0008] Step 1. Collect a dataset of facial images with different lighting, expressions, postures, and occlusion conditions, and preprocess the data, including cropping, resizing, graying, and standardization.
[0009] Step 2. Use Tensor Principal Component Analysis (TPCA) as a feature extraction model and perform feature extraction. The feature extraction step includes: using the TPCA algorithm to extract facial features from the preprocessed image data. In the feature extraction process, the effects of lighting, expression, posture and occlusion factors on the features are added;
[0010] Step 3. Use a multi-task optimization ratio model to dynamically adjust the selection and weight of features during feature selection and weighting, use an area projection model to optimize the projection distance, and perform multi-task optimization of the reconstruction error;
[0011] Step 4. Based on the feature representation of the tensor principal component analysis (TPCA) algorithm, weighted average, feature-level fusion, and decision-level fusion are selected to perform feature extraction and feature representation under different lighting, expressions, postures, and occlusions;
[0012] Step 5. Use the block PCA algorithm for feature representation learning, train the model on a large-scale dataset, and add the influence of lighting, expression, posture and occlusion factors.
[0013] The present invention is further configured to: collect data based on Internet data, and collect a dataset of face images containing different lighting, expressions, postures and occlusion conditions;
[0014] The acquired face image is cropped, the face part is extracted from the original image, the Haar cascade detector and the detector based on deep learning are used for face detection and cropping, and the size of the cropped face image is adjusted to a uniform size;
[0015] The color image is then converted to a grayscale image, and standardized with respect to lighting, expression, posture, and occlusion factors, including histogram equalization, posture correction, and expression smoothing;
[0016] The present invention is further configured as follows: the feature extraction step is specifically:
[0017] The preprocessed image data is constructed into a tensor form, each face image is regarded as a two-dimensional grayscale image matrix, and the two-dimensional grayscale image matrices are stacked to form a three-dimensional tensor;
[0018] The tensor principal component analysis (TPCA) algorithm is used to extract features from the constructed tensor data;
[0019] Introducing regularization terms into the TPCA algorithm, while adjusting the construction method and input parameters of tensor data to include the influence of lighting, expression, posture and occlusion factors;
[0020] For each face image, the TPCA algorithm extracts feature vectors to represent the position of the image in the feature space;
[0021] The present invention is further configured as follows: the regularization term is introduced in the following manner:
[0022] Here, the regularization term weight is dynamically adjusted according to the illumination, expression, posture, and occlusion characteristics of the data. The adjustment method is argminw(tr(W T XX T W)-tr(W T XH T Y)+λ·Reg(W)), where w is the parameter vector, X is the tensor data, W is the projection matrix, H is the tensor data mixing matrix, Y is the label matrix, λ is the regularization parameter, Reg(W) is the regularization term, and tr(W T XX T W) represents the error of reconstructing the tensor data X after projecting it into the low-dimensional space defined by the projection matrix W, tr(W T XH T Y) represents the distance between the projection of the tensor data X and the projection of the label data Y after projecting it into the low-dimensional space defined by the projection matrix W, and Reg(W) represents the regularization term of the projection matrix W;
[0023] The regularization term is calculated as: Here m is the number of features, n is the feature dimension, i represents the sample row index, j and k represent the feature column index and channel index;
[0024] The present invention is further configured as follows: the tensor data construction mode adjustment method is:
[0025] When constructing tensor data, different convolution kernels are introduced for feature extraction and weighted according to the importance of the features. The tensor data is constructed as follows: Among them, Xijk is the element of the i-th row, j-th column, and k-th channel of the tensor data, I i,j is the pixel value of row i and column j of the original image, f l is the feature extraction function of the lth convolution kernel, α l is the corresponding weight, L is the number of convolution kernels;
[0026] According to the lighting, expression, posture and occlusion characteristics of the data, the variance threshold and the number of features are dynamically adjusted to control the number and quality of feature extraction: argminw(tr(W T XX T W)-tr(W T XH T Y)+λ·Reg(W));
[0027] The present invention is further configured to: use a multi-task learning and multi-objective optimization method framework to maximize feature discrimination and minimize feature selection errors;
[0028] Setting hyperparameters in the model dynamically adjusts the selection and weight of features, and the parameters are adjusted according to the characteristics of the task and data;
[0029] Use back-propagation algorithm to automatically update feature selection and weights during training;
[0030] The area projection model is used to optimize the projection distance. Specifically:
[0031] Define the loss function of the area projection model, including the optimization objective of the projection distance and the multi-task optimization objective of the reconstruction error;
[0032] In the area projection model, the reconstruction error is considered as another optimization objective and is associated with the optimization objective of the projection distance;
[0033] Use the training data to train a multi-task optimization ratio model;
[0034] The present invention is further configured as follows: in step 3, the multi-task optimization ratio model dynamically adjusts the selection and weight of features, and uses an area projection model to optimize the projection distance, specifically:
[0035] The loss function is defined as: L = λ1·D iste +λ2·R econ , where λ1 and λ2 are weight parameters used to balance the optimization objectives, D iste represents the optimization target of the projection distance, R econ represents the optimization objective of the reconstruction error;
[0036] The training process uses the gradient descent method to optimize the defined loss function;
[0037] At the same time, the model parameters are updated in each iteration to minimize the loss function;
[0038] The present invention is further configured as follows: the feature representation learning method comprises:
[0039] Given a data set containing m samples X = {x1, x2, ...x m}, where each sample x i It is a high-dimensional vector representing the characteristics of a face image;
[0040] The dataset X is divided into n blocks, each block contains k samples, represented as X = {X1, X2, ...X n}, where X i represents the i-th block;
[0041] For each block X i , calculate the mean vector
[0042] Calculate the centralized data matrix
[0043] For each centralized block Calculate the covariance matrix Σ i : The covariance matrix Σ i Perform eigenvalue decomposition and obtain the eigenvalue λ i and the corresponding eigenvector v i ;
[0044] Select the first r largest eigenvalues and corresponding eigenvectors to form a new feature space
[0045] The feature space V of each block i Perform horizontal connection to obtain the feature space matrix of the entire data set
[0046] The present invention is further configured as follows: the multi-task optimization and block reorganization preprocessing method comprises:
[0047] Use weighted mean square error with multi-task regularization and block reorganization preprocessing method to divide large-scale datasets into smaller blocks for parallel processing;
[0048] That is, the data is divided into p smaller blocks, each block contains q samples, and then each block is independently input into the block-based PCA algorithm for feature representation learning;
[0049] The present invention is further configured as follows: the multi-task optimization objective function is: Among them, X i is the data matrix of the ith block, W i is the projection matrix of the ith block, Z i is the low-dimensional representation of the i-th block, λ is the regularization parameter, and ||·||F represents the norm of the matrix.
[0050] Compared with the prior art, the present invention has the following beneficial effects:
[0051] The present invention extracts features with high robustness and strong robustness to illumination, expression, posture and occlusion from face image data. First, Internet data is used to collect face image data sets containing various complex situations. After preprocessing steps such as cropping, resizing, graying and standardization, data quality and consistency are ensured. Then, a tensor principal component analysis (TPCA) algorithm is used to extract features, wherein a regularization term is introduced to dynamically adjust the construction method and input parameters of tensor data, and the influence of illumination, expression, posture and occlusion factors is considered. Then, a multi-task optimization ratio model is used to dynamically adjust the selection and weight of features in the feature selection and weighting process. At the same time, an area projection model is used to optimize the projection distance, and multi-task optimization of reconstruction errors is performed to improve the effect and performance of feature extraction. In terms of feature representation, a fusion strategy is used to comprehensively consider the features extracted under different illumination, expression, posture and occlusion. An improved block PCA algorithm is used to perform feature representation learning to obtain a more efficient feature representation method. Finally, a multi-task optimization and block reorganization preprocessing technology are used to further improve the robustness and generalization ability of the features.
[0052] The present application is significantly different from the above-mentioned scheme. The present application adopts the tensor principal component analysis TPCA algorithm for feature extraction. Compared with the method of multiple SVM training that directly uses the output of the SVM classifier as a feature, the TPCA algorithm can more comprehensively capture the feature information in the face image, including lighting, expression, posture and occlusion factors. The extracted features are richer and more robust. At the same time, the TPCA algorithm can reduce the dimension of high-dimensional tensor data and retain the most representative information in the data. The extracted features have stronger representation capabilities, while the feature representation capabilities of multiple SVM training are relatively weak.
[0053] In addition, the TPCA algorithm can process high-dimensional data more efficiently, and can perform parallel calculations during the feature extraction process to improve the efficiency of the algorithm. At the same time, this application adjusts the construction method and input parameters of tensor data in the feature extraction stage, introduces regularization terms, and has better generalization capabilities, which is more suitable for face recognition tasks in different scenarios and conditions.
[0054] The present invention adopts a multi-task optimization and dynamic adjustment of feature selection weights to better adapt to face image data in complex scenes such as different lighting, expressions, postures and occlusions, improves the robustness and generalization ability of the model, introduces tensor principal component analysis TPCA and an improved block PCA algorithm to more effectively extract and represent high-level semantic information in face images, improves the discriminability and expression ability of features, effectively handles face recognition problems in complex scenes by introducing regularization terms and area projection models, improves tolerance to factors such as occlusion and lighting, and makes the model perform better in complex scenes, and finally dynamically adjusts feature selection and weights according to different scenes and data through multi-task optimization and block reorganization preprocessing technology, thereby improving the adaptability and generalization ability of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 This is a flow chart of the facial feature extraction method based on image data of the present invention. DETAILED DESCRIPTION
[0056] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings 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 should fall within the scope of protection of the present invention.
[0057] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0058] The present invention is further described in detail below in conjunction with the accompanying drawings:
[0059] Example
[0060] See also Figure 1 The present invention provides a method for extracting facial features based on image data, comprising:
[0061] Step 1. Collect a dataset of facial images with different lighting, expressions, postures, and occlusion conditions, and preprocess the data, including cropping, resizing, graying, and standardization.
[0062] Collect data based on Internet data, and collect face image datasets with different lighting, expressions, postures, and occlusion conditions;
[0063] The acquired face image is cropped, the face part is extracted from the original image, the Haar cascade detector and the detector based on deep learning are used for face detection and cropping, and the size of the cropped face image is adjusted to a uniform size;
[0064] Then the color image is converted into a grayscale image, and standardized processing is performed for lighting, expression, posture and occlusion factors, including histogram equalization, posture correction, and expression smoothing, so that the final extracted facial features have a certain degree of stability and robustness;
[0065] Step 2. Use tensor principal component analysis (TPCA) as a feature extraction model and perform feature extraction. Tensor principal component analysis (TPCA) can process high-dimensional tensor data and has a robust feature extraction effect. The feature extraction step includes: using the TPCA algorithm to extract facial features from preprocessed image data. In the feature extraction process, the effects of lighting, expression, posture and occlusion factors on the features are added;
[0066] The feature extraction steps are as follows:
[0067] The preprocessed image data is constructed into a tensor form, each face image is regarded as a two-dimensional grayscale image matrix, and the two-dimensional grayscale image matrices are stacked to form a three-dimensional tensor;
[0068] The tensor principal component analysis (TPCA) algorithm is used to extract features from the constructed tensor data;
[0069] Introducing regularization terms into the TPCA algorithm, while adjusting the construction method and input parameters of tensor data to include the influence of lighting, expression, posture and occlusion factors;
[0070] For each face image, the TPCA algorithm extracts feature vectors to represent the position of the image in the feature space;
[0071] The specific method of introducing the regularization term is:
[0072] Here, the regularization term weight is dynamically adjusted according to the illumination, expression, posture, and occlusion characteristics of the data. The adjustment method is argminw(tr(W T XX T W)-tr(W T XH TY)+λ·Reg(W)), where w is the parameter vector, X is the tensor data, W is the projection matrix, H is the tensor data mixing matrix, Y is the label matrix, λ is the regularization parameter, Reg(W) is the regularization term, and tr(W T XX T W) represents the error of reconstructing the tensor data X after projecting it into the low-dimensional space defined by the projection matrix W, tr(W T XH T Y) represents the distance between the projection of the tensor data X and the projection of the label data Y after projecting it into the low-dimensional space defined by the projection matrix W, and Reg(W) represents the regularization term of the projection matrix W;
[0073] The regularization term is calculated as: Here m is the number of features, n is the feature dimension, i represents the sample row index, j and k represent the feature column index and channel index;
[0074] The adjustment method for tensor data construction is:
[0075] When constructing tensor data, different convolution kernels are introduced for feature extraction and weighted according to the importance of the features. The tensor data is constructed as follows: Among them, X ijk is the element of the i-th row, j-th column, and k-th channel of the tensor data, I i,j is the pixel value of row i and column j of the original image, f l is the feature extraction function of the lth convolution kernel, α l is the corresponding weight, L is the number of convolution kernels;
[0076] According to the lighting, expression, posture and occlusion characteristics of the data, the variance threshold and the number of features are dynamically adjusted to control the number and quality of feature extraction: argminw(tr(W T XX T W)-tr(W T XH T Y)+λ·Reg(W));
[0077] Step 3. Use a multi-task optimization ratio model to dynamically adjust the selection and weight of features during feature selection and weighting, use an area projection model to optimize the projection distance, and perform multi-task optimization of the reconstruction error to improve the effect and performance of feature extraction;
[0078] Multi-task learning and multi-objective optimization method frameworks are used to maximize feature discrimination and minimize feature selection errors;
[0079] Setting hyperparameters in the model dynamically adjusts the selection and weight of features, and the parameters are adjusted according to the characteristics of the task and data;
[0080] Use back-propagation algorithm to automatically update feature selection and weights during training;
[0081] The area projection model is used to optimize the projection distance. Specifically:
[0082] Define the loss function of the area projection model, including the optimization target of the projection distance and the multi-task optimization target of the reconstruction error, so as to optimize the projection distance and improve the effect of feature extraction;
[0083] In the area projection model, the reconstruction error is considered as another optimization objective and is associated with the optimization objective of the projection distance;
[0084] Use the training data to train a multi-task optimization ratio model;
[0085] In step 3, the multi-task optimization ratio model dynamically adjusts the selection and weight of features, and uses the area projection model to optimize the projection distance. Specifically:
[0086] The loss function is defined as: L = λ1·D iste +λ2·R econ , where λ1 and λ2 are weight parameters used to balance the optimization objectives, D iste represents the optimization target of the projection distance, R econ represents the optimization objective of the reconstruction error;
[0087] The training process uses the gradient descent method to optimize the defined loss function;
[0088] At the same time, the model parameters are updated in each iteration to minimize the loss function;
[0089] Step 4. Based on the feature representation of the tensor principal component analysis (TPCA) algorithm, weighted average, feature-level fusion, and decision-level fusion are selected to perform feature extraction and feature representation under different lighting, expressions, postures, and occlusions;
[0090] Step 5. Use the block PCA algorithm for feature representation learning and train the model on a large-scale data set to obtain a more efficient feature representation method. At the same time, the influence of lighting, expression, posture and occlusion factors are added in coordination, and multi-task optimization and block reorganization preprocessing technology are used to further improve the robustness and generalization ability of the features;
[0091] Feature representation learning methods include:
[0092] Given a data set containing m samples X = {x1, x2, ...x m}, where each sample x iIt is a high-dimensional vector representing the characteristics of a face image;
[0093] The dataset X is divided into n blocks, each block contains k samples, represented as X = {X1, X2, ...X n}, where X i represents the i-th block;
[0094] For each block X i , calculate the mean vector
[0095] Calculate the centralized data matrix
[0096] For each centralized block Calculate the covariance matrix Σ i : The covariance matrix Σ i Perform eigenvalue decomposition and obtain the eigenvalue λ i and the corresponding eigenvector v i ;
[0097] Select the first r largest eigenvalues and corresponding eigenvectors to form a new feature space
[0098] The feature space V of each block i Perform horizontal connection to obtain the feature space matrix of the entire data set
[0099] Multi-task optimization and block reorganization preprocessing methods include:
[0100] Use weighted mean square error with multi-task regularization and block reorganization preprocessing method to divide large-scale datasets into smaller blocks for parallel processing;
[0101] That is, the data is divided into p smaller blocks, each block contains q samples, and then each block is independently input into the block-based PCA algorithm for feature representation learning;
[0102] The multi-task optimization objective function is: Among them, X i is the data matrix of the ith block, W i is the projection matrix of the ith block, Z i is the low-dimensional representation of the i-th block, λ is the regularization parameter, and ||·||F represents the norm of the matrix.
[0103] The present invention extracts features with high robustness and strong robustness to illumination, expression, posture and occlusion from face image data. First, Internet data is used to collect face image data sets containing various complex situations. After preprocessing steps such as cropping, resizing, graying and standardization, data quality and consistency are ensured. Then, a tensor principal component analysis (TPCA) algorithm is used to extract features, wherein a regularization term is introduced to dynamically adjust the construction method and input parameters of tensor data, and the influence of illumination, expression, posture and occlusion factors is considered. Then, a multi-task optimization ratio model is used to dynamically adjust the selection and weight of features in the feature selection and weighting process. At the same time, an area projection model is used to optimize the projection distance, and multi-task optimization of reconstruction errors is performed to improve the effect and performance of feature extraction. In terms of feature representation, a fusion strategy is used to comprehensively consider the features extracted under different illumination, expression, posture and occlusion. An improved block PCA algorithm is used to perform feature representation learning to obtain a more efficient feature representation method. Finally, a multi-task optimization and block reorganization preprocessing technology are used to further improve the robustness and generalization ability of the features.
[0104] The present application is significantly different from the above-mentioned scheme. The present application adopts the tensor principal component analysis TPCA algorithm for feature extraction. Compared with the method of multiple SVM training that directly uses the output of the SVM classifier as a feature, the TPCA algorithm can more comprehensively capture the feature information in the face image, including lighting, expression, posture and occlusion factors. The extracted features are richer and more robust. At the same time, the TPCA algorithm can reduce the dimension of high-dimensional tensor data and retain the most representative information in the data. The extracted features have stronger representation capabilities, while the feature representation capabilities of multiple SVM training are relatively weak.
[0105] In addition, the TPCA algorithm can process high-dimensional data more efficiently, and can perform parallel calculations during the feature extraction process to improve the efficiency of the algorithm. At the same time, this application adjusts the construction method and input parameters of tensor data in the feature extraction stage, introduces regularization terms, and has better generalization capabilities, which is more suitable for face recognition tasks in different scenarios and conditions.
[0106] The present invention adopts a multi-task optimization and dynamic adjustment of feature selection weights to better adapt to face image data in complex scenes such as different lighting, expressions, postures and occlusions, improves the robustness and generalization ability of the model, introduces tensor principal component analysis TPCA and an improved block PCA algorithm to more effectively extract and represent high-level semantic information in face images, improves the discriminability and expression ability of features, effectively handles face recognition problems in complex scenes by introducing regularization terms and area projection models, improves tolerance to factors such as occlusion and lighting, and makes the model perform better in complex scenes, and finally dynamically adjusts feature selection and weights according to different scenes and data through multi-task optimization and block reorganization preprocessing technology, thereby improving the adaptability and generalization ability of the model.
[0107] The above contents are only for explaining the technical idea of the present invention and cannot be used to limit the protection scope of the present invention. Any changes made on the basis of the technical solution in accordance with the technical idea proposed by the present invention shall fall within the protection scope of the claims of the present invention.
Claims
1. A facial feature extraction method based on image data, characterized in that: include: Step 1. Collect a dataset of facial images with different lighting, expressions, postures, and occlusion conditions, and preprocess the data, including cropping, resizing, graying, and standardization. Step 2. Use Tensor Principal Component Analysis (TPCA) as a feature extraction model and perform feature extraction. The feature extraction steps include: extracting facial features from preprocessed image data using the TPCA algorithm. In the feature extraction process, the effects of lighting, expression, posture and occlusion factors on the features are added. The feature extraction steps are: The preprocessed image data is constructed into a tensor form, each face image is regarded as a two-dimensional grayscale image matrix, and the two-dimensional grayscale image matrices are stacked to form a three-dimensional tensor; The tensor principal component analysis (TPCA) algorithm is used to extract features from the constructed tensor data; Introducing regularization terms into the TPCA algorithm, while adjusting the construction method and input parameters of tensor data to include the influence of lighting, expression, posture and occlusion factors; For each face image, the TPCA algorithm extracts feature vectors to represent the position of the image in the feature space; Step 3. Use a multi-task optimization ratio model to dynamically adjust the selection and weight of features during feature selection and weighting, use an area projection model to optimize the projection distance, and perform multi-task optimization of the reconstruction error; Step 4. Based on the feature representation of the tensor principal component analysis (TPCA) algorithm, weighted average, feature-level fusion, and decision-level fusion are selected to perform feature extraction and feature representation under different lighting, expressions, postures, and occlusions; Step 5. Use the block PCA algorithm for feature representation learning, train the model on a large-scale dataset, and add the influence of lighting, expression, posture and occlusion factors.
2. The method for extracting facial features based on image data according to claim 1, characterized in that: Collect data based on Internet data, and collect face image datasets with different lighting, expressions, postures, and occlusion conditions; The acquired face image is cropped, the face part is extracted from the original image, the Haar cascade detector and the detector based on deep learning are used for face detection and cropping, and the size of the cropped face image is adjusted to a uniform size; The color image is then converted into a grayscale image, and standardized with respect to lighting, expression, posture, and occlusion factors, including histogram equalization, posture correction, and expression smoothing.
3. The method for extracting facial features based on image data according to claim 2, characterized in that: The specific method of introducing the regularization term is: Here, the regularization term weight is dynamically adjusted according to the illumination, expression, posture, and occlusion characteristics of the data. The adjustment method is argminw(tr(W T XX T W)-tr(W T XH T Y)+λ·Reg(W)), where w is the parameter vector, X is the tensor data, W is the projection matrix, H is the tensor data mixing matrix, Y is the label matrix, λ is the regularization parameter, Reg(W) is the regularization term, and tr(W T XX T W) represents the error of reconstructing the tensor data X after projecting it into the low-dimensional space defined by the projection matrix W, tr(W T XH T Y) represents the distance between the projection of the tensor data X and the projection of the label data Y after projecting it into the low-dimensional space defined by the projection matrix W, and Reg(W) represents the regularization term of the projection matrix W; The regularization term is calculated as: Here m is the number of features, n is the feature dimension, i represents the sample row index, j and k represent the feature column index and channel index.
4. The method for extracting facial features based on image data according to claim 3, characterized in that: The adjustment method for tensor data construction is: When constructing tensor data, different convolution kernels are introduced for feature extraction and weighted according to the importance of the features. The tensor data is constructed as follows: Among them, X ijk is the element of the i-th row, j-th column, and k-th channel of the tensor data, I i,j is the pixel value of row i and column j of the original image, f l is the feature extraction function of the lth convolution kernel, α l is the corresponding weight, L is the number of convolution kernels; According to the lighting, expression, posture and occlusion characteristics of the data, the variance threshold and the number of features are dynamically adjusted to control the number and quality of feature extraction: argminw(tr(W T XX T W)-tr(W T XH T Y)+λ·Reg(W)).
5. The method for extracting facial features based on image data according to claim 4, characterized in that: Multi-task learning and multi-objective optimization method frameworks are used to maximize feature discrimination and minimize feature selection errors; Setting hyperparameters in the model dynamically adjusts the selection and weight of features, and the parameters are adjusted according to the characteristics of the task and data; Use back-propagation algorithm to automatically update feature selection and weights during training; The area projection model is used to optimize the projection distance. Specifically: Define the loss function of the area projection model, including the optimization objective of the projection distance and the multi-task optimization objective of the reconstruction error; In the area projection model, the reconstruction error is considered as another optimization objective and is associated with the optimization objective of the projection distance; Use the training data to train a multi-task optimization ratio model.
6. The method for extracting facial features based on image data according to claim 5, characterized in that: In step 3, the multi-task optimization ratio model dynamically adjusts the selection and weight of features, and uses the area projection model to optimize the projection distance. Specifically: The loss function is defined as: L = λ1·D iste +λ2·R econ , where λ1 and λ2 are weight parameters used to balance the optimization objectives, D iste represents the optimization target of the projection distance, R econ represents the optimization objective of the reconstruction error; The training process uses the gradient descent method to optimize the defined loss function; At the same time, the model parameters are updated in each iteration to minimize the loss function.
7. The method for extracting facial features based on image data according to claim 6, characterized in that: Feature representation learning methods include: Given a data set containing m samples X = {x1, x2, ...x m }, where each sample x i It is a high-dimensional vector representing the characteristics of a face image; Divide the dataset X into n blocks, each block contains k samples, represented as X = {X1, X2, ...X n }, where X i represents the i-th block; For each block X i , calculate the mean vector Calculate the centralized data matrix For each centralized block Calculate the covariance matrix Σ i : The covariance matrix Σ i Perform eigenvalue decomposition and obtain the eigenvalue λ i and the corresponding eigenvector v i ; Select the first r largest eigenvalues and corresponding eigenvectors to form a new feature space V i =[v1,v2,...v r ]; The feature space V of each block i Perform horizontal connection to obtain the feature space matrix V = [V1, V2, ... V n ].
8. The method for extracting facial features based on image data according to claim 7, characterized in that: Multi-task optimization and block reorganization preprocessing methods include: Use weighted mean square error with multi-task regularization and block reorganization preprocessing method to divide large-scale datasets into smaller blocks for parallel processing; That is, the data is divided into p smaller blocks, each block contains q samples, and then each block is independently input into the block-based PCA algorithm for feature representation learning.
9. The method for extracting facial features based on image data according to claim 8, characterized in that: The multi-task optimization objective function is: Among them, X i is the data matrix of the ith block, W i is the projection matrix of the ith block, Z i is the low-dimensional representation of the i-th block, λ is the regularization parameter, and ||·||F represents the norm of the matrix.
Citation Information
Patent Citations
Expression variation recognizing method for tensor-based active appearance models
CN106778708A
Image feature extraction method based on robust identification feature learning
CN112115881A