Comprehensive optimization three-dimensional face pose estimation method

By combining HOG, HFRBF kernel SVM and improved preprocessing technology, combined with integrated lifting tree and RANSAC-Levenberg-Marquardt algorithm, the problem of insufficient accuracy and robustness of face pose estimation in the existing technology is solved, and a more efficient Face detection and pose estimation.

CN118537906AActive Publication Date: 2024-08-23BEIJING INST OF TECH +1

Patent Information

Application Number
CN202410645940.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-23
Publication Date
2024-08-23
Estimated Expiration
2044-05-23

AI Technical Summary

Technical Problem

Under the influence of factors such as noise, occlusion, and illumination changes, existing 3D face pose estimation methods easily contain errors and outliers in feature point detection and matching results, resulting in insufficient accuracy and robustness of pose estimation, especially when dealing with complex scenes. It is difficult to accurately capture the detailed features of human faces.

Method used

HOG and optimized hybrid feature HFRBF kernel SVM face detection methods are used to extract features, combined with improved bilinear interpolation, grayscale and adaptive Gaussian blur for preprocessing, and a cascade regressor based on integrated lifting trees is constructed to locate facial key points. model, and by matching the three-dimensional face model with the two-dimensional image, the RANSAC and Levenberg-Marquardt algorithms are used for pose estimation.

Benefits of technology

It improves the accuracy and robustness of face detection, can effectively identify faces in various poses and lighting conditions, enhances the performance and reliability of the system in practical applications, and achieves more accurate face reconstruction and poses estimate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118537906A
    Figure CN118537906A
Patent Text Reader

Abstract

The invention belongs to the technical field of face recognition, and particularly relates to a comprehensive optimization three-dimensional face pose estimation method. According to the invention, the HOG and the optimized HFRBF kernel SVM algorithm are combined and applied to face detection, so that the accuracy and robustness of face detection are improved. According to the projection optimization and regularization-based 3DMM method provided by the invention, the fine change of the shape and texture of the human face can be better captured, and more accurate human face reconstruction and attitude estimation can be realized. According to the invention, a three-dimensional face attitude estimation algorithm based on RANSAC and Levenberg-Marquardt is adopted, so that the subtle change of the face can be captured, and the accuracy of estimating the face attitude is improved. According to the method, multiple optimization algorithms are combined, and accurate processing and analysis of the face image are realized through a series of steps. The comprehensive method not only improves the accuracy and robustness of the face recognition system, but also expands the application scene of the face recognition system, improves the precision of face pose estimation, brings important progress to the development of the face recognition technology, and improves the performance and reliability of the system in practical application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of face recognition, and in particular relates to a comprehensive optimized three-dimensional face posture estimation method. Background Art

[0002] In the field of computer vision and image processing, 3D facial pose estimation is a key technology that involves recovering the 3D pose of a face from a 2D image. This technology is very important in many applications, including facial recognition, augmented reality, human-computer interaction, and the entertainment industry. Accurate pose estimation is crucial for subsequent facial analysis and image understanding.

[0003] Traditional pose estimation methods usually rely on the detection and matching of feature points, which work well when the feature point detection is accurate and there are no outliers. However, in practical applications, images are often affected by noise, occlusion, and illumination changes, resulting in errors and outliers in the results of feature point detection and matching. These factors greatly affect the accuracy and robustness of pose estimation. For example, the POSIT algorithm is designed to solve the problem of object pose estimation. Its disadvantage is that it does not work well when dealing with situations far away from orthogonal projections, and it cannot handle situations with occlusion or inaccurate feature point positioning well. EPnP is an efficient method for solving the Perspective-n-Point problem. It can estimate the pose of the camera when several 3D points and their 2D projections in the image are known. Although EPnP is more efficient than the traditional PnP solution, it still relies on accurate feature point detection and its performance degrades when there are errors in feature point matching.

[0004] In order to overcome the limitations of traditional methods, some face pose estimation technologies based on 3D data have emerged in recent years. Among them, a common method is to use a combination of 3D face reconstruction technology and deep learning algorithms. This method first extracts facial key points from a 2D image, and then uses the spatial position information of these points and a deep learning model to infer the 3D shape and pose of the face. However, there are still some problems with existing 3D facial pose estimation methods, among which the low model accuracy is a major problem. Since facial pose is affected by factors such as lighting, occlusion, and expression, existing models often find it difficult to accurately capture the detailed features of the face when processing complex scenes, resulting in poor accuracy of pose estimation results. Summary of the invention

[0005] In order to overcome the problem that the existing posture estimation methods are affected by noise, occlusion and illumination changes, resulting in errors and outliers in the results of feature point detection and matching, and that it is often difficult to accurately capture the detailed features of the face when processing complex scenes, thereby affecting the accuracy and robustness of posture estimation, the present invention proposes a comprehensive optimization three-dimensional facial posture estimation method. The present invention realizes accurate processing and analysis of facial images through a series of steps. This method not only improves the accuracy and robustness of the face recognition system, but also expands its applicable scenarios and improves the accuracy of face posture estimation, bringing important progress to the development of face recognition technology and improving the performance and reliability of the system in practical applications.

[0006] In order to achieve the above-mentioned purpose, the present invention adopts the following technical scheme:

[0007] A comprehensive optimization method for estimating three-dimensional face posture, the method comprising the steps of:

[0008] Step 1: Extract face images from different angles based on the video;

[0009] Step 2, preprocessing the face image captured in step 1;

[0010] Step 3, construct a face recognition model, and input the face image preprocessed in step 2 into the constructed face recognition model, and output 2D face key points;

[0011] Step 4, matching the 2D face key points obtained in step 3 with the corresponding points on the standard 3D face model to obtain the key points of the 3D model;

[0012] Step 5: Use the key points of the 3D model obtained in step 4 to estimate the posture of the face.

[0013] In step 1, the method used to extract face images at different angles is HOG and optimized hybrid feature HFRBF kernel SVM face detection method, specifically:

[0014] First, the HOG method is used to extract features from a given image, and the shape information of the image is obtained by calculating the gradient size G and direction θ of the image;

[0015] Secondly, an optimized hybrid feature Gaussian radial basis function kernel (HFRBF) SVM model is used for training, and the parameters are optimized through cross-validation to achieve accurate face detection;

[0016] Among them, in the optimized mixed feature Gaussian radial basis function kernel (HFRBF) SVM model, the Lagrange multiplier method is introduced to convert it into solving its dual problem, and the optimal Lagrange multiplier is obtained, so as to determine the optimal hyperplane parameters. The dual function is expressed as:

[0017]

[0018] In the formula, α i is the Lagrange multiplier, x i and i are training samples and their categories, K M (x i ,x j ) is the mixed feature Gaussian radial basis function kernel function;

[0019] The form of the mixed feature Gaussian radial basis function kernel function is as follows:

[0020] K M (x i ,x j )=exp(-γ1||L(x i )-L(x j )|| 2 -γ2||G(x i )-G(x j )|| 2 -γ3||ω·(P(x i )-P(x j ))|| 2 )

[0021] Where L(x) represents the extracted local feature vector, G(x) represents the global feature, P(x) represents the extracted key local feature vector, ω represents the weight vector, and γ1, γ2 and γ3 are used to control the relative importance of different features.

[0022] Then, the classification function is constructed using the solution of the optimization problem. The decision function of the SVM classifier finally constructed is:

[0023]

[0024] Where b is the bias term and n is the number of support vectors.

[0025] Finally, the trained classifier model is used to perform face detection on the new image to extract the face image.

[0026] In step 2, the method for preprocessing the face image is:

[0027] First, the face image is scaled using the improved bilinear interpolation method, and the pixels in the circular area are weighted using the weight formula. The weight formula is as follows:

[0028]

[0029] Where, d i is the pixel pi (x i ,y i ) to the target pixel p(x,y), E(p i ) is the pixel p i (x i ,y i ) is the edge strength, α is an adjustable parameter used to control the influence of edge information;

[0030] Then, according to the pixel values ​​and corresponding weights of all pixels in the circular area, the pixel value I(x, y) of the target pixel p(x, y) is calculated. The calculation formula is as follows:

[0031] I(x,y)=∑(ω i *I(x i ,y i )) / ∑ω i

[0032] Secondly, the scaled image is grayscaled by taking a weighted average of the red, green, and blue components of each pixel in the RGB image;

[0033] Next, the grayscale image is divided into overlapping local areas, and the histogram statistics and cumulative distribution function calculation are performed for the pixel values ​​in each area. Then, the contrast-limited histogram equalization function is applied to finally enhance the value of each pixel. The specific formula is expressed as:

[0034]

[0035] In the formula, CDF(I(x,y)) represents the cumulative distribution function value corresponding to the pixel (x,y), CDF min is the clipping limit parameter, clip is the clipping function used to limit the pixel value range, and L is the grayscale level;

[0036] Finally, the input image is adaptively Gaussian blurred, and the blur parameters are dynamically adjusted according to the local characteristics of the image. The formula is defined as:

[0037]

[0038] Among them, I(x,y) is the pixel value of the image at position (x,y), p and q represent the coordinate positions of the center pixel and the neighborhood pixel respectively. is a Gaussian function that takes into account the spatial distance between pixels, is a Gaussian function that takes into account the difference in pixel values, and W p Normalization factor calculated based on these two Gaussian functions.

[0039] In step 3, the method for constructing a cascade regressor face key point positioning model based on an integrated boosting tree is:

[0040] First, the negative gradient of the current model is calculated before each iteration It is used to guide the fitting of the next round of regression tree. The specific formula is:

[0041]

[0042] Secondly, fit the regression tree ensemble model of each key point, combine the models of each key point, and gradually optimize the overall model so that its predicted value is close to the true value, thereby minimizing the prediction error of the key point coordinates. Fit the output of the mth regression tree The formula is as follows:

[0043]

[0044] In the formula, is the output of the mth model, is the output of the first m-1 models, ρ is the learning rate, y ki represents the true value at the i-th sample point, h(x i ) is the regression tree in the input feature vector x i The predicted value on .

[0045] The final overall model is:

[0046]

[0047] In step 4, the method for matching the 2D face key points with the corresponding points on the standard 3D face model is:

[0048] Step 4-1, match the 3D face model with the 2D face image, and project the 3D face model into 2D space. The optimized projection point formula is as follows:

[0049]

[0050] Where P is the orthogonal projection matrix, R is the rotation matrix, and t 2d is the displacement matrix, s represents the scaling factor, α i Represents the shape vector coefficient of the face model, S i represents the shape vector of the face of number i, β i Represents the texture vector coefficient of the face model, t i Represents the texture vector of the face with serial number i, γ i Represents the expression vector coefficient of the face model, e i Represents the expression vector of the face with index i.

[0051] Step 4-2, calculate the difference between the feature points of the 3D model projected onto the 2D plane and the detected 2D image feature points. The formula is as follows:

[0052]

[0053] Where, P(θ)=K[R|t 2d ] represents the posture parameter, x i is the i-th feature point in the image, t i is the corresponding texture value, λ tex and λ illum is the regularization function.

[0054] Step 4-3, optimize the objective function through the gradient descent algorithm, calculate the gradient of the objective function with respect to each parameter, and update the parameter value according to these gradients, and finally find a set of parameters α, β, γ, δ, θ that minimizes the above objective function E.

[0055] In step 5, a 3D facial posture estimation method based on RANSAC and Levenberg-Marquardt is used to estimate the facial posture, specifically:

[0056] Step 5-1, select 8 feature points, including 4 reference points of the eye corners, 1 reference point of the nose tip, 2 reference points of the mouth corners and 1 reference point of the chin. At present, the coordinates X of the 8 facial feature points in the 3D face model are i =(x i ,y i ,z i ) T Initialization has been achieved through step 4.

[0057] Step 5-2, randomly select 3 feature points from 8 feature points to form a triangle T i , solve for T i The projection matrix M i , by calculating the coordinates (x i,k ,y i,k ) and the actual observed coordinates (x obs,k ,y obs,k ) to calculate the projection error e i After repeating the above operation for each triangle composed of 8 feature points, the matrix M is obtained. i and its corresponding weight ω i From each projection matrix M i In the above example, after applying certain consistency constraints, a face pose vector α is uniquely calculated. i The projection matrix M i The calculation formula is as follows:

[0058]

[0059] In the formula, (c k ,r k ) is the T in a given image i For each vertex (x k ,y k ) is the point on the corresponding face model, (c0,r0) is the triangle center of the given image, and (x0,y0) is the triangle center in the reference face model.

[0060] Step 5-3, calculate the weighted Jacobian matrix and iterate. After each iteration, adjust the damping factor λ according to the increase or decrease of the error, and recalculate the weight ω according to the new error value. i , if the parameter update δ is less than a certain threshold, or the error reduction is no longer significant, or the predetermined number of iterations is reached, the algorithm stops iterating. The parameter output at the end of the algorithm is the optimized posture estimate α. The iteration formula follows the following form:

[0061] [J T WJ+λdiag(J T WJ)]δ=J T We

[0062] α new =α old +δ

[0063] Where W is a diagonal matrix whose diagonal elements are weighted by ω i Composition, J is the Jacobian matrix, e is the error vector, λ is the damping factor, and δ is the parameter update amount.

[0064] Beneficial Effects

[0065] (1) The present invention combines HOG and optimized HFRBF kernel SVM algorithms for face detection, thereby improving the accuracy and robustness of face detection and being able to effectively identify faces in various postures, lighting conditions, and occlusion situations; it also speeds up the speed and efficiency of face detection, enabling the system to quickly capture face contour information in real-time video streams.

[0066] (2) The 3DMM method based on projection optimization and regularization proposed in the present invention effectively improves the stability and accuracy of the 3DMM three-dimensional face model. The improved model is more robust in dealing with changes in different face shapes and textures, and can more accurately capture subtle changes in the face. The introduction of precise regularization terms can better capture subtle changes in the shape and texture of the face, thereby achieving more accurate face reconstruction and posture estimation.

[0067] (3) The present invention adopts a 3D facial pose estimation algorithm based on RANSAC and Levenberg-Marquardt, which can capture subtle changes in various parts of the face and improve the accuracy of estimating facial pose; the algorithm converges to the optimal solution faster than other optimization methods, which means that facial pose estimation can be completed faster, which is conducive to real-time or near real-time applications.

[0068] (4) The present invention combines multiple optimization algorithms and technologies to achieve accurate processing and analysis of facial images through a series of steps. This comprehensive approach not only improves the accuracy and robustness of the face recognition system, but also expands its applicable scenarios and improves the accuracy of face pose estimation, bringing important progress to the development of face recognition technology and improving the performance and reliability of the system in practical applications. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] Figure 1 A flowchart of the implementation of a three-dimensional facial posture estimation method proposed by the present invention;

[0070] Figure 2 Compare the improved face detector with the dlib-based face detector;

[0071] Figure 3 Locate 8 key points of a 2D face;

[0072] Figure 4 The face pose estimation result. DETAILED DESCRIPTION

[0073] The present invention is described in detail below in conjunction with specific examples. The following implementation will help those skilled in the art to further understand the present invention, but does not limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present invention. These all belong to the protection scope of the present invention. The following is a further detailed description of the embodiments of the present invention in conjunction with the accompanying drawings:

[0074] In order to overcome the problems of insufficient accuracy and robustness of 3D facial pose estimation technology in the prior art, a comprehensive optimization 3D facial pose estimation method is proposed. The steps of the method include:

[0075] Step 1: Extract face images from different angles based on the video;

[0076] Step 2, preprocessing the face image captured in step 1;

[0077] Step 3, construct a face recognition model, and input the face image preprocessed in step 2 into the constructed face recognition model, and output 2D face key points;

[0078] Step 4, matching the 2D face key points obtained in step 3 with the corresponding points on the standard 3D face model to obtain the key points of the 3D model;

[0079] Step 5: Use the key points of the 3D model obtained in step 4 to estimate the posture of the face.

[0080] In step 1, the method used to extract face images at different angles is HOG and optimized hybrid feature HFRBF kernel SVM face detection method, specifically:

[0081] First, the HOG method is used to extract features from a given image, and the shape information of the image is obtained by calculating the gradient size G and direction θ of the image;

[0082] Secondly, an optimized hybrid feature Gaussian radial basis function kernel (HFRBF) SVM model is used for training, and the parameters are optimized through cross-validation to achieve accurate face detection;

[0083] Among them, in the optimized mixed feature Gaussian radial basis function kernel (HFRBF) SVM model, the Lagrange multiplier method is introduced to convert it into solving its dual problem, and the optimal Lagrange multiplier is obtained, so as to determine the optimal hyperplane parameters. The dual function is expressed as:

[0084]

[0085] In the formula, α i is the Lagrange multiplier, x i and i are training samples and their categories, K M (x i ,x j ) is the mixed feature Gaussian radial basis function kernel function;

[0086] The form of the mixed feature Gaussian radial basis function kernel function is as follows:

[0087] K M (x i ,x j )=exp(-γ1||L(x i )-L(x j )|| 2 -γ2‖G(x i )-G(x j )|| 2 -γ3‖ω·(P(x i )-P(x j) )|| 2 )

[0088] Where L(x) represents the extracted local feature vector, G(x) represents the global feature, P(x) represents the extracted key local feature vector, ω represents the weight vector, and γ1, γ2 and γ3 are used to control the relative importance of different features.

[0089] Then, the classification function is constructed using the solution of the optimization problem. The decision function of the SVM classifier finally constructed is:

[0090]

[0091] Where b is the bias term and n is the number of support vectors.

[0092] Finally, the trained classifier model is used to perform face detection on the new image to extract the face image.

[0093] In step 2, the method for preprocessing the face image is:

[0094] First, the face image is scaled using the improved bilinear interpolation method, and the pixels in the circular area are weighted using the weight formula. The weight formula is as follows:

[0095]

[0096] Where, d i is the pixel p i (x i ,y i ) to the target pixel p(x,y), E(p i ) is the pixel p i (x i ,y i ) is the edge strength, α is an adjustable parameter used to control the influence of edge information;

[0097] Then, according to the pixel values ​​and corresponding weights of all pixels in the circular area, the pixel value I(x, y) of the target pixel p(x, y) is calculated. The calculation formula is as follows:

[0098] I(x,y)=Σ(ω i *I(x i ,y i )) / ∑ω i

[0099] Secondly, the scaled image is grayscaled by taking a weighted average of the red, green, and blue components of each pixel in the RGB image;

[0100] Next, the grayscale image is divided into overlapping local areas, and the histogram statistics and cumulative distribution function calculation are performed for the pixel values ​​in each area. Then, the contrast-limited histogram equalization function is applied to finally enhance the value of each pixel. The specific formula is expressed as:

[0101]

[0102] In the formula, CDF(I(x,y)) represents the cumulative distribution function value corresponding to the pixel (x,y), CDF min is the clipping limit parameter, clip is the clipping function used to limit the pixel value range, and L is the grayscale level;

[0103] Finally, the input image is adaptively Gaussian blurred, and the blur parameters are dynamically adjusted according to the local characteristics of the image. The formula is defined as:

[0104]

[0105] Among them, I(x,y) is the pixel value of the image at position (x,y), p and q represent the coordinate positions of the center pixel and the neighborhood pixel respectively. is a Gaussian function that takes into account the spatial distance between pixels, is a Gaussian function that takes into account the difference in pixel values, and W p Normalization factor calculated based on these two Gaussian functions.

[0106] In step 3, the method for constructing a cascade regressor face key point positioning model based on an integrated boosting tree is:

[0107] First, the negative gradient of the current model is calculated before each iteration It is used to guide the fitting of the next round of regression tree. The specific formula is:

[0108]

[0109] Secondly, fit the regression tree ensemble model of each key point, combine the models of each key point, and gradually optimize the overall model so that its predicted value is close to the true value, thereby minimizing the prediction error of the key point coordinates. Fit the output of the mth regression tree The formula is as follows:

[0110]

[0111] In the formula, is the output of the mth model, is the output of the first m-1 models, ρ is the learning rate, y ki represents the true value at the i-th sample point, h(x i ) is the regression tree in the input feature vector xi The predicted value on .

[0112] The final overall model is:

[0113]

[0114] In step 4, the method for matching the 2D face key points with the corresponding points on the standard 3D face model is:

[0115] Step 4-1, match the 3D face model with the 2D face image, and project the 3D face model into 2D space. The optimized projection point formula is as follows:

[0116]

[0117] Where P is the orthogonal projection matrix, R is the rotation matrix, and t 2d is the displacement matrix, s represents the scaling factor, α i Represents the shape vector coefficient of the face model, S i represents the shape vector of the face of number i, β i Represents the texture vector coefficient of the face model, t i Represents the texture vector of the face with serial number i, γ i Represents the expression vector coefficient of the face model, e i Represents the expression vector of the face with index i.

[0118] Step 4-2, calculate the difference between the feature points of the 3D model projected onto the 2D plane and the detected 2D image feature points. The formula is as follows:

[0119]

[0120] Where, P(θ)=K[R|t 2d ] represents the posture parameter, x i is the i-th feature point in the image, t i is the corresponding texture value, λ tex and λ illum is the regularization function.

[0121] Step 4-3, optimize the objective function through the gradient descent algorithm, calculate the gradient of the objective function with respect to each parameter, and update the parameter value according to these gradients, and finally find a set of parameters α, β, γ, δ, θ that minimizes the above objective function E.

[0122] In step 5, a 3D facial posture estimation method based on RANSAC and Levenberg-Marquardt is used to estimate the facial posture, specifically:

[0123] Step 5-1, select 8 feature points, including 4 reference points of the eye corners, 1 reference point of the nose tip, 2 reference points of the mouth corners and 1 reference point of the chin. At present, the coordinates X of the 8 facial feature points in the 3D face model are i =(x i ,y i ,z i ) T Initialization has been achieved through step 4.

[0124] Step 5-2, randomly select 3 feature points from 8 feature points to form a triangle T i , solve for T i The projection matrix M i , by calculating the coordinates (x i,k ,y i,k ) and the actual observed coordinates (x obs,k ,y obs,k ) to calculate the projection error e i After repeating the above operation for each triangle composed of 8 feature points, the matrix M is obtained. i and its corresponding weight ω i From each projection matrix M i In the above example, after applying certain consistency constraints, a face pose vector α is uniquely calculated. i The projection matrix M i The calculation formula is as follows:

[0125]

[0126] In the formula, (c k ,r k ) is the T in a given image i For each vertex (x k ,y k ) is the point on the corresponding face model, (c0,r0) is the triangle center of the given image, and (x0,y0) is the triangle center in the reference face model.

[0127] Step 5-3, calculate the weighted Jacobian matrix and iterate. After each iteration, adjust the damping factor λ according to the increase or decrease of the error, and recalculate the weight ω according to the new error value. i , if the parameter update δ is less than a certain threshold, or the error reduction is no longer significant, or the predetermined number of iterations is reached, the algorithm stops iterating. The parameter output at the end of the algorithm is the optimized posture estimate α. The iteration formula follows the following form:

[0128] [J T WJ+λdiag(J T WJ)]δ=J TWe

[0129] α new =α old +δ

[0130] Where W is a diagonal matrix whose diagonal elements are weighted by ω i Composition, J is the Jacobian matrix, e is the error vector, λ is the damping factor, and δ is the parameter update amount.

[0131] Example

[0132] An embodiment of the present invention provides a three-dimensional facial posture estimation method.

[0133] refer to Figure 1 As shown, this embodiment provides a three-dimensional facial posture estimation method, the method comprising:

[0134] Step 1: Extract face images from different angles based on the video;

[0135] To build a face detector, the HOG method is first used to extract features from a given input image, and the shape information of the image is obtained by calculating the gradient size G and direction θ of the image. Next, the optimized mixed feature Gaussian radial basis function kernel (HFRBF) SVM model is used for training, and the parameters are optimized through cross-validation to achieve accurate face detection. Eyes and mouths are selected as key local features in the mixed feature radial basis function kernel, and γ1 is preset to 0.5, γ2 to 0.3, and γ3 to 2.0. The weight vector ω is set to [1.0, 1.0], and the regularization parameter C is set to 1. The dataset uses the public dataset FDDB in the field of face recognition, which contains 2845 images;

[0136] Step 2, preprocessing the face image captured in step 1;

[0137] In the improved bilinear interpolation method for image scaling, the pixel points in the circular area are weighted by considering the boundary conditions of the circular area and the edge strength E of each pixel. Different weights are assigned to the pixel points inside, on, and outside the circular boundary to obtain a more accurate interpolation result. The parameter α that controls the influence of edge information is set to 0.2.

[0138] Grayscale is achieved by weighted averaging the red, green and blue components of each pixel in the RGB image. According to the requirements of color perception in the present invention, the adjustment weights α, β and γ are set to 0.299, 0.587 and 0.114 respectively.

[0139] The contrast-limited adaptive histogram is used for local grayscale equalization. The image is divided into overlapping local areas. The pixel values ​​I(x, y) in each local area are counted by histogram, and the cumulative distribution function (CDF) of the small block is calculated. Finally, the contrast-limited histogram equalization function is applied to each pixel value I(x, y) to calculate its enhanced pixel value I′(x, y). The number of grayscale levels L is set to 256.

[0140] The input image is adaptively Gaussian blurred, and the blur parameters are dynamically adjusted according to the local characteristics of the image to achieve the effect of denoising while retaining the edge and detail information in the image. The standard deviation of the spatial domain σ s Set to 2, the standard deviation of the range σ r Set to 15.

[0141] Step 3, construct a face recognition model, and input the face image preprocessed in step 2 into the constructed recognition model to output 2D key points;

[0142] Detect and locate the eight key facial reference points of the preprocessed face image and store the coordinates of each point. The eight key facial reference points are the eye corner reference points p at both ends of the left eye area. le1 With p le2 , the eye corner reference points p at both ends of the right eye area re1 With p re2 , nose tip reference point p n , the reference points p at both ends of the mouth corner area m1 With p m2 , chin reference point p j Detect and locate eight key facial reference points and store the coordinates of each point. The eight key facial reference points are the eye corner reference points p at both ends of the left eye area. le1 With p le2 , the eye corner reference points p at both ends of the right eye area re1 With p re2 , the reference points p at both ends of the nose area n1 With p n2 , the reference points p at both ends of the mouth corner area m1 With p m2 In the construction of the model, the dataset used contains 2845 face images, the number of samples is 25993, the initial prediction value is F0(x) = 0, and the initial residual is τ 0ki =y ki , the number of trees M is set to 100, the initial learning rate is set to 0.1, and the maximum depth of each tree is set to 3.

[0143] Step 4, matching the 2D face key points obtained in step 3 with the corresponding points on the standard 3D face model to obtain the key points of the 3D model;

[0144] Any face model is represented by the face shape information S and texture information T. PCA principal component analysis is used to reduce the data dimension, and the color information and texture information are represented as feature vectors in linear space, and the expression vector is introduced. Then the three-dimensional face model is matched with the two-dimensional face image, and the three-dimensional face model is projected into two-dimensional space. The objective function to be optimized is defined as minimizing the difference between the feature points of the 3D model projected onto the 2D plane and the feature points of the detected two-dimensional image. The objective function is optimized by the gradient descent algorithm, the gradient of the objective function relative to each parameter is calculated, and the parameter value is updated according to these gradients, and finally a set of parameters α, β, γ, δ, θ is found to minimize the objective function E.

[0145] Step 5: Use the key points of the 3D model obtained in step 4 to estimate the posture of the face.

[0146] Select 8 feature points, including 4 reference points at the corners of the eyes, 1 reference point at the tip of the nose, 2 reference points at the corners of the mouth, and 1 reference point at the chin. i =(x i ,y i ,z i ) T Initialization has been achieved through step 4. Randomly select 3 feature points to form a triangle T i , solve T by detecting the three feature points and the corresponding point coordinates on the face model i The projection matrix M i . Use M i , the face model is projected onto the given image, and the eight feature points are projected and marked as (x i,k ,y i,k ). By calculating the coordinates (x i,k ,y i,k ) and the actual observed coordinates (x obs,k ,y obs,k ) to calculate the projection error e i , e i Compared with the threshold e0, if e i is greater than e0, then M i is discarded. Otherwise, M i The weight ω i Calculated as (e i -e0) 2 After repeating the above operation for each triangle composed of eight feature points, the matrix M is obtained. i and its corresponding weight ω i From each projection matrix M i In the above example, after applying certain consistency constraints, a face pose vector α is uniquely calculated.i .

[0147] Calculate the weighted Jacobian matrix and iterate. After each iteration, adjust the damping factor λ according to the increase or decrease of the error, and recalculate the weight ω according to the new error value. i , if the parameter update δ is less than the threshold, or the error reduction is no longer significant, or the predetermined number of iterations is reached, the algorithm stops iterating. The parameter output at the end of the algorithm is the optimized attitude estimate α. The threshold is set to 0.01, and the predetermined number of iterations is set to 1000.

[0148] In summary, the above are only preferred embodiments of the present invention and are not intended to limit the protection scope of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A comprehensive optimization method for 3D face pose estimation, Features The steps of the method include: Step 1: Extract face images from different angles based on the video; Step 2, preprocessing the face image captured in step 1; Step 3, construct a face recognition model, and input the face image preprocessed in step 2 into the constructed face recognition model, and output 2D face key points; Step 4, matching the 2D face key points obtained in step 3 with the corresponding points on the standard 3D face model to obtain the key points of the 3D model; Step 5: Use the key points of the 3D model obtained in step 4 to estimate the posture of the face.

2. The method for comprehensively optimizing three-dimensional face pose estimation according to claim 1, Features: In step 1, the method for extracting face images at different angles is: First, the HOG method is used to extract features from a given image, and the shape information of the image is obtained by calculating the gradient size G and direction θ of the image; Secondly, the optimized mixed feature Gaussian radial basis function kernel SVM model is used for training, and the parameters are optimized through cross-validation; Then, the classification function is constructed using the solution of the optimization problem. The constructed SVM classifier decision function is: Where b is the bias term and n is the number of support vectors. Finally, the trained classifier model is used to perform face detection on the new image to extract the face image.

3. The method for comprehensively optimizing three-dimensional face pose estimation according to claim 1, Features: In the optimized mixed feature Gaussian radial basis function kernel SVM model, the Lagrange multiplier method is introduced to convert it into solving its dual problem, and the optimal Lagrange multiplier is obtained, so as to determine the optimal hyperplane parameters. The dual function is expressed as: In the formula, α i is the Lagrange multiplier, x i and i are training samples and their categories, K M (x i ,x j ) is the mixed feature Gaussian radial basis function kernel function; The form of the mixed feature Gaussian radial basis function kernel function is as follows: K M (x i ,x j )=exp(-γ 1 ||L(x i )-L(x j )|| 2 -γ 2 ||G(x i )-G(x j )|| 2 -γ 3 ||ω·(P(x i )-P(x j ))|| 2 ) In the formula, L(x) represents the extracted local feature vector, G(x) represents the global feature, P(x) represents the extracted key local feature vector, ω represents the weight vector, and γ 1 , γ 2 and γ 3 It is used to control the relative importance of different features.

4. The method for comprehensively optimizing three-dimensional face pose estimation according to claim 1, Features: In step 2, the method for preprocessing the face image is: First, the face image is scaled and the pixels in the circular area are weighted using the weight formula. The weight formula is as follows: Where, d i is the pixel p i (x i ,y i ) to the target pixel p(x,y), E(p i ) is the pixel p i (x i ,y i ) is the edge strength, α is an adjustable parameter used to control the influence of edge information; Then, according to the pixel values ​​and corresponding weights of all pixels in the circular area, the pixel value I(x, y) of the target pixel p(x, y) is calculated. The calculation formula is as follows: I(x,y)=∑(ω i *I(x i ,y i )) / ∑ω i Secondly, the scaled image is grayscaled by taking a weighted average of the red, green, and blue components of each pixel in the RGB image; Next, the grayscale image is divided into overlapping local areas, and the histogram statistics and cumulative distribution function calculation are performed for the pixel values ​​in each area. Then, the contrast-limited histogram equalization function is applied to finally enhance the value of each pixel. The specific formula is expressed as: In the formula, CDF(I(x,y)) represents the cumulative distribution function value corresponding to the pixel (x,y), CDF min is the clipping limit parameter, clip is the clipping function used to limit the pixel value range, and L is the grayscale level; Finally, the input image is adaptively Gaussian blurred, and the blur parameters are dynamically adjusted according to the local characteristics of the image. The formula is defined as: Among them, I(x,y) is the pixel value of the image at position (x,y), p and q represent the coordinate positions of the center pixel and the neighborhood pixel respectively. is a Gaussian function that takes into account the spatial distance between pixels, is a Gaussian function that takes into account the difference in pixel values, and W p Normalization factor calculated based on these two Gaussian functions.

5. The method for comprehensively optimizing three-dimensional face pose estimation according to claim 1, Features: In step 3, the method for constructing a cascade regressor face key point positioning model based on an integrated boosting tree is: First, the negative gradient of the current model is calculated before each iteration It is used to guide the fitting of the next round of regression tree. The specific formula is: Secondly, fit the regression tree ensemble model of each key point, combine the models of each key point, and gradually optimize the overall model so that its predicted value is close to the true value, thereby minimizing the prediction error of the key point coordinates and fitting the output of the mth regression tree The formula is as follows: In the formula, is the output of the mth model, is the output of the first m-1 models, ρ is the learning rate, y ki represents the true value at the i-th sample point, h(x i ) is the regression tree in the input feature vector x i The predicted value on ; The final overall model is:

6. The method for comprehensively optimizing three-dimensional face pose estimation according to claim 1, Features: In step 4, the method for matching the 2D face key points with the corresponding points on the standard 3D face model is: Step 4-1, the 3D face model is matched with the 2D face image, and the 3D face model is projected into the 2D space. The optimized projection point formula is as follows: Where P is the orthogonal projection matrix, R is the rotation matrix, and t 2d is the displacement matrix, s represents the scaling factor, α i Represents the shape vector coefficient of the face model, S i represents the shape vector of the face of number i, β i Represents the texture vector coefficient of the face model, t i Represents the texture vector of the face with serial number i, γ i Represents the expression vector coefficient of the face model, e i Represents the expression vector of the face with sequence number i; Step 4-2, calculate the difference between the feature points of the 3D model projected onto the 2D plane and the detected 2D image feature points. The formula is as follows: Where, P(θ)=K[R|t 2d ] represents the posture parameter, x i is the i-th feature point in the image, t i is the corresponding texture value, λ tex and λ illum is the regularization function; Step 4-3, optimize the objective function through the gradient descent algorithm, calculate the gradient of the objective function with respect to each parameter, and update the parameter value according to these gradients, and finally find a set of parameters α, β, γ, δ, θ that minimizes the above objective function E.

7. The method for comprehensively optimizing three-dimensional face pose estimation according to claim 1, Features: In step 5, a 3D facial posture estimation method based on RANSAC and Levenberg-Marquardt is used to estimate the facial posture, specifically: Step 5-1, select 8 feature points, including 4 reference points of the corners of the eyes, 1 reference point of the nose tip, 2 reference points of the corners of the mouth and 1 reference point of the chin; Step 5-2, randomly select 3 feature points from 8 feature points to form a triangle T i , solve for T i The projection matrix M i , by calculating the coordinates (x i,k ,y i,k ) and the actual observed coordinates (x obs,k ,y obs,k ) to calculate the projection error e i , we will get the matrix M i and its corresponding weight ω i A list of, from each projection matrix M i In the above example, a face pose vector α is calculated. i , the projection matrix M i The calculation formula is as follows: In the formula, (c k ,r k ) is the T in a given image i For each vertex (x k ,y k ) is the point on the corresponding face model, (c 0 ,r 0 ) is the center of the triangle of the given image, (x 0 ,y 0 ) is the center of the triangle in the reference face model; Step 5-3, calculate the weighted Jacobian matrix and iterate. After each iteration, adjust the damping factor λ according to the increase or decrease of the error, and recalculate the weight ω according to the new error value. i , if the parameter update amount δ is less than a certain threshold, or the error reduction is no longer significant, or the predetermined number of iterations is reached, the algorithm stops iterating. The output parameter at the end of the algorithm is the optimized posture estimate α. The iteration formula follows the following form: [J T WJ+λdiag(J T WJ)]δ=J T We a new =a old +d Where W is a diagonal matrix whose diagonal elements are weighted by i Composition, J is the Jacobian matrix, e is the error vector, λ is the damping factor, and δ is the parameter update amount.

Citation Information

Patent Citations

  • Micro-expression type determination method and device, electronic equipment and storage medium

    CN113743275A

  • Identifying Facial Expressions in Acquired Digital Images

    US20110007174A1

Cited By

  • Face 3D key point acquisition method and system based on multiple sensors

    CN119169680A