A method, device, equipment and storage medium for three-dimensional face reconstruction

Through the combination of the teacher network model and the student network model, steady-state and dynamic reconstruction parameters are estimated and input, which solves the problem of parameter instability and computational overhead in 3D face reconstruction, and achieves efficient and accurate 3D face reconstruction.

CN112633191BActive Publication Date: 2024-09-06BIGO TECH PTE LTD
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202011583279.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-28
Publication Date
2024-09-06
Estimated Expiration
2040-12-28

AI Technical Summary

Technical Problem

The continuity between video frames in existing 3D face reconstruction technology leads to instability of reconstruction parameters, causes 3D face jitter, increases computational overhead, and affects efficiency and accuracy.

Method used

The steady-state reconstruction parameters of the video frames are estimated through the pre-built teacher network model and input into the distilled student network model. The dynamic reconstruction parameters are estimated and directly input into the three-dimensional deformation model for reconstruction, which reduces the calculation of reconstruction parameters. quantity, improving efficiency and accuracy.

Benefits of technology

It effectively reduces the computational overhead of 3D face reconstruction, avoids jitter problems, improves the accuracy and efficiency of reconstruction, and ensures the stability and personalized reconstruction of continuous video frames.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112633191B
    Figure CN112633191B
Patent Text Reader

Abstract

The embodiment of the present invention discloses a method, device, equipment and storage medium for three-dimensional face reconstruction. The method includes: if the steady-state reconstruction parameters of the current video frame under three-dimensional face reconstruction have been estimated by a pre-constructed teacher network model, the current video frame is input into the student network model after distillation of the teacher network model to estimate the dynamic reconstruction parameters of the current video frame under three-dimensional face reconstruction; the steady-state reconstruction parameters and the dynamic reconstruction parameters are input into the pre-constructed three-dimensional deformation model to reconstruct the three-dimensional face corresponding to the current video frame. The technical solution provided by the embodiment of the present invention greatly reduces the computational overhead of three-dimensional face reconstruction, thereby improving the efficiency of three-dimensional face reconstruction. At the same time, on the basis of ensuring the stability of three-dimensional face reconstruction of continuous video frames, personalized reconstruction of three-dimensional faces of each video frame is achieved, thereby improving the accuracy of three-dimensional face reconstruction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of image processing technology, and in particular to a method, device, equipment and storage medium for three-dimensional face reconstruction. Background Art

[0002] With the development of video technology, there is an increasing demand for the creation of realistic face models in entertainment applications such as face animation, face recognition, and augmented reality (AR) that require face display. Since there are usually multiple expressions in different video frames in a video recorded with the same face, it is necessary to track the facial expressions in each video frame during 3D face reconstruction so that the reconstructed 3D face is configured with the corresponding expressions to enhance the realism of the 3D face reconstruction.

[0003] At present, for the three-dimensional face reconstruction in each video frame in a video recorded by a certain user, each video frame is usually regarded as an independent face image, and a pre-built neural network model is used to predict the reconstruction parameters that each video frame needs to refer to when reconstructing the three-dimensional face, and then the reconstruction parameters are used to reconstruct the three-dimensional face for each video frame; at this time, due to the continuity between the video frames, when the reconstruction parameters predicted under adjacent video frames are unstable, the reconstructed three-dimensional face will shake, and because the reconstruction parameter prediction under each video frame is the reconstruction parameter prediction for the same face, unnecessary prediction calculation will be added when predicting the reconstruction parameters for each video frame, thereby affecting the efficiency of three-dimensional face reconstruction. Summary of the invention

[0004] The embodiments of the present invention provide a method, apparatus, device and storage medium for 3D face reconstruction, which reduce the computational overhead of 3D face reconstruction and improve the efficiency of 3D face reconstruction while ensuring the accuracy of 3D face reconstruction.

[0005] In a first aspect, an embodiment of the present invention provides a method for 3D face reconstruction, the method comprising:

[0006] If the steady-state reconstruction parameters of the current video frame under 3D face reconstruction have been estimated by the pre-built teacher network model, the current video frame is input into the student network model distilled from the teacher network model to estimate the dynamic reconstruction parameters of the current video frame under 3D face reconstruction;

[0007] The steady-state reconstruction parameters and the dynamic reconstruction parameters are input into a pre-built three-dimensional deformable model to reconstruct a three-dimensional human face corresponding to the current video frame.

[0008] In a second aspect, an embodiment of the present invention provides a device for 3D face reconstruction, the device comprising:

[0009] A reconstruction parameter estimation module, for, if the steady-state reconstruction parameters of the current video frame under 3D face reconstruction have been estimated by a pre-built teacher network model, inputting the current video frame into a student network model distilled from the teacher network model to estimate the dynamic reconstruction parameters of the current video frame under 3D face reconstruction;

[0010] The three-dimensional face reconstruction module is used to input the steady-state reconstruction parameters and the dynamic reconstruction parameters into a pre-built three-dimensional deformable model to reconstruct the three-dimensional face corresponding to the current video frame.

[0011] In a third aspect, an embodiment of the present invention provides a computer device, the computer device comprising:

[0012] one or more processors;

[0013] A storage device for storing one or more programs;

[0014] When the one or more programs are executed by the one or more processors, the one or more processors implement the method for three-dimensional face reconstruction described in any embodiment of the present invention.

[0015] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for three-dimensional face reconstruction described in any embodiment of the present invention.

[0016] The embodiments of the present invention provide a method, apparatus, device and storage medium for 3D face reconstruction. Considering that the same face may be contained in consecutive video frames in the same video, a pre-constructed teacher network model is used to uniformly estimate in advance the steady-state reconstruction parameters of each video frame that hardly change under 3D face reconstruction. Subsequently, when 3D face reconstruction is performed on each current video frame, the dynamic reconstruction parameters of the current video frame under 3D face reconstruction are directly estimated through the student network model distilled from the teacher network model. At this time, the student network model is obtained after knowledge distillation of the teacher network model, and there is no need to separately calculate the steady-state reconstruction parameters of each video frame under 3D face reconstruction, which greatly reduces the computational overhead of 3D face reconstruction. , thereby improving the efficiency of 3D face reconstruction and ensuring the accuracy of dynamic reconstruction parameters of the current video frame under 3D face reconstruction; then, the steady-state reconstruction parameters and dynamic reconstruction parameters of the current video frame under 3D face reconstruction are directly input into the pre-built 3D deformation model to reconstruct the 3D face corresponding to the current video frame. At this time, the steady-state reconstruction parameters of consecutive video frames under 3D face reconstruction remain unchanged, thereby avoiding the jitter problem of consecutive video frames under 3D face reconstruction. At the same time, the dynamic reconstruction parameters of each video frame under 3D face reconstruction are utilized to ensure the stability of 3D face reconstruction of consecutive video frames, thereby achieving personalized reconstruction of the 3D face of each video frame, thereby improving the accuracy of 3D face reconstruction. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:

[0018] Figure 1A A flowchart of a method for three-dimensional face reconstruction provided in Embodiment 1 of the present invention;

[0019] Figure 1B A schematic diagram of the principle of a three-dimensional face reconstruction process provided in the first embodiment of the present invention;

[0020] Figure 1C A schematic diagram of the structure of a three-dimensional deformable model used for three-dimensional face reconstruction in the method provided in the first embodiment of the present invention;

[0021] Figure 1D A schematic diagram of the structure of a bilinear face model in a three-dimensional deformable model in the method provided in Embodiment 1 of the present invention;

[0022] Figure 2A A flowchart of a method for three-dimensional face reconstruction provided in Embodiment 2 of the present invention;

[0023] Figure 2B A schematic diagram of the principle of a three-dimensional face reconstruction process provided in the second embodiment of the present invention;

[0024] Figure 3A A flowchart of a method for training a student network model in three-dimensional face reconstruction provided in Embodiment 3 of the present invention;

[0025] Figure 3B A schematic diagram of the principle of the training process of the student network model provided in the third embodiment of the present invention;

[0026] Figure 3C A schematic diagram of the distribution of key feature points in the method provided in Embodiment 3 of the present invention;

[0027] Figure 4 A schematic diagram of the structure of a device for three-dimensional face reconstruction provided in Embodiment 4 of the present invention;

[0028] Figure 5 A schematic diagram of the structure of a computer device provided in Embodiment 5 of the present invention. DETAILED DESCRIPTION

[0029] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only the parts related to the present invention, rather than all structures, are shown in the accompanying drawings. In addition, the embodiments of the present invention and the features in the embodiments may be combined with each other without conflict.

[0030] Embodiment 1

[0031] Figure 1A This is a flow chart of a method for 3D face reconstruction provided in Embodiment 1 of the present invention. This embodiment can be applied to any situation where 3D face reconstruction is performed on multiple video frames with the same face. The method for 3D face reconstruction provided in this embodiment can be performed by a device for 3D face reconstruction provided in an embodiment of the present invention. The device can be implemented in software and / or hardware and integrated in a computer device that executes this method.

[0032] Specifically, refer to Figure 1A , the method may include the following steps:

[0033] S110, if the steady-state reconstruction parameters of the current video frame under three-dimensional face reconstruction have been estimated by the pre-built teacher network model, the current video frame is input into the student network model distilled from the teacher network model to estimate the dynamic reconstruction parameters of the current video frame under three-dimensional face reconstruction.

[0034] Specifically, in entertainment applications such as face animation, face recognition, and augmented reality that require the display of face images, there will be a need to perform three-dimensional face reconstruction on video frames with face images in videos recorded by certain users, and to perform entertainment interactive functions under specific face special effects. At this time, the three-dimensional face reconstruction can control the standard face shape through various reconstruction parameters to perform corresponding deformation and facial expression changes, thereby generating a corresponding three-dimensional face, and improving the display of details such as lighting conditions and posture angles in the three-dimensional face. It can be seen that the accuracy of the various reconstruction parameters estimated for each video frame to be reconstructed can directly affect the realism of the three-dimensional face corresponding to the reconstruction of the video frame. Therefore, in order to make the reconstructed three-dimensional face more realistic, it is required to accurately estimate the various reconstruction parameters specified by the three-dimensional face reconstruction from the video frame to be reconstructed. Specifically, the reconstruction parameters in this embodiment may include deformation parameters representing changes in face shape, expression parameters representing changes in face expression, albedo parameters representing changes in face albedo, illumination parameters representing changes in face illumination, position parameters representing face translation, and rotation parameters representing face head posture, etc.; wherein the albedo parameters include RGB color information of the two-dimensional face image to be reconstructed.

[0035] At present, when performing 3D face reconstruction on each video frame in a video recorded by a certain user, a corresponding neural network model is usually pre-trained to accurately estimate various reconstruction parameters that need to be referenced in 3D face reconstruction for each video frame to be reconstructed, and then the estimated reconstruction parameters are used to perform 3D face reconstruction on the corresponding video frame; however, since the consecutive video frames of the video recorded by the user usually have the same face, that is, the facial expressions in the consecutive video frames are tracked, at this time, using the pre-trained neural network model to estimate the various reconstruction parameters of each video frame under 3D face reconstruction separately may cause the 3D face reconstructed by the consecutive video frames to jitter, and the neural network model estimates separately. When reconstructing various reconstruction parameters of each video frame, there will also be a lot of computational overhead under model estimation. At this time, this embodiment takes into account that continuous video frames usually have the same face, which means that the reconstruction parameters representing changes in face identity and texture, etc., which are referred to in continuous video frames during three-dimensional face reconstruction, will hardly change. Only the reconstruction parameters representing changes in facial expressions and illumination, etc. will change. Therefore, this embodiment divides the various reconstruction parameters of each video frame under three-dimensional face reconstruction into steady-state reconstruction parameters that hardly change under the same face (such as reconstruction parameters representing changes in face identity and albedo, etc.) and dynamic reconstruction parameters unique to each video frame (such as reconstruction parameters representing changes in facial expressions and illumination, etc.).

[0036] At this time, for the continuous video frames in the video recorded by the user, a pre-trained neural network model that can accurately estimate the various reconstruction parameters of each video frame under three-dimensional face reconstruction can be used as the pre-constructed teacher network model in this embodiment. The teacher network model is used to estimate the various reconstruction parameters of the first video frame or the first few video frames in the continuous video frames under three-dimensional face reconstruction, and the reconstruction parameters that hardly change for the same face among the estimated reconstruction parameters are saved as steady-state reconstruction parameters of subsequent video frames in the continuous video frames under three-dimensional face reconstruction. This makes it possible for subsequent video frames to reconstruct three-dimensional faces without estimating the corresponding steady-state reconstruction parameters, and only the dynamic reconstruction parameters under three-dimensional face reconstruction need to be estimated, which greatly reduces the amount of parameter estimation during three-dimensional face reconstruction, thereby improving the efficiency of three-dimensional face reconstruction.

[0037] In this embodiment, considering that the pre-built teacher network model can accurately estimate the reconstruction parameters of each video frame under 3D face reconstruction, Figure 1B As shown, in order to ensure the accuracy of estimation of dynamic reconstruction parameters of each video frame under three-dimensional face reconstruction, the estimation function of dynamic reconstruction parameters in the teacher network model will be analyzed by knowledge distillation, so as to migrate the function of accurately estimating the dynamic reconstruction parameters of each video frame in the teacher network model to the student network model, so that the student network model is only used to accurately estimate the dynamic reconstruction parameters of each video frame under three-dimensional face reconstruction, and will not estimate the steady-state reconstruction parameters of the video frame under three-dimensional face reconstruction, thereby reducing the parameter estimation amount of three-dimensional face reconstruction.

[0038] Optionally, when performing three-dimensional face reconstruction on each video frame in a video recorded by a user, it is first determined whether the steady-state reconstruction parameters of the current video frame under three-dimensional face reconstruction have been estimated in advance through the teacher network model. If the steady-state reconstruction parameters of the current video frame under three-dimensional face reconstruction have been estimated through the teacher network model, then the current video frame is directly input into the student network model obtained after the confidence knowledge distillation of the teacher network model. The student network model is used to accurately estimate the dynamic reconstruction parameters of the current video frame under three-dimensional face reconstruction, so as to obtain various reconstruction parameters of the current video frame under three-dimensional face reconstruction. Subsequently, the obtained reconstruction parameters can be directly used to perform three-dimensional face reconstruction on the current video frame.

[0039] S120, inputting the steady-state reconstruction parameters and the dynamic reconstruction parameters into a pre-built three-dimensional deformable model to reconstruct a three-dimensional face corresponding to the current video frame.

[0040] Optionally, after estimating the dynamic reconstruction parameters of the current video frame under three-dimensional face reconstruction through the student network model, the steady-state reconstruction parameters of the current video frame under three-dimensional face reconstruction estimated by the teacher network model and the dynamic reconstruction parameters can be directly input into a pre-constructed three-dimensional deformable model. The three-dimensional facial shape and appearance of the current video frame can be modeled by the three-dimensional deformable model, and the corresponding facial expressions, lighting information, etc. can be adjusted after modeling, so as to reconstruct the three-dimensional face corresponding to the current video frame.

[0041] Exemplarily, the three-dimensional deformation model in this embodiment can be composed of a bilinear face model and a principal component analysis (PCA) model, such as Figure 1C As shown, the bilinear face model is mainly used to model the changes in facial appearance and expression during the three-dimensional face reconstruction process, while the PCA model is mainly used to model the changes in facial albedo during the three-dimensional face reconstruction process.

[0042] The bilinear face model defines a core tensor of a three-dimensional face, which is composed of three dimensions: mesh vertices, face shape, and face expression. Figure 1D As shown, the bilinear face model can be expressed as: S = C r ×2α×3δ,C r is the core tensor of a three-dimensional face. The three dimensions of the core tensor are the mesh vertices, identity, and expression of the three-dimensional face. In this embodiment, it is assumed that 20084 mesh vertices are used to represent the geometric shape of the three-dimensional face S = [x1, y1, z1, L, x 20084 ,y 20084 ,z 20084 ]∈R 60252 , you can set the core tensor C r ∈R 60252×79×46 It includes 79 identity parameters representing the changes in facial appearance and 46 expression parameters representing the changes in facial expression, and α∈R 79 is the 79-dimensional identity parameter representing the change of face shape, δ∈R 46 It is a 46-dimensional expression parameter that represents the changes in facial expressions.

[0043] In this embodiment, in order to accurately construct the core tensor defined in the bilinear face model, three-dimensional face scanning data from a multi-dimensional data source is collected, and the three-dimensional face reconstructed from the three-dimensional face scanning data is subjected to high-order singular value decomposition in the face shape dimension and the face expression dimension to obtain the corresponding core tensor.

[0044] Specifically, a depth camera can be used to pre-collect a large amount of facial data of individuals of different races, ages and genders, wherein each individual will collect a piece of expressionless facial data and a plurality of facial data with different expressions as the three-dimensional face scanning data in this embodiment, and for each three-dimensional face scanning data, a standard face network containing 20084 mesh vertices is used to perform corresponding deformation, so that the deformed face network is as close as possible to the three-dimensional face scanning data, and ensure that each facial feature point in the deformed face network corresponds to the facial feature point in the three-dimensional face scanning data one by one, so that each individual can be In order to construct a face mesh model (Blendshape model) containing 46 facial expressions, it is assumed that three-dimensional face scanning data of N individuals are collected, then a face mesh model containing N individuals, each of which contains 46 different facial expressions, can be obtained. Each face mesh model contains a face database with 20084 mesh vertices. After integrating the face database, a 60252×N×46 three-dimensional tensor can be obtained. At this time, a high-order singular value decomposition operation is performed on the three-dimensional tensor in the individual dimension (N) and the facial expression dimension (46), and the corresponding core tensor C can be obtained. r ∈R 60252×79×46 .

[0045] Meanwhile, the PCA model in this embodiment defines the average albedo of the face and the principal component basis representing the change of the albedo of the face, which can be expressed as: is the average albedo of the face defined in the PCA model, T base ∈R 60252×79 is the 79-dimensional principal component basis representing the change of face albedo in the PCA model, β∈R 79 The albedo parameter is a principal component-based albedo parameter. At this time, the albedo parameter contains the RGB color information of each mesh vertex in the face image to achieve color reconstruction during 3D face reconstruction.

[0046] In addition, in order to ensure the 3D detail features during 3D face reconstruction, the 3D deformation model of this embodiment may further define an illumination parameter γ∈R representing the illumination change of the face. 27 , represents the position parameter t∈R of the face translation 3 And the rotation parameter p∈R representing the face head posture 3 In this embodiment, spherical harmonic illumination may be used to approximate the illumination in a three-dimensional scene to estimate the corresponding illumination parameter γ.

[0047] Therefore, in order to accurately reconstruct a three-dimensional face, the reconstruction parameters specified for the three-dimensional face reconstruction in this embodiment may be (α, δ, β, γ, t, p)∈R237 , where the steady-state reconstruction parameter is the identity parameter α∈R representing the change in face shape 79 , and the albedo parameter β∈R representing the change of face albedo 79 , the remaining (δ,γ,t,p)∈R 79 Dynamic reconstruction parameters for each video frame under 3D face reconstruction.

[0048] It should be noted that the number of each reconstruction parameter in this embodiment is only an example, and can be specifically set according to corresponding reconstruction requirements, which is not limited in this embodiment.

[0049] Exemplarily, the specific reconstruction process of this embodiment for three-dimensional face reconstruction using a three-dimensional deformable model composed of a bilinear face model and a PCA model can be as follows: the reconstruction parameters representing changes in facial appearance in the steady-state reconstruction parameters and the reconstruction parameters representing changes in facial expressions in the dynamic reconstruction parameters are input into the bilinear face model, and the core tensor is adjusted to obtain the corresponding three-dimensional deformable face; the three-dimensional deformable face and the reconstruction parameters in the steady-state reconstruction parameters and the dynamic reconstruction parameters that match the principal component basis under the PCA model are input into the PCA model, and the albedo of the three-dimensional deformable face is corrected based on the average albedo of the face to obtain a reconstructed three-dimensional face.

[0050] Specifically, after estimating the steady-state reconstruction parameters and dynamic reconstruction parameters of the current video frame under three-dimensional face reconstruction, the steady-state reconstruction parameters and dynamic reconstruction parameters will be uniformly input into the three-dimensional deformation model to perform deformation and expression adjustment on the three-dimensional standard face. At this time, the three-dimensional deformation model is composed of a bilinear face model and a PCA model. Different models have different reconstruction functions. The bilinear face model is mainly used to model the changes in facial appearance and expression during the three-dimensional face reconstruction process. The PCA model is mainly used to model the changes in facial albedo during the three-dimensional face reconstruction process. Therefore, the current video frame is reconstructed into a three-dimensional face through the bilinear face model and the PCA model in turn.

[0051] At this time, first, the identity parameters representing the changes in facial appearance defined in the bilinear face model are screened out from the steady-state reconstruction parameters estimated for the current video frame, and the expression parameters representing the changes in facial expression defined in the bilinear face model are screened out from the dynamic reconstruction parameters estimated for the current video frame, and then the screened identity parameters and expression parameters are input into the bilinear face model, and the core tensor defined therein is subjected to corresponding appearance changes and expression changes through the model representation function of the above-mentioned bilinear face model, so as to obtain the corresponding three-dimensional deformable face; finally, the reconstruction parameters matching the principal component basis under the PCA model are screened out from the steady-state reconstruction parameters and dynamic reconstruction parameters estimated for the current video frame, and then the three-dimensional deformable face and the screened reconstruction parameters are uniformly input into the PCA model, and the model representation function of the above-mentioned PCA model is used to perform albedo correction on the three-dimensional deformable face based on the average albedo of the face, so as to obtain the reconstructed three-dimensional face.

[0052] The technical solution provided by this embodiment takes into account that the same face may be contained in consecutive video frames in the same video. Therefore, the steady-state reconstruction parameters of each video frame that hardly change under 3D face reconstruction are uniformly estimated in advance through a pre-built teacher network model. When 3D face reconstruction is subsequently performed on each current video frame, the dynamic reconstruction parameters of the current video frame under 3D face reconstruction can be directly estimated through the student network model distilled from the teacher network model. At this time, the student network model is obtained after knowledge distillation of the teacher network model, and there is no need to calculate the steady-state reconstruction parameters of each video frame under 3D face reconstruction separately, which greatly reduces the computational overhead of 3D face reconstruction, thereby improving the 3D face quality. The high efficiency of reconstruction is improved, and the accuracy of dynamic reconstruction parameters of the current video frame under 3D face reconstruction is ensured; then, the steady-state reconstruction parameters and dynamic reconstruction parameters of the current video frame under 3D face reconstruction are directly input into a pre-built 3D deformation model to reconstruct the 3D face corresponding to the current video frame. At this time, the steady-state reconstruction parameters of consecutive video frames under 3D face reconstruction remain unchanged, thereby avoiding the jitter problem of consecutive video frames under 3D face reconstruction. At the same time, the dynamic reconstruction parameters of each video frame under 3D face reconstruction are utilized to achieve personalized reconstruction of the 3D face of each video frame on the basis of ensuring the stability of 3D face reconstruction of consecutive video frames, thereby improving the accuracy of 3D face reconstruction.

[0053] Embodiment 2

[0054] Figure 2A A flowchart of a method for three-dimensional face reconstruction provided in Embodiment 2 of the present invention. Figure 2B The schematic diagram of the principle of the 3D face reconstruction process provided by the second embodiment of the present invention. This embodiment is optimized on the basis of the above embodiment. Specifically, Figure 2AAs shown, this embodiment mainly explains in detail the specific estimation process of the steady-state reconstruction parameters of the current video frame under 3D face reconstruction.

[0055] Optional, such as Figure 2A As shown, this embodiment may include the following steps:

[0056] S210, inputting the associated video frame having the same face as the current video frame into the teacher network model, estimating the comprehensive reconstruction parameters of the associated video frame under three-dimensional face reconstruction, and using the steady-state reconstruction parameters in the comprehensive reconstruction parameters as the steady-state reconstruction parameters of the current video frame under three-dimensional face reconstruction.

[0057] Optionally, for advance estimation of steady-state reconstruction parameters of the current video frame under three-dimensional face reconstruction, this embodiment will first determine the associated video frames with the same face in the current video frame before reconstructing the three-dimensional face of the current video frame. The associated video frames in this embodiment can be the first video frame with the face in the current video frame in the video where the current video frame is located, or the first target number of video frames with the face in the current video frame in the video where the current video frame is located, that is, the associated video frames can be one or more. At this time, the associated video frames in the video where the current video frame is located can be input into the teacher network model, and the comprehensive reconstruction parameters of the associated video frames under three-dimensional face reconstruction can be accurately estimated through the teacher network model. Then, the reconstruction parameters in the comprehensive reconstruction parameters, such as the identity parameters representing the changes in facial appearance and the albedo parameters representing the changes in facial texture, which hardly change in consecutive video frames, are used as the steady-state reconstruction parameters of the current video frame under three-dimensional face reconstruction in this embodiment.

[0058] At this time, for the continuous video frames with the same face in the video where the current video frame is located, the first video frame in the continuous video frames can be used as the associated video frame, or multiple video frames of the previous target number can be used as the associated video frames. For the three-dimensional face reconstruction of the associated video frames, the teacher network model is used to estimate the corresponding reconstruction parameters, and the corresponding steady-state reconstruction parameters are screened out from the estimated comprehensive reconstruction parameters as the steady-state reconstruction parameters of each video frame after the subsequent associated video frame under the three-dimensional face reconstruction. That is, when other video frames except the associated video frame in the video to be reconstructed are used as the current video frame for three-dimensional face reconstruction, there are steady-state reconstruction parameters under the three-dimensional face reconstruction that have been estimated by the teacher network model, while when the associated video frame is used as the current video frame for three-dimensional face reconstruction, there are no steady-state reconstruction parameters under the three-dimensional face reconstruction that have been estimated by the teacher network model, and they need to be input into the teacher network model to estimate the various reconstruction parameters under the three-dimensional face reconstruction.

[0059] Exemplarily, when the associated video frame is a video frame having the previous target number of faces in the current video frame in the video where the current video frame is located, such as Figure 2B As shown, in this embodiment, the steady-state reconstruction parameters in the comprehensive reconstruction parameters are used as the steady-state reconstruction parameters of the current video frame under three-dimensional face reconstruction, which can specifically include: fusing the steady-state reconstruction parameters of the same type in the comprehensive reconstruction parameters of each associated video frame to obtain the steady-state reconstruction parameters of the current video frame. That is, when there are multiple associated video frames in the current video frame, the comprehensive reconstruction parameters of each associated video frame under three-dimensional face reconstruction can be estimated through the teacher network model, and then the steady-state reconstruction parameters of the same type in the comprehensive reconstruction parameters of each associated video frame can be weighted summed, so that the fused steady-state reconstruction parameters are used as the steady-state reconstruction parameters of the current video frame to ensure the accuracy of the steady-state reconstruction parameters and avoid errors when only one frame is used to estimate the steady-state reconstruction parameters.

[0060] S220, determine whether the steady-state reconstruction parameters of the current video frame under three-dimensional face reconstruction have been estimated through the pre-built teacher network model. If so, execute S230; if not, execute S260.

[0061] S230, inputting the current video frame into the student network model distilled from the teacher network model, and estimating dynamic reconstruction parameters of the current video frame under three-dimensional face reconstruction.

[0062] S240, inputting the steady-state reconstruction parameters and the dynamic reconstruction parameters into a pre-built three-dimensional deformable model to reconstruct a three-dimensional face corresponding to the current video frame.

[0063] S250, using a differentiable renderer to render a three-dimensional face corresponding to the current video frame.

[0064] Specifically, a differentiable renderer is used to render the three-dimensional face, so that the texture and picture of the rendered three-dimensional face can be closer to the current video frame, thereby improving the realism of the three-dimensional face reconstruction.

[0065] S260, if the steady-state reconstruction parameters of the current video frame under three-dimensional face reconstruction are not estimated by the pre-built teacher network model, the current video frame is input into the teacher network model, the comprehensive reconstruction parameters of the current video frame under three-dimensional face reconstruction are estimated, and the comprehensive reconstruction parameters of the current video frame under three-dimensional face reconstruction are input into the three-dimensional deformation model to reconstruct the three-dimensional face corresponding to the current video frame.

[0066] Optionally, if the current video frame is an associated video frame set in the video, it means that the steady-state reconstruction parameters of the current video frame under three-dimensional face reconstruction have not been estimated by the teacher network model. Then the current video frame can be directly input into the teacher network model, and the teacher network model is used to accurately estimate the comprehensive reconstruction parameters of the current video frame under three-dimensional face reconstruction, and the comprehensive reconstruction parameters of the current video frame under three-dimensional face reconstruction are input into the three-dimensional deformation model. The three-dimensional deformation model uses the comprehensive reconstruction parameters to deform and adjust the expression of the standard three-dimensional face, thereby reconstructing the three-dimensional face corresponding to the current video frame.

[0067] The technical solution provided by the present embodiment uses a pre-built teacher network model to uniformly estimate the steady-state reconstruction parameters of each video frame that will hardly change under 3D face reconstruction in advance. When 3D face reconstruction is subsequently performed on each current video frame, the dynamic reconstruction parameters of the current video frame under 3D face reconstruction can be directly estimated by the student network model distilled from the teacher network model. At this time, the student network model is obtained after knowledge distillation of the teacher network model, and there is no need to calculate the steady-state reconstruction parameters of each video frame under 3D face reconstruction separately, which greatly reduces the computational overhead of 3D face reconstruction, thereby improving the efficiency of 3D face reconstruction and ensuring the current The accuracy of dynamic reconstruction parameters of video frames under 3D face reconstruction; then, the steady-state reconstruction parameters and dynamic reconstruction parameters of the current video frame under 3D face reconstruction are directly input into a pre-built 3D deformation model to reconstruct the 3D face corresponding to the current video frame. At this time, the steady-state reconstruction parameters of consecutive video frames under 3D face reconstruction remain unchanged, thereby avoiding the jitter problem of consecutive video frames under 3D face reconstruction. At the same time, the dynamic reconstruction parameters of each video frame under 3D face reconstruction are utilized to achieve personalized reconstruction of the 3D face of each video frame on the basis of ensuring the stability of 3D face reconstruction of consecutive video frames, thereby improving the accuracy of 3D face reconstruction.

[0068] Embodiment 3

[0069] Figure 3A This is a flow chart of a method for training a student network model in three-dimensional face reconstruction provided in Embodiment 3 of the present invention. Figure 3B The schematic diagram of the principle of the training process of the student network model provided in the third embodiment of the present invention is shown in FIG. This embodiment is optimized on the basis of the above embodiment. Specifically, Figure 3A As shown, this embodiment mainly explains in detail the specific training process of training the student network model by performing knowledge distillation on the teacher network model.

[0070] Optional, such as Figure 3A As shown, this embodiment may include the following steps:

[0071] S310, input the first video frame and the second video frame in the video frame training pair with the same face in the video training set into the teacher network model, and estimate the first comprehensive reconstruction parameters of the first video frame under three-dimensional face reconstruction and the second comprehensive reconstruction parameters of the second video frame under three-dimensional face reconstruction.

[0072] Optionally, since the student network model in this embodiment is obtained by performing knowledge distillation on a pre-trained teacher network model that can accurately estimate the reconstruction parameters of each video frame under three-dimensional face reconstruction, when training the student network model, it is still necessary to estimate the reconstruction parameters of video frames with the same face through the teacher network model, and use it as a reference to analyze the estimation accuracy of the student network model. Therefore, in the pre-set video training set, the training samples are mainly video frame training pairs with the same face. At this time, the first video frame in the video frame training pair can be used as the source of the steady-state reconstruction parameters estimated for the second video frame through the teacher network model.

[0073] Specifically, Figure 3B As shown, when training the student network model, the first video frame and the second video frame in each video frame training pair can be input into the teacher network model, and the teacher network model estimates the various comprehensive reconstruction parameters of the first video frame and the second video frame under three-dimensional face reconstruction respectively. At this time, the second comprehensive reconstruction parameters of the second video frame under three-dimensional face reconstruction estimated by the teacher network model can be used to analyze the accuracy of the various target dynamic reconstruction parameters subsequently estimated for the second video frame by the student network model, and the steady-state reconstruction parameters in the first comprehensive reconstruction parameters of the first video frame under three-dimensional face reconstruction estimated by the teacher network model can be used as target steady-state reconstruction parameters matched by the various target dynamic reconstruction parameters subsequently estimated for the second video frame by the student network model, so as to use the various target dynamic reconstruction parameters estimated by the student network model for the second video frame and the target steady-state reconstruction parameters to perform three-dimensional face reconstruction on the second video frame.

[0074] S320, input the second video frame in the video frame training pair into the student network model, estimate the target dynamic reconstruction parameters of the second video frame under three-dimensional face reconstruction, and input the target steady-state reconstruction parameters and target dynamic reconstruction parameters in the first comprehensive reconstruction parameters into the three-dimensional deformation model to reconstruct the three-dimensional face corresponding to the second video frame.

[0075] Optionally, the second video frame in each video frame training pair is synchronously input into the student network model, and the student network model is used to estimate the target dynamic reconstruction parameters of the second video frame under 3D face reconstruction. At this time, since the student network model is in the process of model training, the estimated target dynamic reconstruction parameters may not be very accurate. At this time, the corresponding target steady-state reconstruction parameters can be screened out from the first comprehensive reconstruction parameters estimated for the first video frame by the teacher network model as the dynamic reconstruction parameters of the second video frame under 3D face reconstruction, and then the target steady-state reconstruction parameters and the target dynamic reconstruction parameters estimated by the student network model can be uniformly input. The target steady-state reconstruction parameters and the target dynamic reconstruction parameters are input into the three-dimensional deformable model, and the target steady-state reconstruction parameters are used to perform corresponding deformation, expression change and albedo change on the standard three-dimensional human face through the three-dimensional deformable model, and the corresponding three-dimensional detail display information is adjusted accordingly, so as to reconstruct the three-dimensional human face corresponding to the second video frame. Subsequently, by comparing the similarity between the second video frame and the reconstructed three-dimensional human face, as well as the similarity between the second comprehensive reconstruction parameters estimated for the second video frame by the teacher network model and the target dynamic reconstruction parameters estimated for the second video frame by the student network model, the realism of the reconstructed three-dimensional human face can be analyzed.

[0076] S330, calculate the loss function between the second comprehensive reconstruction parameter and the target dynamic reconstruction parameter, and the loss function between the three-dimensional face corresponding to the second video frame and the second video frame under the preset two-dimensional supervision item, and adjust the weight corresponding to each loss function.

[0077] Optionally, in order to analyze the realism of the reconstructed three-dimensional face relative to the face in the second video frame, the present embodiment pre-sets a corresponding loss function, and uses the loss function to compare the similarity between the reconstructed three-dimensional face and the second video frame; the loss function in the present embodiment can be divided into a loss function between the second comprehensive reconstruction parameter and the target dynamic reconstruction parameter, and a loss function between the three-dimensional face corresponding to the second video frame and the second video frame under a preset two-dimensional supervision item, which can avoid the reconstruction error of the three-dimensional face as comprehensively as possible; illustratively, the loss function between the second comprehensive reconstruction parameter and the target dynamic reconstruction parameter in the present embodiment can be a regularization item of the corresponding reconstruction parameter, etc., which can be expressed as:

[0078]

[0079] ; Wherein, the second comprehensive reconstruction parameter estimated for the second video frame by the teacher network model is The target dynamic reconstruction parameters estimated by the student network model for the second video frame are (δ,γ,p,t), λ d1 , d2 , d3 ,d4 , δ and λ γ They are respectively the weights corresponding to the regularization terms of the corresponding reconstruction parameters under the loss function between the second comprehensive reconstruction parameter and the target dynamic reconstruction parameter.

[0080] At the same time, the loss functions preset under the two-dimensional supervision item in this embodiment may include: image pixel loss function, key point loss function, identity feature loss function and albedo penalty function.

[0081] Specifically, after reconstructing the three-dimensional face corresponding to the second video frame, the reconstruction error between the reconstructed three-dimensional face and the second video frame can be calculated through the loss function between the second comprehensive reconstruction parameters and the target dynamic reconstruction parameters, as well as the loss function between the three-dimensional face corresponding to the second video frame and the second video frame under the preset two-dimensional supervision item, that is, the specific value of the loss function, and then the realism of the reconstructed three-dimensional face under each loss function can be analyzed according to the specific values ​​of each loss function, so as to judge the estimation accuracy of the trained student network model under each loss function, and then adjust the weight corresponding to each loss function accordingly to improve the estimation ability during the next training.

[0082] Exemplarily, this embodiment can clearly determine the ability of the current training process to accurately reconstruct image pixels, key points, identity features, albedo and various reconstruction parameters during three-dimensional face reconstruction by respectively calculating the image pixel loss function, key point loss function, identity feature loss function and albedo penalty function between the three-dimensional face and the second video frame, as well as the regularization terms corresponding to the loss function between the second comprehensive reconstruction parameters and the target dynamic reconstruction parameters, and adjust the weights of each loss function according to the specific reconstruction capabilities, and continue training, thereby continuously improving the ability of the student network model to estimate dynamic reconstruction parameters during three-dimensional face reconstruction.

[0083] Optionally, the following analysis is performed on the image pixel loss function, key point loss function, identity feature loss function and albedo penalty function included in the loss function under the preset two-dimensional supervision item in this embodiment:

[0084] 1) The process of determining the image pixel loss function is as follows: segmenting the corresponding skin mask from the second video frame; based on the skin mask, calculating the pixel error between the three-dimensional face corresponding to the second video frame and the same pixel point in the skin area of ​​the face in the second video frame, and obtaining the corresponding image pixel loss function.

[0085] Specifically, the mask is a binary image composed of pixel values ​​0 and 1. When setting the image pixel loss function, in this embodiment, in order to ensure the accuracy of image pixel loss during the training process, by applying the skin mask in the second video frame, the pixel values ​​of the face skin area in the second video frame can be set to 1, and the pixel values ​​of the non-face skin area can be set to 0, so that the corresponding face skin area can be accurately segmented from the second video frame using the skin segmentation algorithm, so as to avoid the interference of the pixel features in the non-face skin area with the three-dimensional face reconstruction. Then, after segmenting the corresponding skin mask from the second video frame, the pixel points at the same pixel position can be found from the reconstructed three-dimensional face and the second video frame, and then based on the segmented skin mask, it can be accurately determined whether each of the same pixel points is in the facial skin area. By calculating the pixel error of each pixel point in the facial skin area between the three-dimensional face and the second video frame, the overall pixel error of the three-dimensional face and the second video frame in the facial skin area is analyzed, thereby obtaining the corresponding image pixel loss function. This image pixel loss function only compares the pixel errors in the facial skin area before and after reconstruction, and shields the pixel influence of the non-facial skin area, so that the facial identity features and albedo information in the estimated reconstruction parameters are more accurate.

[0086] Exemplarily, the image pixel loss function in this embodiment may be:

[0087] in, is the pixel value of the pixel point (j, k) in the second video frame in the i-th video frame training pair, is the pixel value of the pixel point (j, k) in the 3D face reconstructed from the second video frame in the i-th video frame training pair, M jk is the pixel value of the pixel point (j, k) in the skin mask. At this time, M is the pixel value of the pixel point in the skin mask in the face skin area. jk is 1 if the value is true, otherwise it is 0.

[0088] 2) The process of determining the key point loss function is as follows: extract the key feature points at the preset position from the second video frame, and determine the visibility of each key feature point; calculate the position reconstruction error between the three-dimensional face corresponding to each visible key feature point in the second video frame and the second video frame, and obtain the corresponding key point loss function.

[0089] Specifically, in order to ensure the one-to-one matching of the key feature points in the reconstructed three-dimensional face and the second video frame, when setting the key point loss function in the training process, the present embodiment can use the Landmark algorithm to extract the key feature points at the preset positions in each facial area from the training samples, such as 17 key feature points on the face contour, 5 key feature points on the left and right eyebrows, 6 key feature points on the left and right eyes, 9 key feature points on the nose and 20 key feature points on the mouth; illustratively, a total of 68 key feature points can be used in the present embodiment, such as Figure 3C As shown. At this time, due to the different head postures of the faces in different training samples, the key feature points at certain preset positions may not be visible. Therefore, after extracting the key feature points at each preset position from the second video frame, it is necessary to further determine whether each key feature point is visible. After determining each visible key feature point, by analyzing whether the pixel position of each visible key feature point on the reconstructed three-dimensional face and the second video frame is consistent, the position reconstruction error of each visible key feature point before and after reconstruction is calculated, and then the corresponding key point loss function is obtained. At this time, for the face with a large head rotation angle in the second video frame, only the visible half-side key feature points need to be selected to calculate the corresponding key point reconstruction loss, and the invisible key feature points do not participate in the loss calculation of the key point reconstruction.

[0090] Exemplarily, the key point loss function in this embodiment may be:

[0091] in, is the position coordinate of the jth key feature point in the second video frame of the i-th video frame training pair, is the position coordinate of the jth key feature point in the 3D face reconstructed from the second video frame in the i-th video frame training pair, v ij Indicates the visibility of the jth key feature point. The visible key feature point is set to 1, and the invisible key feature point is set to 0. j is the weight of the jth key feature point in the loss function. Different weights are used for different facial parts (such as eyes, mouth, contour points, etc.). These weights are adjusted by w j to control the size.

[0092] 3) The process of determining the identity feature loss function is as follows: the three-dimensional face corresponding to the second video frame and the second video frame are respectively input into a pre-built face recognition model to obtain the first identity feature of the second video frame and the second identity feature of the three-dimensional face corresponding to the second video frame; based on the similarity between the first identity feature and the second identity feature, the corresponding identity feature loss function is calculated.

[0093] Specifically, for the identity feature loss function, the essence is to analyze whether the identity features before and after reconstruction have changed. Therefore, for the identity feature recognition, this embodiment can pre-construct a corresponding face recognition model, and use the face recognition model to extract the identity features before and after reconstruction; first, the second video frame and the reconstructed three-dimensional face are respectively input into the face recognition model, and the face features in the second video frame and the three-dimensional face are respectively analyzed by the face recognition model, so as to respectively determine the first identity feature corresponding to the second video frame and the second identity feature corresponding to the three-dimensional face, so as to subsequently determine whether there are errors in the identity features before and after reconstruction. After obtaining the first identity feature corresponding to the second video frame and the second identity feature corresponding to the three-dimensional face, in order to analyze whether there are errors in the identity features before and after reconstruction, it is first necessary to determine the similarity between the first identity feature and the second identity feature, and then calculate the corresponding identity feature loss function based on the similarity.

[0094] Exemplarily, the identity feature loss function in this embodiment may be:

[0095] in, is the first identity feature corresponding to the second video frame in the i-th video frame training pair, is the second identity feature corresponding to the three-dimensional face reconstructed from the second video frame in the i-th video frame training pair.

[0096] 4) The albedo penalty function is determined by: calculating the albedo of each mesh vertex in the three-dimensional face corresponding to the second video frame; and calculating the corresponding albedo penalty function based on the albedo of each mesh vertex in the three-dimensional face and a preset albedo interval.

[0097] Specifically, the present embodiment can calculate the albedo of each pixel by detecting the color and reflected light intensity of each pixel in the second video frame, and then set the albedo of each vertex on the reconstructed three-dimensional face according to the position matching of each vertex in the reconstructed three-dimensional face and each pixel in the second video frame to ensure the consistency of the face albedo before and after reconstruction. At this time, in order to ensure that the albedo of each vertex in the reconstructed three-dimensional face is not too dark or too bright, the present embodiment will adjust the albedo on each vertex in the three-dimensional face accordingly, and a reasonable preset albedo interval will be pre-set at this time. The preset albedo interval in the present embodiment can be [0.05, 0.95], so that the albedo of each vertex in the reconstructed three-dimensional face can all be within the preset albedo interval. Therefore, by analyzing whether the albedo of each vertex in the three-dimensional face is within the preset albedo interval, the corresponding albedo penalty function can be calculated to continuously optimize the albedo on the reconstructed three-dimensional face during the training process.

[0098] Exemplarily, the albedo penalty function in this embodiment may be:

[0099] Among them, T i,j is the albedo of the j-th pixel in the second video frame of the i-th video frame training pair, is the albedo of the j-th pixel in the 3D face reconstructed from the second video frame in the i-th video frame training pair.

[0100] Based on this, in this embodiment, the loss function between the three-dimensional face corresponding to the second video frame and the second video frame under the preset two-dimensional supervision item can be expressed as: L fidelity =λ p L photometric +λ l L landmark +λ id L perception +λ b L box ; where λ p , l , id and λ b They are the weights corresponding to each loss function under the preset two-dimensional supervision item.

[0101] S340, generating a corresponding fitting loss function based on each loss function and the corresponding weight, and using the fitting loss function to reversely correct the student network model to train the student network model.

[0102] Specifically, after calculating each loss function between the three-dimensional face and the second video frame and adjusting the weight corresponding to each loss function, the weight corresponding to each loss function is used to integrate the loss functions to generate a corresponding fitting loss function, and the fitting loss function is used as the loss function of the entire training process of the student network model. The fitting loss function is then used to perform back propagation according to the entire training process to correct the network parameters in the student network model. Then, the corrected student network model is used to continue to estimate the dynamic reconstruction parameters when reconstructing the three-dimensional face in the second video frame in the next video frame training pair according to the above steps, thereby continuing the training process and continuously performing reverse correction on the student network model to obtain the trained student network model. At this time, the fitting loss function in this embodiment makes the reference information in the training process more comprehensive, thereby improving the accuracy of the student network model's estimation of the dynamic reconstruction parameters.

[0103] Exemplarily, the fitting loss function in this embodiment is: L = L fidelity +L regularization Among them, L fidelityis the loss function between the three-dimensional face corresponding to the second video frame and the second video frame under the preset two-dimensional supervision term, L regularization is the loss function between the second comprehensive reconstruction parameter and the target dynamic reconstruction parameter.

[0104] The technical solution provided in this embodiment is for the student network model obtained after distillation of the teacher network model. The various comprehensive reconstruction parameters estimated by the teacher network model for the first video frame and the second video frame in each video frame training pair are used as references to analyze the accuracy of the dynamic reconstruction parameters estimated by the student network model for the second video frame, and the steady-state reconstruction parameters estimated by the teacher network model for the first video frame and the dynamic reconstruction parameters estimated by the student network model for the second video frame are input into the three-dimensional deformation model to reconstruct the three-dimensional face corresponding to the second video frame. At this time, by analyzing the loss function between the three-dimensional face corresponding to the second video frame and the second video frame under the preset two-dimensional supervision item, and the loss function between the dynamic reconstruction parameters of the second video frame estimated in the teacher network model and the student network model respectively, the student network model can be continuously reversely corrected, so as to train a student network model with high estimation accuracy. At this time, the reference information of the student network model in the overall training process is more comprehensive, which improves the estimation accuracy of the student network model for the dynamic reconstruction parameters, so that on the basis of ensuring the stability of the three-dimensional face reconstruction of continuous video frames, the personalized reconstruction of the three-dimensional face of each video frame is achieved, thereby improving the accuracy of the three-dimensional face reconstruction.

[0105] Embodiment 4

[0106] Figure 4 A schematic diagram of the structure of a device for three-dimensional face reconstruction provided by Embodiment 4 of the present invention, specifically, Figure 4 As shown, the device may include:

[0107] The reconstruction parameter estimation module 410 is used to input the current video frame into the student network model distilled from the teacher network model to estimate the dynamic reconstruction parameters of the current video frame under the 3D face reconstruction if the steady-state reconstruction parameters of the current video frame under the 3D face reconstruction have been estimated by the pre-built teacher network model;

[0108] The 3D face reconstruction module 420 is used to input the steady-state reconstruction parameters and the dynamic reconstruction parameters into a pre-built 3D deformable model to reconstruct a 3D face corresponding to the current video frame.

[0109] The technical solution provided by this embodiment takes into account that the same face may be contained in consecutive video frames in the same video. Therefore, the steady-state reconstruction parameters of each video frame that hardly change under 3D face reconstruction are uniformly estimated in advance through a pre-built teacher network model. When 3D face reconstruction is subsequently performed on each current video frame, the dynamic reconstruction parameters of the current video frame under 3D face reconstruction can be directly estimated through the student network model distilled from the teacher network model. At this time, the student network model is obtained after knowledge distillation of the teacher network model, and there is no need to calculate the steady-state reconstruction parameters of each video frame under 3D face reconstruction separately, which greatly reduces the computational overhead of 3D face reconstruction, thereby improving the 3D face quality. The high efficiency of reconstruction is improved, and the accuracy of dynamic reconstruction parameters of the current video frame under 3D face reconstruction is ensured; then, the steady-state reconstruction parameters and dynamic reconstruction parameters of the current video frame under 3D face reconstruction are directly input into a pre-built 3D deformation model to reconstruct the 3D face corresponding to the current video frame. At this time, the steady-state reconstruction parameters of consecutive video frames under 3D face reconstruction remain unchanged, thereby avoiding the jitter problem of consecutive video frames under 3D face reconstruction. At the same time, the dynamic reconstruction parameters of each video frame under 3D face reconstruction are utilized to achieve personalized reconstruction of the 3D face of each video frame on the basis of ensuring the stability of 3D face reconstruction of consecutive video frames, thereby improving the accuracy of 3D face reconstruction.

[0110] The device for three-dimensional face reconstruction provided in this embodiment can be applied to the method for three-dimensional face reconstruction provided in any of the above embodiments, and has corresponding functions and beneficial effects.

[0111] Embodiment 5

[0112] Figure 5 A schematic diagram of the structure of a computer device provided in Embodiment 5 of the present invention is shown in FIG. Figure 5 As shown, the device includes a processor 50, a storage device 51 and a communication device 52; the number of processors 50 in the device can be one or more. Figure 5 A processor 50 is taken as an example; the processor 50, the storage device 51 and the communication device 52 in the device can be connected by a bus or other means. Figure 5 The example of connecting through bus is taken in the following.

[0113] The computer device provided in this embodiment can be used to execute the method for three-dimensional face reconstruction provided in any of the above embodiments, and has corresponding functions and beneficial effects.

[0114] Embodiment 6

[0115] Embodiment 6 of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the method for three-dimensional face reconstruction in any of the above embodiments can be implemented. The method may specifically include:

[0116] If the steady-state reconstruction parameters of the current video frame under 3D face reconstruction have been estimated by the pre-built teacher network model, the current video frame is input into the student network model distilled from the teacher network model to estimate the dynamic reconstruction parameters of the current video frame under 3D face reconstruction;

[0117] The steady-state reconstruction parameters and the dynamic reconstruction parameters are input into a pre-built three-dimensional deformable model to reconstruct a three-dimensional human face corresponding to the current video frame.

[0118] Of course, the storage medium containing computer executable instructions provided by an embodiment of the present invention is not limited to the method operations described above, and the computer executable instructions can also execute related operations in the method for three-dimensional face reconstruction provided by any embodiment of the present invention.

[0119] Through the above description of the implementation methods, the technicians in the relevant field can clearly understand that the present invention can be implemented by means of software and necessary general hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.

[0120] It is worth noting that in the embodiment of the above-mentioned three-dimensional face reconstruction device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.

[0121] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for three-dimensional face reconstruction, characterized in that: include: If the steady-state reconstruction parameters of the current video frame under 3D face reconstruction have been estimated by the pre-built teacher network model, the current video frame is input into the student network model distilled from the teacher network model to estimate the dynamic reconstruction parameters of the current video frame under 3D face reconstruction; Inputting the steady-state reconstruction parameters and the dynamic reconstruction parameters into a pre-built three-dimensional deformable model to reconstruct a three-dimensional face corresponding to the current video frame; If the steady-state reconstruction parameters of the current video frame under three-dimensional face reconstruction are not estimated by the pre-constructed teacher network model, the current video frame is input into the teacher network model, the comprehensive reconstruction parameters of the current video frame under three-dimensional face reconstruction are estimated, and the comprehensive reconstruction parameters of the current video frame under three-dimensional face reconstruction are input into the three-dimensional deformation model to reconstruct the three-dimensional face corresponding to the current video frame.

2. The method according to claim 1, characterized in that Before inputting the current video frame into the student network model distilled from the teacher network model and estimating the dynamic reconstruction parameters of the current video frame under 3D face reconstruction, the method further includes: An associated video frame having the same face as the current video frame is input into the teacher network model, comprehensive reconstruction parameters of the associated video frame under three-dimensional face reconstruction are estimated, and steady-state reconstruction parameters in the comprehensive reconstruction parameters are used as steady-state reconstruction parameters of the current video frame under three-dimensional face reconstruction.

3. The method according to claim 2, characterized in that The associated video frame is the first video frame in the video where the current video frame is located that has the face of the person in the current video frame, or the first target number of video frames in the video where the current video frame is located that have the face of the person in the current video frame; Correspondingly, if the associated video frame is a video frame having a previous target number of human faces in the current video frame in the video where the current video frame is located, then using the steady-state reconstruction parameters in the comprehensive reconstruction parameters as steady-state reconstruction parameters of the current video frame under three-dimensional face reconstruction includes: Steady-state reconstruction parameters of the same type in the comprehensive reconstruction parameters of the associated video frames are respectively fused to obtain steady-state reconstruction parameters of the current video frame.

4. The method according to claim 1, characterized in that: The student network model is obtained by distilling the teacher network model using the following steps: Inputting a first video frame and a second video frame in a video frame training pair having the same face in a video training set into the teacher network model, estimating a first comprehensive reconstruction parameter of the first video frame under 3D face reconstruction and a second comprehensive reconstruction parameter of the second video frame under 3D face reconstruction; Inputting the second video frame in the video frame training pair into the student network model, estimating the target dynamic reconstruction parameters of the second video frame under 3D face reconstruction, and inputting the target steady-state reconstruction parameters and the target dynamic reconstruction parameters in the first comprehensive reconstruction parameters into the 3D deformable model, reconstructing the 3D face corresponding to the second video frame; Calculating a loss function between the second comprehensive reconstruction parameter and the target dynamic reconstruction parameter, and a loss function between the three-dimensional face corresponding to the second video frame and the second video frame under a preset two-dimensional supervision item, and adjusting a weight corresponding to each of the loss functions; A corresponding fitting loss function is generated based on each loss function and the corresponding weight, and the student network model is reversely corrected using the fitting loss function to train the student network model.

5. The method according to claim 4, characterized in that The loss functions under the preset two-dimensional supervision items include: image pixel loss function, key point loss function, identity feature loss function and albedo penalty function.

6. The method according to claim 5, characterized in that If the image pixel loss function between the three-dimensional face corresponding to the second video frame and the second video frame is calculated, the method further includes: Segmenting a corresponding skin mask from the second video frame; Accordingly, the step of calculating the image pixel loss function between the three-dimensional face corresponding to the second video frame and the second video frame includes: Based on the skin mask, a pixel error between the three-dimensional face corresponding to the second video frame and the same pixel point in the second video frame within the face skin region is calculated to obtain a corresponding image pixel loss function.

7. The method according to claim 5, characterized in that If a key point loss function between the three-dimensional face corresponding to the second video frame and the second video frame is calculated, the method further includes: Extracting key feature points at preset positions from the second video frame, and determining visibility of each of the key feature points; Correspondingly, calculating the key point loss function between the three-dimensional face corresponding to the second video frame and the second video frame includes: A position reconstruction error between the three-dimensional face corresponding to each visible key feature point in the second video frame and the second video frame is calculated to obtain a corresponding key point loss function.

8. The method according to claim 5, characterized in that If the identity feature loss function between the three-dimensional face corresponding to the second video frame and the second video frame is calculated, the method further includes: Inputting the three-dimensional face corresponding to the second video frame and the second video frame into a pre-built face recognition model respectively to obtain a first identity feature of the second video frame and a second identity feature of the three-dimensional face corresponding to the second video frame; Accordingly, calculating the identity feature loss function between the three-dimensional face corresponding to the second video frame and the second video frame includes: According to the similarity between the first identity feature and the second identity feature, a corresponding identity feature loss function is calculated.

9. The method according to claim 5, characterized in that If the albedo penalty function of the three-dimensional face corresponding to the second video frame is calculated, the method further includes: Calculating the albedo of each mesh vertex in the three-dimensional face corresponding to the second video frame; Correspondingly, the calculating the albedo penalty function of the three-dimensional face corresponding to the second video frame includes: Based on the albedo of each mesh vertex in the three-dimensional face and a preset albedo interval, a corresponding albedo penalty function is calculated.

10. The method according to claim 1, characterized in that The three-dimensional deformation model is composed of a bilinear face model and a principal component analysis (PCA) model. The bilinear face model defines a core tensor of a three-dimensional face. The core tensor is composed of three dimensions: mesh vertices, face shape, and face expression of the three-dimensional face. The PCA model defines an average face albedo and a principal component basis representing a change in face albedo; Accordingly, the step of inputting the steady-state reconstruction parameter and the dynamic reconstruction parameter into a pre-built three-dimensional deformable model to reconstruct a three-dimensional face corresponding to the current video frame includes: Inputting the reconstruction parameters representing the changes in the facial appearance in the steady-state reconstruction parameters and the reconstruction parameters representing the changes in the facial expressions in the dynamic reconstruction parameters into the bilinear face model, adjusting the core tensor, and obtaining a corresponding three-dimensional deformable face; The three-dimensional deformable face and the reconstruction parameters of the steady-state reconstruction parameters and the dynamic reconstruction parameters that match the principal component basis under the PCA model are input into the PCA model, and the albedo of the three-dimensional deformable face is corrected based on the average albedo of the face to obtain a reconstructed three-dimensional face.

11. The method according to claim 10, characterized in that Before inputting the steady-state reconstruction parameters and the dynamic reconstruction parameters into the pre-built three-dimensional deformable model to reconstruct the three-dimensional face corresponding to the current video frame, the method further includes: Three-dimensional face scanning data from a multi-dimensional data source is collected, and a high-order singular value decomposition is performed on the three-dimensional face reconstructed from the three-dimensional face scanning data in terms of face shape dimension and face expression dimension to obtain a corresponding core tensor.

12. The method according to claim 10, characterized in that The three-dimensional deformation model also defines illumination parameters representing changes in illumination of the face, position parameters representing translation of the face, and rotation parameters representing the head posture of the face.

13. The method according to any one of claims 1 to 12, characterized in that: After the steady-state reconstruction parameters and the dynamic reconstruction parameters are input into a pre-built three-dimensional deformable model to reconstruct the three-dimensional face corresponding to the current video frame, the method further includes: A differentiable renderer is used to render the three-dimensional face corresponding to the current video frame.

14. A device for three-dimensional face reconstruction, characterized in that: include: A reconstruction parameter estimation module, for, if the steady-state reconstruction parameters of the current video frame under 3D face reconstruction have been estimated by a pre-built teacher network model, inputting the current video frame into a student network model distilled from the teacher network model to estimate the dynamic reconstruction parameters of the current video frame under 3D face reconstruction; A three-dimensional face reconstruction module, used for inputting the steady-state reconstruction parameters and the dynamic reconstruction parameters into a pre-built three-dimensional deformable model to reconstruct a three-dimensional face corresponding to the current video frame; The device is also used for: if the steady-state reconstruction parameters of the current video frame under three-dimensional face reconstruction are not estimated by the pre-constructed teacher network model, the current video frame is input into the teacher network model to estimate the comprehensive reconstruction parameters of the current video frame under three-dimensional face reconstruction, and the comprehensive reconstruction parameters of the current video frame under three-dimensional face reconstruction are input into the three-dimensional deformation model to reconstruct the three-dimensional face corresponding to the current video frame.

15. A computer device, characterized in that: The computer device comprises: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method for three-dimensional face reconstruction as described in any one of claims 1-13.

16. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for three-dimensional face reconstruction as described in any one of claims 1 to 13 is implemented.

Citation Information

Patent Citations

  • Image processing method, device and system

    CN109325437A

  • End-to-end three-dimensional face reconstruction method based on neural network

    CN110619676A

  • Depth model customization method based on knowledge recombination

    CN111160124A

  • Face recognition model construction method, face recognition method and related devices

    CN111259738A

  • Expression synthesis method and device based on phoneme driving and computer storage medium

    CN111508064A