Three-dimensional face reconstruction model training method and device and computer device

By training a 3D face reconstruction model using multi-angle sample face images, the problem of low accuracy caused by occlusion and deflection angles is solved, achieving high-precision and low-cost 3D face reconstruction.

CN114913284BActive Publication Date: 2025-11-28XIAMEN MEITUZHIJIA TECH
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210644895.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-08
Publication Date
2025-11-28
Estimated Expiration
2042-06-08

AI Technical Summary

Technical Problem

In existing 3D face reconstruction technologies, the reconstruction accuracy is low and the practicality is poor due to occlusions or deflection angles in 2D face images, and the cost is also high.

Method used

By acquiring multiple sample face images from different angles, a three-dimensional reconstructed face image is generated using an initial face reconstruction model. Based on the angle information, the image is projected into multiple projected face images. The loss information is determined, and the model is iteratively corrected until the preset conditions are met, thus generating the target face reconstruction model.

Benefits of technology

It improves the accuracy and practicality of 3D face reconstruction, reduces costs, and does not rely on depth information acquisition equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114913284B_ABST
    Figure CN114913284B_ABST
Patent Text Reader

Abstract

The application provides a three-dimensional face reconstruction model training method and device and a computer device, and belongs to the technical field of computers. The method comprises the following steps: acquiring a plurality of sample face images; inputting each sample face image into an initial face reconstruction model, and outputting a three-dimensional reconstructed face image from the initial face reconstruction model; projecting the three-dimensional reconstructed face image into a plurality of projected face images according to angle information of each sample face image; determining loss information of the initial face reconstruction model according to the sample face image, the three-dimensional reconstructed face image and the projected face image; iteratively correcting the initial face reconstruction model according to the loss information of the initial face reconstruction model until the initial face reconstruction model reaches a first preset condition to end the training, and taking the initial face reconstruction model that reaches the first preset condition as a target face reconstruction model. The application can improve the three-dimensional face reconstruction accuracy and practicability.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, in particular to a three-dimensional face reconstruction model training method and device and computer equipment. BACKGROUND

[0002] With the development of artificial intelligence technology, three-dimensional face reconstruction has been applied in many fields, such as security, film and television, etc. And three-dimensional face images can reflect more spatial information than two-dimensional face images.

[0003] In related technologies, in order to perform three-dimensional face reconstruction, two-dimensional face images are generally collected, and then the depth information of the face is calculated from the two-dimensional face images, and then the depth information is input into a pre-trained face generation network model to generate a reconstructed three-dimensional face image.

[0004] In actual application, the collected two-dimensional face images often have hair or other occlusions blocking the face, or the face in the two-dimensional face image often has a certain deflection angle, which may lack three-dimensional information data, resulting in the problem that the edges of the reconstructed three-dimensional face image cannot be fitted. Therefore, this scheme has the problems of low face reconstruction accuracy and poor practicability. SUMMARY

[0005] The purpose of the present application is to provide a three-dimensional face reconstruction model training method, device and computer equipment, which can improve the three-dimensional face reconstruction accuracy and practicability.

[0006] Embodiments of the present application are implemented as follows:

[0007] In a first aspect, a three-dimensional face reconstruction model training method is provided, comprising:

[0008] Obtaining a plurality of sample face images, each of the sample face images being a two-dimensional RGB image of the same sample face at different angles, and each of the sample face images being labeled with a plurality of initial face feature points;

[0009] Inputting each of the sample face images into an initial face reconstruction model, and outputting a three-dimensional reconstructed face image from the initial face reconstruction model, the three-dimensional reconstructed face image comprising a plurality of reconstructed face feature points;

[0010] According to the angle information of each of the sample face images, projecting the three-dimensional reconstructed face image into a plurality of projected face images, each of the projected face images having an angle consistent with that of each of the sample face images;

[0011] determine loss information of the initial face reconstruction model according to the sample face image, the three-dimensional reconstructed face image, and the projected face image;

[0012] perform iterative correction on the initial face reconstruction model according to the loss information of the initial face reconstruction model until the initial face reconstruction model reaches a first preset condition to end the training, and take the initial face reconstruction model that reaches the first preset condition as a target face reconstruction model.

[0013] Optionally, the inputting each sample face image into the initial face reconstruction model and outputting a three-dimensional reconstructed face image of each sample face image by the initial face reconstruction model comprises:

[0014] inputting each sample face image into the initial face reconstruction model, generating the reconstructed face feature point and the texture coefficient corresponding to the sample face according to the reconstructed face feature point and the texture coefficient, and generating the three-dimensional reconstructed face image.

[0015] Optionally, the generating the reconstructed face feature point and the texture coefficient corresponding to the sample face comprises:

[0016] generating a predicted position map corresponding to the sample face image by a regression sub-model in the initial face reconstruction model, and reconstructing the reconstructed face feature point corresponding to the sample face according to the predicted position map;

[0017] generating a texture initial coefficient corresponding to the sample face image by a coding and decoding sub-model in the initial face reconstruction model, and generating the texture coefficient according to the texture initial coefficient.

[0018] Optionally, the generating the three-dimensional reconstructed face image according to each reconstructed face feature point and the texture coefficient comprises:

[0019] generating an initial texture map corresponding to the sample face according to the texture coefficient;

[0020] inputting the initial texture map into an adversarial sub-network of the initial face reconstruction model for iterative correction until the initial texture map meets a second preset condition, and taking the initial texture map that meets the second preset condition as a reconstructed texture map;

[0021] performing a rendering operation according to each reconstructed face feature point and the reconstructed texture map to generate the three-dimensional reconstructed face image.

[0022] Optionally, the determining the loss information of the initial face reconstruction model according to the sample face image, the three-dimensional reconstructed face image, and the projected face image comprises:

[0023] determine consistency information between each of the projected face images and each of the sample face images, to obtain a first loss result;

[0024] determine difference information between a position of a reconstructed face feature point located at an edge of the three-dimensional reconstructed face image and a position of an initial face feature point located at an edge of the sample face image, to obtain a third loss result;

[0025] determine difference information between a position of a reconstructed face feature point located at an edge of the three-dimensional reconstructed face image and a position of an initial face feature point located at an edge of the sample face image, to obtain a third loss result;

[0026] generate a plurality of transformation matrices according to each vertex in the three-dimensional reconstructed face image corresponding to each of the sample face images;

[0027] determine difference information between each vertex in the three-dimensional reconstructed face image reconstructed by each of the sample face images according to the plurality of transformation matrices, to obtain a fourth loss result;

[0028] obtain loss information of the initial face reconstruction model according to the first loss result, the second loss result, the third loss result, and the fourth loss result.

[0029] Optionally, the determining the difference information between each of the projected face images according to the plurality of transformation matrices to obtain the fourth loss result comprises:

[0030] respectively calculate a product result of each vertex in the three-dimensional reconstructed face image corresponding to each of the sample face images and an inverse matrix of the transformation matrix corresponding to each of the sample face images;

[0031] calculate the difference information between each of the projected face images according to the product result, to obtain the fourth loss result.

[0032] Optionally, the method comprises:

[0033] obtain a plurality of face images, each of the face images being a two-dimensional image of a same face under different angles;

[0034] input each of the face images into a target face reconstruction model trained in advance to obtain a target reconstructed three-dimensional face image, the target face reconstruction model being trained based on the method of the first aspect.

[0035] A second aspect of the embodiment of the application provides a three-dimensional face reconstruction model training device, the device comprising:

[0036] an obtaining module configured to obtain a plurality of sample face images;

[0037] an input / output module configured to input each of the sample face images into an initial face reconstruction model, and output a three-dimensional reconstructed face image from the initial face reconstruction model;

[0038] a projection module configured to project the three-dimensional reconstructed face image into a plurality of projected face images according to angle information of each of the sample face images;

[0039] a determination module configured to determine loss information of the initial face reconstruction model according to the sample face images, the three-dimensional reconstructed face image, and the projected face images;

[0040] an iterative correction module configured to iteratively correct the initial face reconstruction model according to the loss information of the initial face reconstruction model until the initial face reconstruction model reaches a first preset condition to end the training, and take the initial face reconstruction model that reaches the first preset condition as a target face reconstruction model.

[0041] In a third aspect, a computer device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program, when executed by the processor, implements the three-dimensional face reconstruction model training method of the first aspect.

[0042] In a fourth aspect, a computer readable storage medium is provided, which stores a computer program, and the computer program, when executed by a processor, implements the three-dimensional face reconstruction model training method of the first aspect.

[0043] The embodiments of the present application have the following beneficial effects:

[0044] The three-dimensional face reconstruction model training method provided by the embodiments of the present application includes the following steps: obtaining a plurality of sample face images; inputting each of the sample face images into an initial face reconstruction model, and outputting a three-dimensional reconstructed face image from the initial face reconstruction model; projecting the three-dimensional reconstructed face image into a plurality of projected face images according to angle information of each of the sample face images; determining loss information of the initial face reconstruction model according to each of the sample face images, the three-dimensional reconstructed face image, and each of the projected face images; iteratively correcting the initial face reconstruction model according to the loss information of the initial face reconstruction model until the initial face reconstruction model reaches a first preset condition to end the training; and taking the initial face reconstruction model that reaches the first preset condition as a target face reconstruction model.

[0045] According to the angle information of each sample face image, the three-dimensional reconstructed face image is projected into a plurality of projected face images, so that the three-dimensional reconstructed face image can be converted into a two-dimensional image or a two-dimensional RGB image again, and compared with each sample face image, so as to determine the difference between the three-dimensional reconstructed face image generated by the initial face reconstruction model and each sample face image. That is, even if the sample face in each sample face image has a deflection angle or an occlusion in the image blocks the face, the three-dimensional reconstructed face image can be projected into a plurality of projected face images to calculate the loss information with each sample face image, so as to ensure that the edges of the reconstructed three-dimensional face image can be fitted, thereby improving the accuracy of training the initial face reconstruction model.

[0046] In addition, the three-dimensional face image is reconstructed by a plurality of two-dimensional sample face images at different angles, so that the plurality of two-dimensional sample face images at different angles can provide more three-dimensional information data for reconstructing the three-dimensional face image. Then, the loss information of the initial face reconstruction model is calculated by the three-dimensional face image and the plurality of two-dimensional face images, and the initial face reconstruction model is iteratively corrected by the loss information, which can effectively reduce the error of the initial face reconstruction model output, and further improve the accuracy of the initial face reconstruction model.

[0047] In this way, the error of the three-dimensional face reconstruction model can be effectively reduced, and the accuracy of the three-dimensional face reconstruction model can be improved.

[0048] In addition, in the case of reconstructing a three-dimensional face image by a trained face reconstruction model, more three-dimensional information data for reconstructing a three-dimensional face image can be obtained by a plurality of two-dimensional face images at different angles to ensure that the edges of the reconstructed three-dimensional face image can be fitted, so that the three-dimensional face reconstruction accuracy and practicability can be improved. BRIEF DESCRIPTION OF DRAWINGS

[0049] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed in the embodiments. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can also be obtained without creative labor.

[0050] Figure 1 Flow chart of the first three-dimensional face reconstruction model training method provided by the embodiments of the present application;

[0051] Figure 2 Flow chart of the second three-dimensional face reconstruction model training method provided by the embodiments of the present application;

[0052] Figure 3 A flowchart of a third three-dimensional face reconstruction model training method provided for an embodiment of the present application is shown in FIG. 3;

[0053] Figure 4 A flowchart of a fourth three-dimensional face reconstruction model training method provided for an embodiment of the present application is shown in FIG. 4;

[0054] Figure 5 A flowchart of a fifth three-dimensional face reconstruction model training method provided for an embodiment of the present application is shown in FIG. 5;

[0055] Figure 6 A flowchart of a sixth three-dimensional face reconstruction model training method provided for an embodiment of the present application is shown in FIG. 6;

[0056] Figure 7 A flowchart of a seventh three-dimensional face reconstruction model training method provided for an embodiment of the present application is shown in FIG. 7;

[0057] Figure 8 A structural schematic diagram of a three-dimensional face reconstruction model training method device provided for an embodiment of the present application is shown in FIG. 8;

[0058] Figure 9 A structural schematic diagram of a computer device provided for an embodiment of the present application is shown in FIG. 9. DETAILED DESCRIPTION

[0059] In order to make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described below in connection with the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments of the present application. The components of the embodiments of the present application described and shown in the drawings herein can be arranged and designed in various different configurations.

[0060] Therefore, the detailed description of the embodiments of the present application provided below in the drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without making creative efforts, fall within the scope of protection of the present application.

[0061] In the related art, in order to perform three-dimensional face reconstruction, a two-dimensional face image is often collected, and then the depth information of the face is calculated from the two-dimensional face image, and then the depth information is input into a pre-trained face generation network model to generate a reconstructed three-dimensional face image. However, in actual application, the two-dimensional face image collected often has a face obscured by hair or the face in the two-dimensional face image often has a certain deflection angle, which may lack three-dimensional information data, resulting in a problem that the edge of the reconstructed three-dimensional face image cannot be fitted, and some three-dimensional face reconstruction schemes currently applied only collect a single two-dimensional face image to perform three-dimensional face reconstruction. Therefore, such a scheme has problems of low face reconstruction accuracy and poor practicability. In addition, in order to obtain the depth information of the face, an expensive optical device also needs to be used, which results in a problem of high cost of the scheme in the related art.

[0062] Therefore, an embodiment of the present application provides a three-dimensional face reconstruction model training method. A plurality of sample face images are obtained, each sample face image is input into an initial face reconstruction model, a three-dimensional reconstructed face image is output from the initial face reconstruction model, the three-dimensional reconstructed face image is projected into a plurality of projected face images according to the angle information of each sample face image, the loss information of the initial face reconstruction model is determined according to the sample face image, the three-dimensional reconstructed face image, and the projected face image, the initial face reconstruction model is iteratively corrected according to the loss information of the initial face reconstruction model, and the training is ended until the initial face reconstruction model reaches a first preset condition. The initial face reconstruction model that reaches the first preset condition is used as a target face reconstruction model, which can improve the face reconstruction accuracy and practicability. In addition, since the three-dimensional face reconstruction model training method provided by the embodiment of the present application does not need to perform face reconstruction by using the depth information of the sample face image, an optical device for collecting or calculating the depth information is not needed, so that the cost of three-dimensional face reconstruction can be reduced.

[0063] An embodiment of the present application takes a three-dimensional face reconstruction model training method applied in a computer device as an example for description. However, it does not mean that the embodiment of the present application can only be applied to the three-dimensional face reconstruction model training in the computer device.

[0064] It should be noted that the three-dimensional face reconstruction model training method provided by the embodiment of the present application can be applied in various computer devices, and can be implemented in various forms to realize the function of training a three-dimensional face reconstruction model or reconstructing a three-dimensional face.

[0065] Optionally, the computer device can be a computer, a smart phone, a tablet computer, a smart game console, a server, and other arbitrary devices with processing function. The embodiment of the present application does not limit this.

[0066] In addition, the computer device can also have a photographing and video shooting function, and the function is used to collect images and execute the method steps of the present application. Alternatively, the device can also be connected in communication with other devices having a photographing and video shooting function, and the images are obtained from the devices having a photographing and video shooting function and the method steps of the present application are executed. The embodiments of the present application do not limit this.

[0067] Exemplarily, the three-dimensional face reconstruction model training method provided by the embodiments of the present application can be applied to a computer device based on an Android system, and the code for implementing the operations or steps required by the above-mentioned three-dimensional face reconstruction model training method can be written into an application program in APK format. In response to a corresponding instruction or request, the function of training a three-dimensional face reconstruction model or performing three-dimensional face reconstruction is realized by running the application program in APK format.

[0068] Naturally, the three-dimensional face reconstruction model training method provided by the embodiments of the present application can be applied to a computer device based on an IOS, Windows system, Mac OS, Linux system, etc. Correspondingly, the code for implementing the operations or steps required by the above-mentioned three-dimensional face reconstruction model training method can be written into an application program in IPA, EXE, PE, ELF, etc. The embodiments of the present application do not limit this.

[0069] The three-dimensional face reconstruction model training method provided by the embodiments of the present application is explained and described in detail as follows.

[0070] Figure 1 A flowchart of a three-dimensional face reconstruction model training method provided by the present application is shown in FIG. 1. The method can be applied to a computer device, which can be the computer device described above. Referring to FIG. 1, the three-dimensional face reconstruction model training method provided by the embodiments of the present application includes the following steps. Figure 1 The three-dimensional face reconstruction model training method provided by the embodiments of the present application includes the following steps.

[0071] Step 1001: Obtain multiple sample face images.

[0072] Optionally, each sample face image is a two-dimensional Red-Green-Blue (RGB) image of the same sample face at different angles.

[0073] Exemplarily, three sample face images can be obtained to train a three-dimensional face reconstruction model. Specifically, the three sample face images can be a front two-dimensional RGB image, a left side two-dimensional RGB image and a right side two-dimensional RGB image of the same sample face, respectively.

[0074] Of course, other quantities of sample face images can also be obtained to train the three-dimensional face reconstruction model. In addition, each sample face image can also be a two-dimensional RGB image of the sample face at any angle, for example, each sample face image can also include a top two-dimensional RGB image or a bottom two-dimensional RGB image of the sample face. The actual needs can be adjusted specifically, and the embodiments of the present application are not limited thereto.

[0075] In addition, the sample face refers to the face in each sample face image, and the sample face is used to train the three-dimensional face reconstruction model.

[0076] Optionally, a plurality of initial face feature points can be labeled in each sample face image, and each sample face image can also have a corresponding position map, which can be a UV position map. The position map indicates the position of each point in each sample face image.

[0077] It is worth noting that each initial face feature point can be used to indicate the region of the sample face and the point of the feature of the sample face existing in each sample face image, for example, it can be used to indicate the contour or shape of the sample face and the position or contour or shape of the features in the sample face. In addition, each initial face feature point in each sample face image can be labeled in advance by a related technical person, and the number of initial face feature points labeled in each sample face image can be more, which can improve the accuracy of training the three-dimensional face reconstruction model.

[0078] Step 1002: input each sample face image into the initial face reconstruction model, and output a three-dimensional reconstructed face image from the initial face reconstruction model.

[0079] Optionally, the initial face reconstruction model can refer to a face reconstruction model that has not been trained.

[0080] Optionally, the initial face reconstruction model can include a plurality of sub-models and sub-networks for implementing different functions.

[0081] Optionally, the three-dimensional reconstructed face image is a three-dimensional image generated by the initial face reconstruction model according to the plurality of sample face images.

[0082] In addition, the three-dimensional reconstructed face image includes a plurality of reconstructed face feature points.

[0083] Each reconstructed face feature point can be one-to-one corresponding to each initial face feature point, and each reconstructed face feature point is used to indicate the contour or shape of the sample face and the position or contour or shape of the features in the sample face in the three-dimensional reconstructed face image.

[0084] In this way, a three-dimensional face image can be generated according to the obtained two-dimensional sample face images, so as to facilitate subsequent training of the initial face reconstruction model according to the three-dimensional reconstructed face image and the sample face images.

[0085] Step 1003: Projecting the three-dimensional reconstructed face image into a plurality of projected face images according to the angle information of the sample face images.

[0086] Optionally, the angles of the projected face images are respectively consistent with the angles of the sample face images.

[0087] Optionally, the angle information of the sample face images can be the deflection angles of the sample faces in the sample face images.

[0088] For example, it is assumed that three sample face images are obtained in step 1001, and the three sample face images are respectively a front image, a left side image and a right side image of the same sample face. Then, the angle information can be the deflection angles of the sample faces in the sample face images relative to the front.

[0089] For example, the front of the sample face can be taken as the positive direction, then the angle information of the sample face image including the front image of the sample face can be 0°, the angle information of the sample face image including the left image of the sample face can be -45°, and the angle information of the sample face image including the right image of the sample face can be 45°. Of course, the specific angle values herein are only for example and do not mean that the angle information can only be 0°, -45° or 45°.

[0090] Optionally, the operation of projecting the three-dimensional reconstructed face image can be projecting the three-dimensional reconstructed face image onto each sample face image according to the angle information, or projecting the three-dimensional reconstructed face image onto any two-dimensional plane according to the angle information. The embodiments of the present application do not limit this.

[0091] It is worth noting that by projecting the three-dimensional reconstructed face image into a plurality of projected face images, the three-dimensional reconstructed face image can be converted into a two-dimensional image or a two-dimensional RGB image, which can be compared with the sample face images, so as to determine the difference between the three-dimensional reconstructed face image generated by the initial face reconstruction model and the sample face images. In this way, the accuracy of training the initial face reconstruction model can be improved, and the accuracy of generating a three-dimensional reconstructed face image by the initial face reconstruction model can be improved.

[0092] Step 1004: Determining the loss information of the initial face reconstruction model according to the sample face images, the three-dimensional reconstructed face image and the projected face images.

[0093] Optionally, the loss information of the initial face reconstruction model can be determined by comparing the difference between each sample face image and the three-dimensional reconstructed face image, or the difference between each sample face image and each projected face image, or the difference between the three-dimensional reconstructed face image and each projected face image.

[0094] Optionally, the loss information is information for representing the loss or difference between the input and output of the initial face reconstruction model.

[0095] Specifically, the loss information can be used to represent the difference between the three-dimensional reconstructed face image output by the initial face reconstruction model and each sample face image input to the initial face reconstruction model.

[0096] Illustratively, the parameters in the initial face reconstruction model can be adjusted according to the loss information. Wherein, the operation of adjusting the parameters in the initial face reconstruction model according to the loss information can refer to related technologies, and the embodiments of the present application do not make a detailed elaboration.

[0097] Step 1005: iteratively correcting the initial face reconstruction model according to the loss information of the initial face reconstruction model until the initial face reconstruction model reaches a first preset condition to end the training, and taking the initial face reconstruction model reaching the first preset condition as a target face reconstruction model.

[0098] Optionally, the first preset condition can be set by a related technical person in advance. The first preset condition can be that the initial face reconstruction model is trained to reach a certain number of iterations, such as 500 times, and of course can be other possible numbers. The first preset condition can also be that the loss information is less than a certain threshold. The embodiments of the present application do not make a limitation.

[0099] Optionally, the target face reconstruction model is the initial face reconstruction model that has reached the first preset condition, that is, the target face reconstruction model is a trained model, and all parameters are fixed and will not change.

[0100] It is worth noting that since the loss information represents the difference between the three-dimensional face image output by the initial face reconstruction model and each sample face image, or the difference between each sample face image and each sample face image, the initial face reconstruction model can be iteratively corrected by the loss information, which can effectively reduce the error of the initial face reconstruction model output, and further improve the accuracy of the initial face reconstruction model.

[0101] It is worth noting that the initial face reconstruction model can be effectively reduced in error by iterative correction of the loss information, thereby improving the accuracy of the initial face reconstruction model and the target face reconstruction model. Therefore, in the case of reconstructing a three-dimensional face image through the target face reconstruction model, the effect of improving the three-dimensional face reconstruction accuracy and practicability can be achieved.

[0102] In the embodiments of the present application, by obtaining multiple sample face images, inputting each sample face image into an initial face reconstruction model, outputting a three-dimensional reconstructed face image from the initial face reconstruction model, projecting the three-dimensional reconstructed face image into multiple projected face images according to the angle information of each sample face image, determining the loss information of the initial face reconstruction model according to each sample face image, the three-dimensional reconstructed face image and each projected face image, iteratively correcting the initial face reconstruction model according to the loss information of the initial face reconstruction model, and ending the training until the initial face reconstruction model reaches a first preset condition, the initial face reconstruction model that reaches the first preset condition is used as a target face reconstruction model.

[0103] According to the angle information of each sample face image, the three-dimensional reconstructed face image can be converted into a two-dimensional image or a two-dimensional RGB image again, which can be compared with each sample face image to determine the difference between the three-dimensional reconstructed face image generated by the initial face reconstruction model and each sample face image. That is, even if the sample face in each sample face image has a deflection angle or the face is blocked by an occlusion in the image, the loss information calculation between the three-dimensional reconstructed face image and each sample face image can be performed by projecting the three-dimensional reconstructed face image into multiple projected face images, to ensure that the edges of the reconstructed three-dimensional reconstructed face image can be fitted, so that the accuracy of training the initial face reconstruction model can be improved.

[0104] In addition, by reconstructing a three-dimensional face image from multiple two-dimensional sample face images at different angles, the multiple two-dimensional sample face images at different angles can provide more three-dimensional information data for reconstructing a three-dimensional face image. Then, the loss information of the initial face reconstruction model is calculated through the three-dimensional face image and multiple two-dimensional face images, and the initial face reconstruction model is iteratively corrected through the loss information, which can effectively reduce the error of the initial face reconstruction model output, thereby improving the accuracy of the initial face reconstruction model.

[0105] In this way, the error of the three-dimensional face reconstruction model can be effectively reduced, thereby improving the accuracy of the three-dimensional face reconstruction model.

[0106] In addition, in the case of reconstructing a three-dimensional face image by using the trained face reconstruction model, more three-dimensional information data for reconstructing the three-dimensional face image can be obtained from the two-dimensional face images under multiple angles to ensure that the edges of the reconstructed three-dimensional face image can be fitted, so that the three-dimensional face reconstruction accuracy and practicability can be improved.

[0107] In actual application, after step 1004 is performed, the following steps can also be performed:

[0108] It is judged whether the initial face reconstruction model reaches the first preset condition. If the initial face reconstruction model does not reach the first preset condition, step A is performed. If the initial face reconstruction model reaches the first preset condition, step B is performed.

[0109] Step A: The initial face reconstruction model is iteratively corrected according to the loss information of the initial face reconstruction model.

[0110] Step B: The training is ended, and the initial face reconstruction model reaching the first preset condition is taken as a target face reconstruction model.

[0111] It can be seen that after step 1004 is performed, it is first judged whether the initial face reconstruction model reaches the first preset condition, and only one of step A or step B is performed.

[0112] In this way, the initial face reconstruction model can be iteratively corrected continuously when the initial face reconstruction model does not reach the first preset condition, so as to ensure that the difference between the three-dimensional face reconstruction image generated by the initial face reconstruction model and each sample face image is small. In addition, the training is ended in time when the initial face reconstruction model reaches the first preset condition, so as to avoid occupying the memory resources of the computer device and increasing the processing pressure of the computer device. In this way, the practicability of the three-dimensional face reconstruction model training method can be improved.

[0113] In order to improve the accuracy of the three-dimensional face reconstruction model by iterative correction, each sample face image needs to be accurately generated into a corresponding three-dimensional reconstruction face image. In a possible implementation manner provided by the embodiments of the present application, on the basis of the prior art, referring to the prior art, each sample face image is input into an initial face reconstruction model, and the initial face reconstruction model outputs a three-dimensional reconstruction face image of each sample face image, which includes: Figure 1 Figure 2 The initial face reconstruction model is input with each sample face image, and the initial face reconstruction model outputs a three-dimensional reconstruction face image of each sample face image, which includes:

[0114] Step 1006: Each sample face image is input into the initial face reconstruction model to generate the reconstruction face feature points and the texture coefficients corresponding to the sample face, and the three-dimensional reconstruction face image is generated according to the reconstruction face feature points and the texture coefficients.

[0115] ​Optionally, the number of the reconstructed facial feature points can be multiple, and the number of the reconstructed facial feature points can be set to be more.

[0116] It is worth noting that, according to the above embodiment, each sample face image has a corresponding UV position map. By inputting each sample face image into the initial face reconstruction model, each reconstructed facial feature point is generated through the UV position map of each sample face image, and the texture coefficient of each sample face image is generated. Then, the three-dimensional reconstructed face image is generated according to the reconstructed facial feature point and the texture coefficient. In this way, the corresponding three-dimensional reconstructed face image can be accurately generated according to each sample face image, which facilitates the subsequent step of iteratively correcting the initial face reconstruction model.

[0117] In a possible implementation, in order to accurately generate the reconstructed facial feature point and the texture coefficient corresponding to the sample face, the initial face reconstruction model can include a regression sub-network for generating a predicted position map corresponding to the sample face image, and a coding and decoding sub-model for generating the texture coefficient. Figure 2 Based on Figure 3 , the reconstructed facial feature point and the texture coefficient corresponding to the sample face are generated, including:

[0118] Step 1007: The regression sub-model in the initial face reconstruction model generates a predicted position map corresponding to each sample face image, and reconstructs the reconstructed facial feature point corresponding to the sample face according to the predicted position map.

[0119] Optionally, the regression sub-model can be a Quantile Regression Neural Network (QRNN) model. The present embodiment is not limited thereto.

[0120] Optionally, the predicted position map can be a UV position map corresponding to each sample face image generated by the regression sub-model. The predicted position map can indicate three-dimensional facial feature points corresponding to each initial facial feature point. According to these three-dimensional facial feature points, each reconstructed facial feature point corresponding to the sample face can be reconstructed.

[0121] Step 1008: The coding and decoding sub-model in the initial face reconstruction model generates a texture initial coefficient corresponding to each sample face image, and generates the texture coefficient according to each texture initial coefficient.

[0122] Optionally, the coding and decoding sub-model can be a Transformer model.

[0123] Exemplarily, after inputting each sample face image into the initial face reconstruction model, the encoding and decoding sub-model can respectively output initial texture coefficients corresponding to each sample face image, and the specific steps of generating the texture coefficient according to each initial texture coefficient can be as follows:

[0124] calculating the average value of each initial texture coefficient, and taking the average value of each initial texture coefficient as the texture coefficient.

[0125] Exemplarily, the texture coefficient can be generated by the following formula (1) taking three sample face images as an example.

[0126]

[0127] wherein, δ tex is the texture coefficient, N is the number of sample face images, i is used to represent the i-th sample face image, and δ tex,i is the initial texture coefficient of the i-th sample face image.

[0128] In addition, the specific steps of generating the texture coefficient according to each initial texture coefficient can also be as follows:

[0129] weighting and summing each initial texture coefficient, dividing the sum value obtained by weighting and summing by the number of sample face images, and taking the quotient obtained as the texture coefficient.

[0130] Naturally, the texture coefficient can also be generated by any other possible way. The embodiments of the present application do not limit this.

[0131] In a possible implementation manner, in order to accurately generate the three-dimensional reconstructed face image, referring to Figure 4 , the three-dimensional reconstructed face image is generated according to each reconstructed face feature point and the texture coefficient, including:

[0132] Step 1009: generating an initial texture map corresponding to the sample face according to the texture coefficient.

[0133] Optionally, the initial texture map can be generated by the encoding and decoding sub-model according to the texture coefficient.

[0134] Exemplarily, the initial texture map can be generated by the following formula (2).

[0135]

[0136] wherein, T 3DMM is the initial texture map, is the average texture of the three-dimensional face image set in advance, and U texis a feature vector obtained by principal component analysis (PCA).

[0137] It is worth noting that the feature vector is a feature vector of a covariance matrix of a three-dimensional face image set in advance. The feature vector is used to generate the discriminative characteristics of each face in combination with the corresponding weight parameters, and is added to the average texture to obtain the texture map of each face.

[0138] Step 1010: inputting the initial texture map into the adversarial subnetwork of the initial face reconstruction model for iterative correction until the initial texture map meets the second preset condition, and taking the initial texture map meeting the second preset condition as a reconstructed texture map.

[0139] Optionally, the second preset condition can be set in advance by a related technical person. The second preset condition can be that the adversarial subnetwork is trained to a certain number of iterations, such as 200 times, and of course can be other possible numbers. The second preset condition can also be that the difference between the output value and the input value of the adversarial subnetwork is less than a certain threshold. The embodiments of the present application do not limit this.

[0140] Optionally, the adversarial subnetwork can be a generative adversarial network (GAN).

[0141] Exemplarily, the initial texture map can be corrected by the following formula (3) and the following formula (4).

[0142]

[0143]

[0144] wherein, is the adversarial subnetwork, R is the initial texture map, R' is the reconstructed texture map, H, W and C are respectively the channel of the texture map, T GT is the real texture map of each sample face image.

[0145] In addition, the initial texture map can also be corrected by the following formula (5).

[0146]

[0147] wherein, flip represents a horizontal flip operation, L symmetry represents a flip loss value. The smaller the flip loss value is, the better the reconstructed texture map generated by the adversarial subnetwork is, which can effectively improve the reconstruction stability of the face under the occlusion condition.

[0148] It is worth noting that after the initial texture map is input into the adversarial subnetwork, the initial texture map can be optimized by the adversarial subnetwork to obtain a texture map with higher accuracy as the reconstructed texture map. In addition, in the case that the initial texture map meets the second preset condition, the adversarial subnetwork can end the correction. In this way, the reconstruction stability under the condition that the face is blocked can be effectively improved.

[0149] Step 1011: performing a rendering operation according to each reconstructed face feature point and the reconstructed texture map to generate the three-dimensional reconstructed face image.

[0150] In this way, the three-dimensional reconstructed face image can be accurately reconstructed according to each sample face image, facilitating subsequent operations.

[0151] In a possible implementation, in order to clearly express the loss or difference between the input and output of the initial face reconstruction model, the loss information of the initial face reconstruction model needs to be accurately determined through a series of corresponding loss functions. Referring to Figure 5 According to the sample face image, the three-dimensional reconstructed face image, and the projected face image, the loss information of the initial face reconstruction model is determined, including:

[0152] Step 1012: determining the consistency information between each projected face image and each sample face image to obtain a first loss result.

[0153] Exemplarily, the first loss result can be obtained by the following formula (6).

[0154]

[0155] Wherein, L photo is the first loss result, N is the number of sample face images, i is used to represent the ith sample face image, I represents each sample face image, I' represents each projected face image, m I represents the binary map of each sample face image.

[0156] In addition, if the value of any point in the binary map is 1, it means that the point is located in the region of the sample face. If the value of any point in the binary map is 0, it means that the point is not located in the region of the sample face.

[0157] Optionally, the face region in each sample face image or the binary map of each sample face image can be segmented by a face segmentation algorithm. The embodiments of the present application do not limit this.

[0158] Step 1013: determining the difference information between the position of the reconstructed face feature point in the three-dimensional reconstructed face image in the prediction position map and the position of the initial face feature point in the position map of the sample face image to obtain a second loss result.

[0159] Exemplarily, the second loss result can be obtained by the following formula (7).

[0160]

[0161] wherein, L position is the second loss result, I position represents the real position map of each sample face image, I' position represents each predicted position map, (x, y) represents the pixel position of the position map, and W is the weight of each region in the position map.

[0162] For example, the weight proportion of eyes, nose, mouth and other regions in the real position map or the predicted position map is 5:3:3:0 respectively. Of course, other arbitrary possible proportions can also be used, and the embodiments of the present application are not limited in this regard.

[0163] Step 1014: determining the difference information between the reconstructed face feature points located at the edge of the three-dimensional reconstructed face image and the initial face feature points located at the edge of the sample face image, to obtain a third loss result.

[0164] Optionally, the difference information between the reconstructed face feature points located at the edge of the three-dimensional reconstructed face image and the initial face feature points located at the edge of the sample face image can represent the fitting degree of the edge of the three-dimensional reconstructed face image and the edge of each sample face image.

[0165] Exemplarily, if the value of the third loss result is larger, it can be represented that the difference between the reconstructed face feature points located at the edge of the three-dimensional reconstructed face image and the initial face feature points located at the edge of the sample face image is larger, that is, the fitting degree of the edge of the three-dimensional reconstructed face image and the edge of each sample face image is smaller. Conversely, it can be represented that the difference between the reconstructed face feature points located at the edge of the three-dimensional reconstructed face image and the initial face feature points located at the edge of the sample face image is smaller.

[0166] Exemplarily, the third loss result can be obtained by the following formula (8).

[0167]

[0168] wherein, L edge is the third loss result, set(D) represents the set of reconstructed face feature points located at the edge of the three-dimensional reconstructed face image, v 2dFor traversing any one of the initial facial feature points located at the edge of the sample face image. Generally, when obtaining the third loss result through the above formula (8), one of the reconstructed facial feature points of the edge of the three-dimensional reconstructed face image can be respectively substituted into the above formula (8) for calculation together with a corresponding one of the initial facial feature points of the edge of the sample face image.

[0169] In addition, under the three-dimensional space, the characteristics of the normal vectors of the adjacent two triangular surfaces being opposite and the relationship of the edges can accurately obtain the set of the reconstructed facial feature points located at the edge of the three-dimensional reconstructed face image.

[0170] In this way, the fitting degree of the edge of the three-dimensional reconstructed face image and each edge of the sample face image can be accurately reflected.

[0171] Step 1015: generating a plurality of transformation matrices according to the difference information between the vertices in the three-dimensional reconstructed face image corresponding to each sample face image.

[0172] Optionally, the transformation matrix can make the rotation, translation and scaling of each sample face image within a certain range.

[0173] In addition, each vertex in the three-dimensional reconstructed face image can refer to each three-dimensional vertex of the three-dimensional reconstructed face image. Each three-dimensional vertex can represent the vertex information of the three-dimensional reconstructed face image in the three-dimensional space.

[0174] Step 1016: determining the difference information between the vertices in the three-dimensional reconstructed face image reconstructed by each sample face image according to the plurality of transformation matrices, and obtaining a fourth loss result.

[0175] For example, when the number of each sample face image is 3, the fourth loss result can be obtained through the following formula (9).

[0176]

[0177] Wherein, L consist is the fourth loss result, V {1,2,3} respectively represent the three-dimensional vertices of the three sample face images, M {1,2,3} respectively represent the transformation matrices of the three sample face images, the transformation matrix is used to represent the rotation, translation and scaling within a certain range, M -1 is the inverse matrix of the transformation matrix.

[0178] It should be noted that the three-dimensional reconstructed face image obtained by the inverse matrix of each sample face image of different angles is adjusted reversely, that is, the difference between the plurality of sample face images is calculated after the results of the plurality of sample face images of the same face are adjusted reversely, and the smaller the difference between the three-dimensional reconstructed face image obtained by each sample face image and the three-dimensional reconstructed face image after the reverse adjustment, the more stable the initial face reconstruction model.

[0179] Step 1017: obtaining loss information of the initial face reconstruction model according to the first loss result, the second loss result, the third loss result and the fourth loss result.

[0180] Optionally, the average of the first loss result, the second loss result, the third loss result and the fourth loss result can be calculated, and the average of the first loss result, the second loss result, the third loss result and the fourth loss result is taken as the loss information.

[0181] The loss information can also be obtained by the following formula (10).

[0182] Loss=αL photo +βL position +γL edge +δL consist (10)

[0183] Wherein, α, β, γ, δ are weight coefficients of the first loss result, the second loss result, the third loss result and the fourth loss result respectively. The values of α, β, γ, δ can be set by the relevant technical personnel according to the actual needs, and the embodiments of the present application are not limited thereto.

[0184] It should be noted that by performing steps 1012-1017, the loss information can be accurately calculated, that is, the loss or difference between the input and output of the initial face reconstruction model can be accurately calculated.

[0185] It should be noted that according to the loss information, the initial face reconstruction model is iteratively corrected, which can effectively reduce the error of the initial face reconstruction model output, that is, the error of the three-dimensional reconstructed face image reconstructed by the initial face reconstruction model can be effectively reduced, and the accuracy of the initial face reconstruction model is improved.

[0186] In one possible implementation manner, referring to Figure 6 , the difference information between the plurality of projection face images is determined according to the plurality of transformation matrices, and a fourth loss result is obtained, comprising:

[0187] Step 1018: respectively calculate the product results of each vertex in the three-dimensional reconstructed face image corresponding to each sample face image and the inverse matrix of the transformation matrix corresponding to each sample face image.

[0188] Step 1019: calculate the difference information between the projection face images according to the product results, and obtain the fourth loss result.

[0189] For details, see the description of formula (9) above, which will not be repeated here.

[0190] After the initial face reconstruction model meets the first preset condition to end the training, any multiple face images can be input into the target face reconstruction model for face reconstruction. To this end, the embodiments of the present application provide a possible implementation manner, which is based on Figure 1 and continues to refer to Figure 7 The method comprises the following steps:

[0191] Step 2001: obtaining multiple face images.

[0192] Optionally, each face image is a two-dimensional image of the same face at different angles.

[0193] Optionally, each face image can be an RGB image.

[0194] Exemplarily, three face images can be obtained to reconstruct a three-dimensional face image.

[0195] Specifically, the three face images can be a front two-dimensional image, a left side two-dimensional image and a right side two-dimensional image of the same face, respectively. The embodiments of the present application do not limit this.

[0196] Step 2002: input each face image into the target face reconstruction model trained in advance to obtain a target reconstructed three-dimensional face image.

[0197] The target reconstructed three-dimensional face model can be the initial face reconstruction model described above which meets the first preset condition.

[0198] Optionally, the target reconstructed three-dimensional face image can be a three-dimensional face image reconstructed by the target reconstructed three-dimensional face model according to each face image.

[0199] It is worth noting that by obtaining multiple face images, each face image is input into the pre-trained target face reconstruction model to obtain a target reconstructed three-dimensional face image. Since the pre-trained target three-dimensional face reconstruction model is obtained after multiple iterations of correction, and in each iteration of correction, the loss information is calculated for the three-dimensional reconstructed face image output by the model and the target three-dimensional face image is corrected based on the loss information, the error between the three-dimensional reconstructed face image output by the target three-dimensional face reconstruction model and the actual three-dimensional face image is very small, so the obtained three-dimensional reconstructed face image is very close to the real face. In this way, the three-dimensional face reconstruction accuracy and practicability can be improved.

[0200] The following describes the device, apparatus, and computer-readable storage medium provided by the three-dimensional face reconstruction model training method of the present application, and the specific implementation process and technical effects are described above. The following will not be repeated.

[0201] Figure 8 is a structural schematic diagram of a three-dimensional face reconstruction model training device provided by an embodiment of the present application. Referring to Figure 8 The device comprises:

[0202] The acquisition module 301 is configured to acquire multiple sample face images.

[0203] The input and output module 302 is configured to input each sample face image into an initial face reconstruction model, and output a three-dimensional reconstructed face image from the initial face reconstruction model.

[0204] The projection module 303 is configured to project the three-dimensional reconstructed face image into multiple projected face images according to the angle information of each sample face image.

[0205] The determination module 304 is configured to determine the loss information of the initial face reconstruction model according to the sample face image, the three-dimensional reconstructed face image, and the projected face image.

[0206] The iterative correction module 305 is configured to iteratively correct the initial face reconstruction model according to the loss information of the initial face reconstruction model until the initial face reconstruction model meets a first preset condition to end the training, and the initial face reconstruction model that meets the first preset condition is used as a target face reconstruction model.

[0207] The above device is used to execute the method provided by the foregoing embodiments, and the implementation principle and technical effects are similar, which will not be repeated here.

[0208] The above modules can be one or more integrated circuits configured to implement the above methods, for example, one or more application specific integrated circuits (ASICs), or one or more microcontrollers, or one or more field programmable gate arrays (FPGAs), etc. For another example, when a certain module above is implemented in the form of a processing element scheduling code, the processing element can be a general purpose processor, such as a central processing unit (CPU) or other processor that can invoke program code. For another example, the modules can be integrated together to implement in the form of a system on a chip (SOC).

[0209] Figure 9 is a structural schematic diagram of a computer device provided by an embodiment of the present application. Referring to Figure 9 The computer device includes a memory 401 and a processor 402, the memory 401 stores a computer program capable of running on the processor 402, and the processor 402 implements the steps in any of the above method embodiments when executing the computer program.

[0210] The embodiment of the present application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the steps in the above method embodiments.

[0211] Optionally, the present application also provides a program product, for example, a computer readable storage medium, including a program, which is executed by a processor to execute any of the above three-dimensional face reconstruction model training method embodiments.

[0212] In several embodiments of the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic, for example, the division of units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed units can be indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0213] The units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, i.e. may be located in one place, or may be distributed on multiple network units. Part or all of the units may be selected according to actual needs to achieve the purpose of the embodiment.

[0214] In addition, each functional unit in each embodiment of the application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of hardware plus software functional unit.

[0215] The integrated unit realized in the form of software functional unit can be stored in a computer readable storage medium. The software functional unit is stored in a storage medium, including a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to execute part of the steps of the method of each embodiment of the application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (English: Read-Only Memory, abbreviated as: ROM), a random access memory (English: Random Access Memory, abbreviated as: RAM), a magnetic disk or an optical disk, and various program code storage media.

[0216] The above is only a specific embodiment of the present application, but the protection scope of the present application is not limited thereto, any skilled person in the art can easily think of changes or replacements within the technical range disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be limited by the protection scope of the claims.

[0217] The above is only a preferred embodiment of the present application, and is not used to limit the present application. For those skilled in the art, the present application can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims

1. A method for training a three-dimensional face reconstruction model, characterized in that, The method includes: Multiple sample face images are acquired, each of which is a two-dimensional RGB image of the same sample face at different angles, and each sample face image is marked with multiple initial face feature points. Each of the sample face images is input into the initial face reconstruction model, and the initial face reconstruction model outputs a three-dimensional reconstructed face image, which includes multiple reconstructed face feature points; Based on the angle information of each sample face image, the three-dimensional reconstructed face image is projected into multiple projected face images. The angle of each projected face image is consistent with the angle of each sample face image. The angle information includes the deflection angle of the sample face in the sample face image. A first loss result is obtained by determining the consistency information between each projected face image and each sample face image; a second loss result is obtained by determining the difference information between the position of the reconstructed face feature points in the predicted location map of the 3D reconstructed face image and the position of the initial face feature points in the location map of the sample face image; a third loss result is obtained by determining the difference information between the reconstructed face feature points located at the edge of the 3D reconstructed face image and the initial face feature points located at the edge of the sample face image; a fourth loss result is obtained by generating multiple transformation matrices based on each vertex in the 3D reconstructed face image corresponding to each sample face image; a fifth loss result is obtained by determining the difference information between each vertex in the 3D reconstructed face image reconstructed from each sample face image based on the multiple transformation matrices; and the loss information of the initial face reconstruction model is obtained based on the first loss result, the second loss result, the third loss result, and the fourth loss result. Based on the loss information of the initial face reconstruction model, the initial face reconstruction model is iteratively corrected until the initial face reconstruction model reaches the first preset condition and the training ends. The initial face reconstruction model that reaches the first preset condition is taken as the target face reconstruction model.

2. The three-dimensional face reconstruction model training method as described in claim 1, characterized in that, The step of inputting each of the sample face images into the initial face reconstruction model, and outputting a three-dimensional reconstructed face image of each sample face image from the initial face reconstruction model, includes: Each of the sample face images is input into the initial face reconstruction model to generate the reconstructed face feature points and texture coefficients corresponding to the sample face, and the three-dimensional reconstructed face image is generated based on the reconstructed face feature points and texture coefficients.

3. The three-dimensional face reconstruction model training method as described in claim 2, characterized in that, The generation of the reconstructed facial feature points and texture coefficients corresponding to the sample face includes: The regression sub-model in the initial face reconstruction model generates a predicted location map corresponding to the sample face image, and the reconstructed face feature points corresponding to the sample face are reconstructed based on the predicted location map. The initial texture coefficients corresponding to the sample face image are generated by the encoding / decoding sub-model in the initial face reconstruction model, and the texture coefficients are generated based on the initial texture coefficients.

4. The three-dimensional face reconstruction model training method as described in claim 2, characterized in that, The step of generating the three-dimensional reconstructed face image based on each of the reconstructed facial feature points and the texture coefficients includes: An initial texture map corresponding to the sample face is generated based on the texture coefficients; The initial texture map is input into the adversarial sub-network of the initial face reconstruction model for iterative correction until the initial texture map meets the second preset condition. The initial texture map that meets the second preset condition is then used as the reconstructed texture map. The three-dimensional reconstructed face image is generated by performing rendering operations based on the reconstructed facial feature points and the reconstructed texture map.

5. The three-dimensional face reconstruction model training method as described in claim 1, characterized in that, The step of determining the difference information between each of the projected face images based on the plurality of transformation matrices to obtain the fourth loss result includes: Calculate the product of each vertex in the 3D reconstructed face image corresponding to each sample face image with the inverse of the transformation matrix corresponding to each sample face image; The difference information between each projected face image is calculated based on the product result to obtain the fourth loss result.

6. A three-dimensional face reconstruction method, characterized in that, The method includes: Multiple face images are acquired, each face image being a two-dimensional image of the same face from different angles; Each of the aforementioned face images is input into a pre-trained target face reconstruction model to obtain a target reconstructed three-dimensional face image. The target face reconstruction model is trained based on the three-dimensional face reconstruction model training method described in any one of claims 1-5.

7. A three-dimensional face reconstruction model training device, characterized in that, The device includes: The acquisition module is used to acquire multiple sample face images, each of which is a two-dimensional RGB image of the same sample face at different angles, and each of the sample face images is marked with multiple initial face feature points. The input / output module is used to input each of the sample face images into the initial face reconstruction model, and output a three-dimensional reconstructed face image from the initial face reconstruction model. The three-dimensional reconstructed face image includes multiple reconstructed face feature points. The projection module is used to project the three-dimensional reconstructed face image into multiple projected face images based on the angle information of each of the sample face images. The angle of each projected face image is consistent with the angle of each of the sample face images. The angle information includes the deflection angle of the sample face in the sample face image. A determination module is used to determine the consistency information between each projected face image and each sample face image to obtain a first loss result; determine the difference information between the position of the reconstructed face feature points in the 3D reconstructed face image in the predicted location map and the position of the initial face feature points in the location map of the sample face image to obtain a second loss result; determine the difference information between the reconstructed face feature points located at the edge of the 3D reconstructed face image and the initial face feature points located at the edge of the sample face image to obtain a third loss result; generate multiple transformation matrices based on each vertex in the 3D reconstructed face image corresponding to each sample face image; determine the difference information between each vertex in the 3D reconstructed face image reconstructed from each sample face image based on the multiple transformation matrices to obtain a fourth loss result; and obtain the loss information of the initial face reconstruction model based on the first loss result, the second loss result, the third loss result, and the fourth loss result. The iterative correction module is used to iteratively correct the initial face reconstruction model based on the loss information of the initial face reconstruction model until the initial face reconstruction model reaches a first preset condition to end training, and the initial face reconstruction model that reaches the first preset condition is used as the target face reconstruction model.

8. A computer device, characterized in that, include: A memory and a processor, wherein the memory stores a computer program that can run on the processor, and when the processor executes the computer program, it implements the steps of the method 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 method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Three-dimensional face model reconstruction method and device, electronic equipment and storage medium

    CN112884881A

  • Three-dimensional face reconstruction model establishment method based on weak supervised learning and application thereof

    CN113781640A

  • Three-dimensional face synthesis method using facial textureimage from several views

    KR1020000051217A