Face posture estimation method, device, system and electronic equipment
By extracting and transforming features from facial images, and using feature extraction and feature transformation networks to obtain facial pose angles, the problems of insufficient accuracy and speed in existing technologies are solved, achieving higher accuracy and speed in facial pose prediction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN INTELLIFUSION TECHNOLOGIES CO LTD
- Filing Date
- 2023-08-29
- Publication Date
- 2026-04-17
AI Technical Summary
Existing face pose estimation methods suffer from insufficient accuracy and speed.
By extracting and processing features from the target face image, the face angle features are converted into a matrix sequence. The face pose angle is obtained by using a preset feature extraction network and feature transformation network, thus avoiding the angle periodicity problem caused by direct processing.
It improves the accuracy and speed of face pose prediction, and enhances the effectiveness of face pose prediction.
Smart Images

Figure CN117275058B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of face recognition, and more particularly to a face pose estimation method, apparatus, system, electronic device, and storage medium. Background Technology
[0002] With the development of technology, more and more facial recognition technologies are appearing before people and being applied in society. Traditional facial pose estimation methods acquire facial angle features from a face image and then directly estimate the facial pose angle of the target face image based on these features. However, the facial angle features obtained through this method can exhibit angle periodicity under certain conditions. Therefore, existing facial pose estimation methods suffer from insufficient accuracy and speed. Summary of the Invention
[0003] This invention provides a method for face pose estimation, aiming to address the problems of insufficient accuracy and slow speed in existing face pose estimation methods. By extracting and processing facial angle features from a target face image and converting these features into a matrix sequence, the method obtains the face pose angle of the target face image using the corresponding matrix sequence. This avoids the angle periodicity problem caused by directly processing facial angle feature values, and the obtained face pose angle is more accurate and faster, thus improving the effectiveness of face pose estimation.
[0004] In a first aspect, embodiments of the present invention provide a method for predicting facial pose, characterized in that the method includes the following steps:
[0005] Acquire the target face image and a trained face pose prediction model, wherein the trained face pose prediction model includes a preset feature extraction network and a preset feature transformation network;
[0006] The target face image is processed by the preset feature extraction network to obtain the face angle features of the target face image;
[0007] The facial angle features are processed by the preset feature transformation network to obtain the rotation matrix of the target facial image;
[0008] Based on the rotation matrix, the facial pose angle of the target face image is determined.
[0009] Optionally, the face pose estimation method is characterized in that, before performing feature transformation processing on the face angle features through the preset feature transformation network to obtain the rotation matrix of the target face image, the method further includes:
[0010] Obtain a first face angle sample set and a face pose prediction model to be trained. The face pose prediction model to be trained includes a feature extraction network to be trained and a feature transformation network to be trained. The first face angle sample set includes a first sample face image and a face angle label corresponding to the first sample face image.
[0011] According to the preset conversion strategy, the face angle label corresponding to the first sample face image is converted into a rotation matrix to obtain the rotation matrix label corresponding to the first sample face image;
[0012] Based on the first sample face image and the rotation matrix label corresponding to the first sample face image, the face pose prediction model to be trained is iteratively trained, and the trained face pose prediction model is obtained after the iterative training is completed.
[0013] Optionally, the face pose estimation method is characterized in that, before performing feature transformation processing on the face angle features through the preset feature transformation network to obtain the rotation matrix of the target face image, the method further includes:
[0014] Obtain a second face angle sample set and a face pose prediction model to be trained. The face pose prediction model to be trained includes a feature extraction network to be trained and a feature transformation network to be trained. The second face angle sample set includes a second sample face image, a third sample face image, and face angle labels corresponding to the second sample face image.
[0015] According to the preset conversion strategy, the face angle label corresponding to the second sample face image is converted into a rotation matrix to obtain the rotation matrix label corresponding to the second sample face image;
[0016] Based on the second sample face image and the rotation matrix label corresponding to the second sample face image, a first loss value is determined;
[0017] A second loss value is determined based on the third sample face image;
[0018] The face pose prediction model to be trained is iteratively trained based on the first loss value and the second loss value, and a trained face pose prediction model is obtained after the iterative training is completed.
[0019] Optionally, the face pose estimation method is characterized in that determining the first loss value based on the second sample face image and the rotation matrix label corresponding to the second sample face image includes:
[0020] The second sample face image is input into the preset feature extraction network for processing to obtain the face angle features of the second sample face image;
[0021] The facial angle features of the second sample face image are input into the feature transformation network to be trained for processing to obtain the prediction rotation matrix of the second sample face image;
[0022] The error loss between the predicted rotation matrix of the second sample face image and the corresponding rotation matrix label of the second sample face image is calculated to obtain the first loss value.
[0023] Optionally, the face pose estimation method is characterized in that determining the second loss value based on the third sample face image includes:
[0024] The third sample face image is subjected to data augmentation processing by any two different image augmentation methods to obtain a first augmented image and a second augmented image.
[0025] The first augmented image and the second augmented image are respectively input into the preset feature extraction network for processing to obtain the face angle features of the first augmented image and the face angle features of the second augmented image.
[0026] The facial angle features of the first augmented image and the facial angle features of the second augmented image are respectively input into the feature transformation network to be trained for processing, so as to obtain the prediction rotation matrix of the first augmented image and the prediction rotation matrix of the second augmented image respectively.
[0027] The error loss between the predicted rotation matrix of the first augmented image and the predicted rotation matrix of the second augmented image is calculated to obtain the second loss value.
[0028] Optionally, the face pose estimation method is characterized in that the step of iteratively training the face pose estimation model to be trained based on the first loss value and the second loss value, and obtaining the trained face pose estimation model after the iterative training is completed, includes:
[0029] Based on the first loss value and the second loss value, determine the total loss value;
[0030] With the goal of minimizing the total loss, the parameters of the face pose prediction model to be trained are adjusted using the backpropagation algorithm, and the parameter adjustment process is iterated.
[0031] Training stops when the number of iterations is greater than or equal to the number of predictions, and a well-trained face pose prediction model is obtained.
[0032] Optionally, the face pose estimation method is characterized in that the step of performing feature transformation processing on the face angle features through a preset feature transformation network to obtain the rotation matrix of the target face image includes:
[0033] The facial angle features are segmented using a preset feature transformation network to obtain a first sub-feature and a second sub-feature;
[0034] The first sub-feature and the second sub-feature are subjected to a first feature transformation process to obtain the third sub-feature;
[0035] A second feature transformation process is performed on the first sub-feature, the second sub-feature, and the third sub-feature to obtain the rotation matrix of the target face image.
[0036] Secondly, embodiments of the present invention also provide a face pose estimation device, the face pose estimation device comprising:
[0037] The acquisition module is used to acquire the target face image and the trained face pose prediction model. The trained face pose prediction model includes a preset feature extraction network and a preset feature transformation network.
[0038] The first processing module is used to perform feature extraction processing on the target face image through the preset feature extraction network to obtain the face angle features of the target face image;
[0039] The second processing module is used to perform feature transformation processing on the face angle features through the preset feature transformation network to obtain the rotation matrix of the target face image;
[0040] The determination module is used to determine the facial pose angle of the target facial image based on the rotation matrix.
[0041] Thirdly, embodiments of the present invention provide an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps in the face pose estimation method provided in embodiments of the present invention.
[0042] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in the face pose estimation method provided in the embodiments of the present invention.
[0043] In this embodiment of the invention, a target face image is acquired, and its features are extracted using a preset feature extraction network to obtain the face angle features. These features are then transformed using a preset feature transformation network to obtain a rotation matrix for the target face image. Based on this rotation matrix, the face pose angle of the target face image is determined. By processing the face features of the target face image and converting them into a corresponding rotation matrix, and then obtaining the face pose angle based on this rotation matrix, the angle periodicity problem caused by directly estimating the face features of the target face image can be avoided. This improves the accuracy and speed of the face prediction method, thereby enhancing the effectiveness of face pose prediction. Attached Figure Description
[0044] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0045] Figure 1 This is a flowchart of a face pose estimation method provided in an embodiment of the present invention;
[0046] Figure 2 This is a schematic diagram of label-free data prediction provided in an embodiment of the present invention;
[0047] Figure 3 This is a schematic diagram of the structure of a face pose estimation device provided in an embodiment of the present invention;
[0048] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0049] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0050] like Figure 1 As shown, Figure 1 This is a flowchart of a face pose estimation method provided in an embodiment of the present invention, including:
[0051] 101. Obtain the target face image and the trained face pose prediction model.
[0052] In this embodiment of the invention, the aforementioned face pose estimation method can be deployed in a face recognition platform, which can be a server or terminal with data processing, data storage, and data transmission capabilities. Examples include access control systems and face verification systems. Through the aforementioned face pose estimation method, the facial angle features of a target face image can be accurately extracted and estimated, thereby improving the recognition accuracy of access control systems and face verification systems for these facial angle features.
[0053] The target face image can be a face image obtained by the face recognition platform, specifically a face image uploaded by the user; alternatively, it can be obtained by taking a picture of the target face using the camera attached to the face recognition platform. The trained face pose prediction model includes a preset feature extraction network and a preset feature transformation network. The feature extraction network extracts the face angle features from the input face image and outputs face angle features. The feature transformation network transforms the input face angle features and outputs a rotation matrix, thus completing the process of converting face angle features into a rotation matrix.
[0054] In this embodiment, before acquiring the target face image, an initial face image can be acquired and preprocessed to obtain the target face image. This preprocessing may include face detection, capturing the face using a face detection bounding box, converting the height and width of the face detection bounding box and expanding it, resizing the expanded face detection bounding box to a suitable size, and cropping the center portion of the detection box using a center cropping method. It should be noted that the specific expansion range and center portion need to be determined according to the specific implementation method. Specifically, the initial face image can also undergo preprocessing such as image denoising and color correction to make the facial angular features of the initial face image more prominent. The image denoising process described above is a technique used to reduce or eliminate noise in an image (e.g., random noise in a digital signal), which can be achieved by applying filters, smoothing algorithms, or other noise reduction techniques. Color correction aims to adjust the color saturation, color temperature, brightness, and other attributes of the image to make the image look more natural and realistic, which can be achieved by modifying the image's color curve, applying white balance, and color correction.
[0055] Specifically, using the above preprocessing method to process the target face image can make the facial angle features of the obtained target face image more obvious, facilitate subsequent processing operations on the target face image, and make the target face angle features obtained from subsequent processing operations more accurate.
[0056] 102. The target face image is processed by a preset feature extraction network to obtain the face angle features of the target face image.
[0057] In this embodiment of the invention, the feature extraction network can be a feature extraction structure in a deep convolutional neural network, such as the feature extraction structure in deep convolutional neural networks like AlexNet, VGG, ResNet, DenseNet, CenterNet, and YOLOv.
[0058] Specifically, an open-source face angle estimation model can be obtained from an open-source platform, and the feature extraction network in this open-source face angle estimation model can be used as the preset feature extraction network in this embodiment of the invention. The aforementioned open-source feature extraction network can extract and process the input face image, and then output the face angle features corresponding to the face image. Of course, the aforementioned preset feature extraction network can also be trained independently. Specifically, a face angle estimation model based on a convolutional neural network can be constructed as the first model to be trained. Through supervised training of the first model to be trained, a trained face angle estimation model is obtained, and the feature extraction network in the trained face angle estimation model is used as the preset feature extraction network in this embodiment of the invention. It should be noted that the difference between the aforementioned face angle estimation model and the aforementioned trained face pose prediction model is that the aforementioned trained face pose prediction model includes a preset feature transformation network, while the aforementioned face angle estimation model does not include the aforementioned preset feature transformation network.
[0059] The target face image can be input into a feature extraction network to extract face angle features, and the face angle features of the target face image can be output through the feature extraction network.
[0060] The aforementioned facial angular features refer to characteristics describing the orientation and posture of a face in space, such as the pitch angle, yaw angle, and roll angle. Specifically, the pitch angle represents the angle of head tilt or head tilt, the yaw angle represents the angle of facial profile, and the roll angle represents the angle of rotation of the face's center. These facial angular features are widely used in computer vision and face recognition, for example, in tasks such as face detection, pose estimation, and face recognition. By analyzing and understanding facial angular features, more accurate face recognition and line analysis can be provided.
[0061] A set of face images is acquired, comprising multiple face images and corresponding angle labels. Each face image corresponds to one angle label. The face images are input into a first model to be trained for processing to obtain the angle results corresponding to the face images. The loss value between the angle results corresponding to the face images and the angle labels corresponding to the face images is calculated. Minimizing the loss value is the optimization objective. The parameters of the first model to be trained are adjusted through backpropagation. The above parameter adjustment process is iterated until the number of iterations reaches a preset number or the loss value converges at the minimum. Training is then stopped, resulting in a trained face angle estimation model. The feature extraction part of the trained face angle estimation model is extracted and used as the preset feature extraction network in this embodiment of the invention. The above loss value can be obtained by the following formula:
[0062]
[0063] Where n represents the number of training iterations, R represents the angle result corresponding to the face image, and T represents the angle label corresponding to the face image. The closer the angle result corresponding to the face image is to the angle label corresponding to the face image, the stronger the recognition ability of the first model to be trained, that is, the smaller the loss value, and the closer the result of the first model to be trained is to the angle label.
[0064] 103. The face angle features are transformed by a preset feature transformation network to obtain the rotation matrix of the target face image.
[0065] In this embodiment of the invention, the aforementioned feature transformation network is a feature transformation structure based on a deep convolutional neural network. The feature transformation network can be trained and used to perform feature transformation on the facial angle features of a target face image to obtain the rotation matrix of the target face image.
[0066] When training the feature transformation network, the aforementioned preset feature extraction network can be connected to the feature transformation network to be trained. The output of the preset feature extraction network is used as the input of the feature transformation network to be trained, thereby obtaining a second model to be trained. The second model to be trained includes the preset feature extraction network and the feature transformation network to be trained, wherein the preset feature extraction network is a pre-trained feature extraction network. Since the preset feature extraction network is a pre-trained feature extraction network, the network parameters of the preset feature extraction network can be fixed during training, and only the parameters of the feature transformation network to be trained need to be adjusted.
[0067] Before training the second model to be trained, a certain number of sample face images and corresponding face angle labels are prepared. Each sample face image corresponds to a face angle label. The face angle labels can be converted into rotation matrix labels so that each sample face image corresponds to a rotation matrix label. Through the sample face images and corresponding face angle labels, the second model to be trained is guided to learn the rotation matrix output of the face angle. After training is completed, the trained feature transformation network is determined as the preset feature transformation network.
[0068] The above training process can iteratively train the feature transformation network to be trained using sample face images and corresponding face angle labels until the preset number of iterations is reached, at which point the training ends.
[0069] The aforementioned facial angle features can be input into a feature transformation network for feature transformation processing, and the network can then output a rotation matrix of the target facial image corresponding to the target facial angle features. Specifically, the facial angle features can be input into the feature transformation network, which outputs a fixed-dimensional value, such as a 6-dimensional value. This 6-dimensional value can then be linearly transformed based on the symmetry and normalization properties of the rotation matrix to obtain a 3×3 rotation matrix.
[0070] 104. Determine the facial pose angle of the target face image based on the rotation matrix.
[0071] In this embodiment of the invention, the face angle features corresponding to the target face image are transformed by the above-trained feature transformation network to obtain the rotation matrix of the target face image, and the face pose angle of the target face image is estimated by the rotation matrix.
[0072] The aforementioned face pose angles can be parameters describing the orientation and rotation angles of a face in three-dimensional space. It should be noted that these face pose angles differ from the aforementioned face angle features; face pose angles are calculated by applying the aforementioned rotation matrix. For example, the aforementioned face pose angles can include pitch angle, roll angle, and yaw angle. The aforementioned rotation matrix is a 3×3 matrix. Converting the rotation matrix output by the aforementioned feature transformation network into face angles, the face angles corresponding to the aforementioned pitch angle, roll angle, and yaw angle can be obtained using the following three formulas:
[0073] pitch = asin(-R) pred [1,2])*180 / π
[0074] yaw = atan(R) pred [0,2] / R pred [2,2])*180 / π
[0075] roll = atan(R) pred [1,0] / R pred [1,1])*180 / π
[0076] Where pitch represents the face angle at pitch, yaw represents the face angle at yaw, roll represents the face angle at roll, and R... pred The above R represents the rotation matrix output by the feature transformation network. pred [1,2] represents the value in the 2nd row and 3rd column of the rotation matrix, R above. pred [0,2] represents the value in the 1st row and 3rd column of the rotation matrix, R above. pred [2,2] represents the value in the 3rd row and 3rd column of the rotation matrix, R above. pred [1,0] represents the value in the 2nd row and 1st column of the rotation matrix, R pred [1,1] represents the value in the 2nd row and 2nd column of the rotation matrix.
[0077] When converting a rotation matrix into facial pose angles, it is also necessary to limit the facial pose angles. Specifically, the pitch, roll, and yaw angles to be converted should be limited. For example, the pitch angle range can be limited to [-90°, 90°], the roll angle range to [-180°, 180°], and the yaw angle range to [-180°, 180°], to ensure that the converted facial pose angles conform to normal human behavior and to ensure the accuracy of the results.
[0078] In this embodiment of the invention, a target face image is acquired, and its features are extracted using a preset feature extraction network to obtain the face angle features. These features are then transformed using a preset feature transformation network to obtain a rotation matrix for the target face image. Based on this rotation matrix, the face pose angle of the target face image is determined. By processing the face features of the target face image and converting them into a corresponding rotation matrix, and then obtaining the face pose angle based on this rotation matrix, the angle periodicity problem caused by directly estimating the face features of the target face image can be avoided. This improves the accuracy and speed of the face prediction method, thereby enhancing the effectiveness of face pose prediction.
[0079] Optionally, before performing feature transformation processing on the face angle features through a preset feature transformation network to obtain the rotation matrix of the target face image, a first face angle sample set and a face pose prediction model to be trained can be obtained. The face pose prediction model to be trained includes a feature extraction network to be trained and a feature transformation network to be trained. Then, according to a preset transformation strategy, the face angle labels corresponding to the first sample face image are converted into rotation matrices to obtain the rotation matrix labels corresponding to the first sample face image. Finally, based on the first sample face image and the rotation matrix labels corresponding to the first sample face image, the face pose prediction model to be trained is iteratively trained, and the trained face pose prediction model is obtained after the iterative training is completed.
[0080] In this embodiment of the invention, the aforementioned first face angle sample set includes first sample face images and face angle labels corresponding to the first sample face images. The aforementioned first face angle sample set may contain multiple first sample face images with different face angles, each first sample face image corresponding to a face angle label, which represents the actual face angle in the first sample face image. Feature extraction processing can be performed on the aforementioned first sample face images using the aforementioned feature extraction network to obtain the face angle features corresponding to the first sample face images. The aforementioned feature transformation network to be trained may be constructed based on a deep convolutional neural network, and the aforementioned feature transformation network to be trained is used to convert the sample face angle features output by the feature extraction network to be trained into a rotation matrix.
[0081] Specifically, the corresponding rotation matrix label can be obtained by acquiring the face angle label corresponding to the first sample face image. The feature transformation network to be trained can be trained based on the rotation matrix label and the first sample face image. Specifically, the rotation matrix label can be used to perform supervised training on the feature transformation network to be trained. After training, the trained feature transformation network is obtained.
[0082] Furthermore, the facial angle features corresponding to the first sample face image can be input into the feature transformation network to be trained, and a rotation matrix can be output.
[0083] The process of converting the aforementioned face angle labels into rotation matrix labels using the first transformation strategy can involve obtaining the rotation matrices corresponding to the three axes Rx, Ry, and Rz in the face angle features, and then multiplying these rotation matrices using linear calculations to obtain the rotation matrix label R. label .
[0084] Specifically, the labels Rx, Ry, Rz and the rotation matrix mentioned above... label It can be obtained through the following formula:
[0085]
[0086]
[0087]
[0088] R label =R x ·R y ·R z
[0089] Where x, y, and z are the face angles of pitch, yaw, and roll, respectively, and R... label The rotation matrix labels serve as the supervision information for training the aforementioned feature transformation network.
[0090] Furthermore, the process of converting the facial angle features corresponding to the first sample face image into a rotation matrix through the feature transformation network to be trained can be achieved by outputting a fixed-dimensional value, such as a 1×6-dimensional value, through the feature extraction network, and then calculating the rotation matrix R based on the symmetry and normalization of the rotation matrix. pred .
[0091] The aforementioned iterative training refers to the process of repeatedly training the face pose prediction model to be trained, thereby optimizing the network's weights and parameters through iterative parameter adjustments, until the error loss value converges at its minimum, or the number of iterations reaches a preset value, at which point training stops and a well-trained model is obtained.
[0092] The loss values mentioned above are used in machine learning and deep learning to measure the difference between the model's predictions and the true values. Examples include MES, Log Loss, and Hinge loss. The loss value is a core part of optimizing the model and algorithm. The feature transformation network described above adjusts the model's parameters by shrinking it, making the rotation matrix output by the feature transformation network approximate the rotation matrix label.
[0093] Optionally, before performing feature transformation processing on the face angle features through a preset feature transformation network to obtain the rotation matrix of the target face image, a second face angle sample set and a face pose prediction model to be trained can be obtained. The face pose prediction model to be trained includes a feature extraction network to be trained and a feature transformation network to be trained. Then, according to a preset transformation strategy, the face angle labels corresponding to the second sample face image are converted into rotation matrices to obtain the rotation matrix labels corresponding to the second sample face image. Then, based on the second sample face image and the rotation matrix labels corresponding to the second sample face image, a first loss value is determined. Then, based on the third sample face image, a second loss value is determined. Finally, based on the first loss value and the second loss value, the face pose prediction model to be trained is iteratively trained, and after the iterative training is completed, the trained face pose prediction model is obtained.
[0094] In this embodiment of the invention, the face angle labels of the second sample face image are obtained and converted into corresponding rotation matrices to obtain corresponding rotation matrix labels. Then, the first loss value is calculated based on the second sample face image and the rotation matrix labels of the second sample face image. The second loss value is then directly determined based on the third sample face image. Finally, the feature transformation network to be trained is trained and its parameters are adjusted based on the first loss value and the second loss value.
[0095] The aforementioned second face angle sample set includes a second sample face image, a third sample face image, and face angle labels corresponding to the second sample face image. The second and third sample face images, like the first sample face image, can be face images containing multiple angles. In one possible embodiment, the first, second, and third sample face images can use the same set of images, and different preprocessing can be performed as needed, which can be confirmed based on the actual implementation scheme.
[0096] The first loss value can be obtained from the first loss function, which is obtained by comparing the rotation matrix label of the second sample face image with the corresponding rotation matrix of the second sample face image. The second loss value can be obtained from the second loss function, which is obtained by repeatedly inputting the third sample face image into the feature extraction network to be trained, outputting the face angle features corresponding to the third sample face image, and then comparing the rotation matrix derived from the face angle features of the third sample face image with the rotation matrix label of the second sample face image. Finally, the parameters of the feature extraction network to be trained are iteratively adjusted based on the first and second loss values until the second loss value converges at its minimum, or the number of iterations reaches a preset value, at which point training stops, resulting in a trained feature transformation network.
[0097] Optionally, in the step of determining the first loss value based on the second sample face image and the rotation matrix label corresponding to the second sample face image, the second sample face image can also be input into a preset feature extraction network for processing to obtain the face angle features of the second sample face image, and the face angle features of the second sample face image can be input into a feature transformation network to be trained for processing to obtain the predicted rotation matrix of the second sample face image. Finally, the error loss between the predicted rotation matrix of the second sample face image and the rotation matrix label corresponding to the second sample face image is calculated to obtain the first loss value.
[0098] In this embodiment of the invention, the facial angle features of the second sample face image are input into the feature transformation network to be trained for processing to obtain the predicted rotation matrix of the corresponding second sample face image. The first loss value is obtained by calculating the predicted rotation matrix with the rotation matrix label of the second sample face image.
[0099] The aforementioned predicted rotation matrix can be obtained by transforming the facial angle features of a face image through a feature transformation network to be trained.
[0100] The first loss value mentioned above can be obtained from the first loss function. The first loss function can be obtained by comparing the rotation matrix label of the second sample face image with the rotation matrix of the second sample face image output by the feature extraction network mentioned above. Specifically, it can be obtained by the following formula:
[0101]
[0102] Among them, Loss g R represents the first loss value, tr represents the distance of the rotation matrix, and R represents the distance of the first loss value. pred Represents the predicted rotation matrix vector. Let represent the rotation matrix label vector. According to the above formula, the closer the predicted rotation matrix vector is to the rotation matrix label vector, that is, the closer the distance between the predicted rotation matrix vector and the rotation matrix label vector, the smaller the first loss value is. This means that the rotation matrix output by the feature transformation network to be trained is closer to the expected rotation matrix. In other words, the feature transformation network to be trained completes training and obtains a well-trained feature transformation network when the output rotation matrix is closer to the expected rotation matrix.
[0103] Optionally, in the step of determining the second loss value based on the third sample face image, the third sample face image can be augmented using any two different image augmentation methods to obtain a first augmented image and a second augmented image. Then, the first augmented image and the second augmented image are respectively input into a preset feature extraction network for processing to obtain the face angle features of the first augmented image and the face angle features of the second augmented image. The face angle features of the first augmented image and the face angle features of the second augmented image are then respectively input into a feature transformation network to be trained for processing to obtain the prediction rotation matrix of the first augmented image and the prediction rotation matrix of the second augmented image. Finally, the error loss between the prediction rotation matrix of the first augmented image and the prediction rotation matrix of the second augmented image is calculated to obtain the second loss value.
[0104] In this embodiment of the invention, after performing different image augmentation processes on the third sample face image, the images are input into a preset feature extraction network to output the face angle features of the first augmented image and the face angle features of the second augmented image. The face angle features of the first augmented image and the face angle features of the second augmented image are then input into the same feature transformation network to be trained to output the predicted rotation matrix of the first augmented image and the predicted rotation matrix of the second augmented image. The second loss value is obtained by calculating the error loss between the predicted rotation matrix of the first augmented image and the predicted rotation matrix of the second augmented image.
[0105] The image augmentation methods described above can involve performing some graphics or geometric image transformations on existing data, such as image rotation, translation, flipping, scaling, and separating color channels.
[0106] The aforementioned data augmentation process is primarily used to increase the training dataset, making it as diverse as possible and thus enhancing the generalization ability of the trained model. In this embodiment, the third sample face image is cropped at different locations to ensure that the augmented image content input into the preset feature extraction network is differentiated.
[0107] The first and second augmented images mentioned above can be obtained by performing image augmentation processing on the third sample face image.
[0108] The second loss value mentioned above can be obtained by the following formula:
[0109]
[0110] Among them, Loss pred_diff R represents the second loss value, tr represents the distance of the rotation matrix, and R represents the distance of the rotation matrix. pred1 The vector representing the predicted rotation matrix of the first augmented image. Let the predicted rotation matrix vector of the second augmented image be denoted by the above formula. The closer the predicted rotation matrix vector of the first augmented image is to the predicted rotation matrix vector of the second augmented image (i.e., the closer the distance between the predicted rotation matrix vectors of the first and second augmented images), the smaller the second loss value. This indicates that the predicted rotation matrix vector of the first augmented image output by the feature transformation network to be trained is closer to the predicted rotation matrix vector of the second augmented image. In other words, the feature transformation network to be trained completes training and obtains a trained feature transformation network when the output predicted rotation matrix vector of the first augmented image is closer to the predicted rotation matrix vector of the second augmented image.
[0111] Specifically, according to Figure 2 The diagram illustrates unlabeled data prediction. Two different image processing methods are applied to the same face image: rotating the image to obtain a first preprocessed image, and mirroring the image to obtain a second preprocessed image. These two preprocessed images are then input into a pre-defined feature extraction network to obtain a first prediction rotation matrix R1 and a second prediction rotation matrix R2. The second loss value, Loss, is obtained by calculating the loss difference between the first and second prediction rotation matrices. pred_diff .
[0112] Optionally, in the step of iteratively training the face pose prediction model to be trained based on the first loss value and the second loss value, and obtaining the trained face pose prediction model after the iterative training is completed, the total loss value can be determined based on the first loss value and the second loss value. Then, with the minimum total loss value as the optimization objective, the parameters of the face pose prediction model to be trained are adjusted through the backpropagation algorithm, and the parameter adjustment process is iterated. Finally, when the number of iterations is greater than or equal to the number of predictions, the training is stopped, and the trained face pose prediction model is obtained.
[0113] In this embodiment of the invention, a total loss value is obtained by calculating the first loss value and the second loss value. The feature transformation network to be trained is then trained with the goal of minimizing the total loss value, resulting in a trained feature transformation network. The total loss value can be obtained using the following formula:
[0114] L = Loss g +λLoss pred_diff
[0115] Where L represents the total loss value, Loss g λLoss represents the first loss value. pred_diffLet λ represent the second loss value, and λ be the weight parameter, the specific setting of which needs to be determined according to the actual implementation plan. From the above formula, we can conclude that when both the first and second loss values are optimized to their minimum, the total loss value is also minimized. Therefore, by optimizing the influencing factors of the first and second loss values, we can achieve the goal of minimizing both the first and second loss values, thereby minimizing the total loss value. At this point, the feature transformation network is in a trained state, and a well-trained feature transformation network can be obtained.
[0116] Optionally, in the step of performing feature transformation processing on the face angle features through a preset feature transformation network to obtain the rotation matrix of the target face image, the face angle features can also be segmented through the preset feature transformation network, and a first feature transformation processing can be performed on the first sub-feature and the second sub-feature to obtain a third sub-feature. A second feature transformation processing can be performed on the first sub-feature, the second sub-feature, and the third sub-feature to obtain the rotation matrix of the target face image.
[0117] In this embodiment of the invention, the first and second sub-features are input into the preset feature transformation network, which outputs a value of fixed dimension, such as a 1×6 value, which is the facial angle feature. The 1×6 value is then segmented to obtain the first and second sub-features. The first feature transformation process can be a normalization process of the first and second sub-features to obtain a third, fourth, and fifth sub-feature. The second feature transformation process can refer to the process of calculating a rotation matrix by transposing the fourth and fifth sub-features obtained after normalizing the first and second sub-features with the third sub-feature.
[0118] Specifically, the 1×6 dimensional value can be divided into a first sub-feature A and a second sub-feature B using the following formula, which facilitates subsequent calculations:
[0119] A = output[0:3]
[0120] B = output[3:6]
[0121] A1 = norm(A)
[0122] C = norm(A1 × B)
[0123] B1 = C × A1
[0124] Here, `output` represents the six output values: A is the first sub-feature, B is the second sub-feature, C is the third sub-feature, A1 is the fourth sub-feature (obtained by normalizing the first sub-feature), and B1 is the fifth sub-feature (obtained by cross-product of the third and fourth sub-features). `norm` represents the normalization calculation. For example, normalization algorithms such as Euclidean norm, Manhattan norm, maximum normalization, and Softmax function can be used to normalize the above vector. Alternatively, normalization parameters obtained through training can be used to normalize the above vector. Specifically, these six values are divided into the first three values [0:3] and the last three values [3:6], corresponding to the first sub-feature A and the second sub-feature B, respectively. The first sub-feature A is normalized to obtain the fourth sub-feature A1. The cross product of the fourth sub-feature A1 and the second sub-feature B is normalized to obtain the third sub-feature C. Finally, the cross product of the fourth sub-feature A1 and the third sub-feature C is performed to obtain the fifth sub-feature B1.
[0125] Furthermore, the rotation matrix of the target face image output by the preset feature transformation network can be obtained by calculating the transpose matrix of the third sub-feature C, the fourth sub-feature A1, and the fifth sub-feature B1 using the following formula:
[0126] R pred =[A1·T,B1·T,C·T]
[0127] Where T is the transpose matrix. By multiplying A1, B1, and C by their respective transpose matrices, we obtain new matrices with the same row and column ordinal numbers. These matrices are then arranged and combined to obtain a new matrix, which is the rotation matrix of the target face image.
[0128] like Figure 3 As shown, this embodiment of the invention also provides a face pose estimation device, comprising:
[0129] The acquisition module 301 is used to acquire the target face image and the trained face pose prediction model, wherein the trained face pose prediction model includes a preset feature extraction network and a preset feature transformation network.
[0130] The first processing module 302 is used to perform feature extraction processing on the target face image through the preset feature extraction network to obtain the face angle features of the target face image;
[0131] The second processing module 303 is used to perform feature transformation processing on the face angle features through the preset feature transformation network to obtain the rotation matrix of the target face image;
[0132] The determining module 304 is used to determine the facial pose angle of the target facial image based on the rotation matrix.
[0133] Optionally, the above-mentioned device further includes:
[0134] The first acquisition submodule is used to acquire a first face angle sample set and a face pose prediction model to be trained. The face pose prediction model to be trained includes a feature extraction network to be trained and a feature transformation network to be trained. The first face angle sample set includes a first sample face image and a face angle label corresponding to the first sample face image.
[0135] The first conversion submodule is used to convert the face angle label corresponding to the first sample face image into a rotation matrix according to a preset conversion strategy, so as to obtain the rotation matrix label corresponding to the first sample face image.
[0136] The first training submodule is used to iteratively train the face pose prediction model to be trained based on the first sample face image and the rotation matrix label corresponding to the first sample face image, and obtain the trained face pose prediction model after the iterative training is completed.
[0137] Optionally, the above-mentioned device further includes:
[0138] The second acquisition submodule is used to acquire a second face angle sample set and a face pose prediction model to be trained. The face pose prediction model includes a feature extraction network to be trained and a feature transformation network to be trained. The second face angle sample set includes a second sample face image, a third sample face image, and face angle labels corresponding to the second sample face image.
[0139] The second conversion submodule is used to convert the face angle label corresponding to the second sample face image into a rotation matrix according to a preset conversion strategy, so as to obtain the rotation matrix label corresponding to the second sample face image.
[0140] The first determining submodule is used to determine a first loss value based on the second sample face image and the rotation matrix label corresponding to the second sample face image;
[0141] The second determination submodule is used to determine a second loss value based on the third sample face image;
[0142] The second training submodule is used to iteratively train the face pose prediction model to be trained based on the first loss value and the second loss value, and obtain the trained face pose prediction model after the iterative training is completed.
[0143] Optionally, the first determining submodule mentioned above includes:
[0144] The first processing unit is used to input the second sample face image into the preset feature extraction network for processing, so as to obtain the face angle features of the second sample face image;
[0145] The second processing unit is used to input the facial angle features of the second sample face image into the feature transformation network to be trained for processing, so as to obtain the prediction rotation matrix of the second sample face image.
[0146] The first calculation unit is used to calculate the error loss between the predicted rotation matrix of the second sample face image and the rotation matrix label corresponding to the second sample face image, and obtain a first loss value.
[0147] Optionally, the second determining submodule mentioned above also includes:
[0148] The first processing subunit is used to perform data augmentation processing on the third sample face image using any two different image augmentation methods to obtain a first augmented image and a second augmented image.
[0149] The second processing subunit is used to input the first augmented image and the second augmented image into the preset feature extraction network for processing, so as to obtain the face angle features of the first augmented image and the face angle features of the second augmented image respectively.
[0150] The third processing subunit is used to input the face angle features of the first augmented image and the face angle features of the second augmented image into the feature transformation network to be trained for processing, so as to obtain the prediction rotation matrix of the first augmented image and the prediction rotation matrix of the second augmented image respectively.
[0151] The first calculation subunit is used to calculate the error loss between the prediction rotation matrix of the first augmented image and the prediction rotation matrix of the second augmented image to obtain a second loss value.
[0152] Optionally, the second training submodule mentioned above also includes:
[0153] The first determining subunit is used to determine the total loss value based on the first loss value and the second loss value;
[0154] The first adjustment subunit is used to adjust the parameters of the face pose prediction model to be trained through the backpropagation algorithm with the goal of minimizing the total loss value, and to iterate the parameter adjustment process.
[0155] The first training subunit is used to stop training when the number of iterations is greater than or equal to the number of predictions, thus obtaining a well-trained face pose prediction model.
[0156] Optionally, the second processing module 303 further includes:
[0157] The first processing submodule is used to segment the facial angle features through a preset feature transformation network to obtain a first sub-feature and a second sub-feature.
[0158] The third acquisition submodule is used to perform a first feature conversion process on the first sub-feature and the second sub-feature to obtain the third sub-feature;
[0159] The fourth acquisition submodule is used to perform a second feature transformation process on the first sub-feature, the second sub-feature, and the third sub-feature to obtain the rotation matrix of the target face image.
[0160] like Figure 4 As shown, this embodiment of the invention also provides an electronic device, characterized in that it includes a processor, which can execute any of the above-mentioned face pose estimation methods.
[0161] Specifically, it includes a processor 401 and a memory 402, as well as a computer program stored in the memory 402 and capable of running on the processor 401 that performs a face pose estimation method, wherein:
[0162] The processor 401 executes the calculator program for the face pose estimation method stored in the memory 402, and performs the following steps:
[0163] Acquire a target face image and a trained face pose prediction model, wherein the trained face pose prediction model includes a preset feature extraction network and a preset feature transformation network;
[0164] The target face image is processed by the preset feature extraction network to obtain the face angle features of the target face image;
[0165] The facial angle features are processed by the preset feature transformation network to obtain the rotation matrix of the target facial image;
[0166] Based on the rotation matrix, the facial pose angle of the target face image is determined.
[0167] Optionally, the face pose estimation method is characterized in that, before performing feature transformation processing on the face angle features through the preset feature transformation network to obtain the rotation matrix of the target face image, the processor 401 further performs the following steps:
[0168] Obtain a first face angle sample set and a face pose prediction model to be trained. The face pose prediction model to be trained includes a feature extraction network to be trained and a feature transformation network to be trained. The first face angle sample set includes a first sample face image and a face angle label corresponding to the first sample face image.
[0169] According to the preset conversion strategy, the face angle label corresponding to the first sample face image is converted into a rotation matrix to obtain the rotation matrix label corresponding to the first sample face image;
[0170] Based on the first sample face image and the rotation matrix label corresponding to the first sample face image, the face pose prediction model to be trained is iteratively trained, and the trained face pose prediction model is obtained after the iterative training is completed.
[0171] Optionally, in the face pose estimation method, before performing feature transformation processing on the face angle features through the preset feature transformation network to obtain the rotation matrix of the target face image, the processor 401 further executes the method, including:
[0172] Obtain a second face angle sample set and a face pose prediction model to be trained. The face pose prediction model to be trained includes a feature extraction network to be trained and a feature transformation network to be trained. The second face angle sample set includes a second sample face image, a third sample face image, and face angle labels corresponding to the second sample face image.
[0173] According to the preset conversion strategy, the face angle label corresponding to the second sample face image is converted into a rotation matrix to obtain the rotation matrix label corresponding to the second sample face image;
[0174] Based on the second sample face image and the rotation matrix label corresponding to the second sample face image, a first loss value is determined;
[0175] A second loss value is determined based on the third sample face image;
[0176] The face pose prediction model to be trained is iteratively trained based on the first loss value and the second loss value, and a trained face pose prediction model is obtained after the iterative training is completed.
[0177] Optionally, the face pose estimation method is characterized in that the step of processor 401 determining the first loss value based on the second sample face image and the rotation matrix label corresponding to the second sample face image includes:
[0178] The second sample face image is input into the preset feature extraction network for processing to obtain the face angle features of the second sample face image;
[0179] The facial angle features of the second sample face image are input into the feature transformation network to be trained for processing to obtain the prediction rotation matrix of the second sample face image;
[0180] The error loss between the predicted rotation matrix of the second sample face image and the corresponding rotation matrix label of the second sample face image is calculated to obtain the first loss value.
[0181] Optionally, the face pose estimation method is characterized in that the step of processor 401 determining the second loss value based on the third sample face image includes:
[0182] The third sample face image is subjected to data augmentation processing by any two different image augmentation methods to obtain a first augmented image and a second augmented image.
[0183] The first augmented image and the second augmented image are respectively input into the preset feature extraction network for processing to obtain the face angle features of the first augmented image and the face angle features of the second augmented image.
[0184] The facial angle features of the first augmented image and the facial angle features of the second augmented image are respectively input into the feature transformation network to be trained for processing, so as to obtain the prediction rotation matrix of the first augmented image and the prediction rotation matrix of the second augmented image respectively.
[0185] The error loss between the predicted rotation matrix of the first augmented image and the predicted rotation matrix of the second augmented image is calculated to obtain the second loss value.
[0186] Optionally, the face pose estimation method is characterized in that the step of processor 401 performing iterative training on the face pose estimation model to be trained based on the first loss value and the second loss value, and obtaining the trained face pose estimation model after the iterative training is completed, includes:
[0187] Based on the first loss value and the second loss value, determine the total loss value;
[0188] With the goal of minimizing the total loss, the parameters of the face pose prediction model to be trained are adjusted using the backpropagation algorithm, and the parameter adjustment process is iterated.
[0189] Training stops when the number of iterations is greater than or equal to the number of predictions, and a well-trained face pose prediction model is obtained.
[0190] Optionally, the face pose estimation method is characterized in that the step of processor 401 performing feature transformation processing on the face angle features through a preset feature transformation network to obtain the rotation matrix of the target face image includes:
[0191] The facial angle features are segmented using a preset feature transformation network to obtain a first sub-feature and a second sub-feature;
[0192] The first sub-feature and the second sub-feature are subjected to a first feature transformation process to obtain the third sub-feature;
[0193] A second feature transformation process is performed on the first sub-feature, the second sub-feature, and the third sub-feature to obtain the rotation matrix of the target face image.
[0194] This invention also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the face pose estimation method or the application-side face pose estimation method provided in this invention, and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0195] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0196] The above description discloses only preferred embodiments of the present invention and should not be construed as limiting the scope of the present invention. Therefore, equivalent variations made in accordance with the claims of the present invention are still within the scope of the present invention.
Claims
1. A face pose estimation method, characterized in that, The method includes the following steps: Acquire a target face image and a trained face pose prediction model, wherein the trained face pose prediction model includes a preset feature extraction network and a preset feature transformation network; The target face image is processed by the preset feature extraction network to obtain the face angle features of the target face image; The facial angle features are processed by the preset feature transformation network to obtain the rotation matrix of the target facial image; Based on the rotation matrix, the facial pose angle of the target face image is determined; Before performing feature transformation processing on the facial angle features through the preset feature transformation network to obtain the rotation matrix of the target facial image, the method further includes: Obtain a second face angle sample set and a face pose prediction model to be trained. The face pose prediction model to be trained includes a feature extraction network to be trained and a feature transformation network to be trained. The second face angle sample set includes a second sample face image, a third sample face image, and face angle labels corresponding to the second sample face image. According to the preset conversion strategy, the face angle label corresponding to the second sample face image is converted into a rotation matrix to obtain the rotation matrix label corresponding to the second sample face image; Based on the second sample face image and the rotation matrix label corresponding to the second sample face image, a first loss value is determined by a first loss function; the first loss function is obtained by comparing the rotation matrix label of the second sample face image with the rotation matrix corresponding to the second sample face image. A second loss value is determined based on the third sample face image; specifically, based on the rotation matrix labels corresponding to the third sample face image and the second sample face image, a second loss function is used to determine the second loss value; the second loss function is obtained by repeatedly inputting the third sample face image into the feature extraction network to be trained, outputting the face angle features corresponding to the third sample face image, and then comparing the rotation matrix converted from the face angle features corresponding to the third sample face image with the rotation matrix labels of the second sample face image; The face pose prediction model to be trained is iteratively trained based on the first loss value and the second loss value, and a trained face pose prediction model is obtained after the iterative training is completed.
2. The method of Claim 1, wherein, Before performing feature transformation processing on the facial angle features through the preset feature transformation network to obtain the rotation matrix of the target facial image, the method further includes: Obtain a first face angle sample set and a face pose prediction model to be trained. The face pose prediction model to be trained includes a feature extraction network to be trained and a feature transformation network to be trained. The first face angle sample set includes a first sample face image and a face angle label corresponding to the first sample face image. According to the preset conversion strategy, the face angle label corresponding to the first sample face image is converted into a rotation matrix to obtain the rotation matrix label corresponding to the first sample face image; Based on the first sample face image and the rotation matrix label corresponding to the first sample face image, the face pose prediction model to be trained is iteratively trained, and the trained face pose prediction model is obtained after the iterative training is completed. 3.The face pose estimation method of claim 1, wherein, The step of determining the first loss value based on the second sample face image and the rotation matrix label corresponding to the second sample face image includes: The second sample face image is input into the preset feature extraction network for processing to obtain the face angle features of the second sample face image; The facial angle features of the second sample face image are input into the feature transformation network to be trained for processing to obtain the prediction rotation matrix of the second sample face image; The error loss between the predicted rotation matrix of the second sample face image and the corresponding rotation matrix label of the second sample face image is calculated to obtain the first loss value. 4.The face pose estimation method of claim 1, wherein, Determining the second loss value based on the third sample face image includes: The third sample face image is subjected to data augmentation processing by any two different image augmentation methods to obtain a first augmented image and a second augmented image. The first augmented image and the second augmented image are respectively input into the preset feature extraction network for processing to obtain the face angle features of the first augmented image and the face angle features of the second augmented image. The facial angle features of the first augmented image and the facial angle features of the second augmented image are respectively input into the feature transformation network to be trained for processing, so as to obtain the prediction rotation matrix of the first augmented image and the prediction rotation matrix of the second augmented image respectively. The error loss between the predicted rotation matrix of the first augmented image and the predicted rotation matrix of the second augmented image is calculated to obtain the second loss value. 5.The face pose estimation method of claim 1, wherein, The step of iteratively training the face pose prediction model to be trained based on the first loss value and the second loss value, and obtaining the trained face pose prediction model after the iterative training is completed, includes: Based on the first loss value and the second loss value, determine the total loss value; With the goal of minimizing the total loss, the parameters of the face pose prediction model to be trained are adjusted using the backpropagation algorithm, and the parameter adjustment process is iterated. Training stops when the number of iterations is greater than or equal to the number of predictions, and a well-trained face pose prediction model is obtained. 6.The face pose estimation method of claim 1, wherein, The step of performing feature transformation processing on the facial angle features through a preset feature transformation network to obtain the rotation matrix of the target facial image includes: The facial angle features are segmented using a preset feature transformation network to obtain a first sub-feature and a second sub-feature; The first sub-feature and the second sub-feature are subjected to a first feature transformation process to obtain the third sub-feature; A second feature transformation process is performed on the first sub-feature, the second sub-feature, and the third sub-feature to obtain the rotation matrix of the target face image.
7. A human face pose estimation apparatus, comprising: The face pose estimation device includes: The acquisition module is used to acquire the target face image and the trained face pose prediction model. The trained face pose prediction model includes a preset feature extraction network and a preset feature transformation network. The first processing module is used to perform feature extraction processing on the target face image through the preset feature extraction network to obtain the face angle features of the target face image; The second processing module is used to perform feature transformation processing on the face angle features through the preset feature transformation network to obtain the rotation matrix of the target face image; The determining module is used to determine the facial pose angle of the target facial image based on the rotation matrix; The face pose estimation device also includes: The second acquisition submodule is used to acquire a second face angle sample set and a face pose prediction model to be trained. The face pose prediction model to be trained includes a feature extraction network to be trained and a feature transformation network to be trained. The second face angle sample set includes a second sample face image, a third sample face image, and face angle labels corresponding to the second sample face image. The second conversion submodule is used to convert the face angle label corresponding to the second sample face image into a rotation matrix according to a preset conversion strategy, so as to obtain the rotation matrix label corresponding to the second sample face image. The first determining submodule is used to determine a first loss value based on the second sample face image and the rotation matrix label corresponding to the second sample face image, using a first loss function; the first loss function is obtained by comparing the rotation matrix label of the second sample face image with the rotation matrix corresponding to the second sample face image. The second determining submodule is used to determine a second loss value based on the third sample face image. Specifically, based on the rotation matrix labels corresponding to the third sample face image and the second sample face image, the second loss value is determined through a second loss function. The second loss function is obtained by repeatedly inputting the third sample face image into the feature extraction network to be trained, outputting the face angle features corresponding to the third sample face image, and then comparing the rotation matrix converted from the face angle features corresponding to the third sample face image with the rotation matrix labels of the second sample face image. The second training submodule is used to iteratively train the face pose prediction model to be trained based on the first loss value and the second loss value, and obtain the trained face pose prediction model after the iterative training is completed.
8. An electronic device, comprising: include: The method includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the steps of the face pose estimation method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the face pose estimation method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Model training and image processing method and device, equipment and storage medium
CN114359592A
Feature processing method, action positioning method, equipment and device
CN114463662A
Lightweight robust face alignment method and system based on multi-task learning
CN115205926A
Head posture estimation method and system
CN116612513A