A method for reconstructing high-definition 3D facial texture from a single image based on GAN

Through a GAN-based method, combined with DANF and ETSRGAN networks, the problem of lack of annotation data and insufficient accuracy in 3D face reconstruction is solved, high-quality high-definition 3D facial texture reconstruction is achieved, and alignment accuracy and texture resolution are improved.

CN114119874BActive Publication Date: 2024-10-22EAST CHINA NORMAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111412652.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-25
Publication Date
2024-10-22
Estimated Expiration
2041-11-25

AI Technical Summary

Technical Problem

Existing 3D face reconstruction technology suffers from the lack of high-quality annotation data during the training process, insufficient reconstruction accuracy, and the dependence of reconstructed texture clarity on image resolution. In particular, it is difficult to achieve detailed super-resolution processing when processing noisy images. .

Method used

Using a GAN-based method, the generative network with bottleneck residual blocks (DANF) and the enhanced texture super-resolution generative adversarial network (ETSRGAN) are trained through the face data set, combined with the data set stretching algorithm and dense alignment network, to improve 3D face alignment accuracy and generation of HD facial textures.

Benefits of technology

The 3D face alignment accuracy and resolution of the reconstruction results are significantly improved. The generated 3D face texture reaches 1K resolution, which improves the alignment accuracy by 18.1% compared to the existing technology and improves the clarity of the reconstructed model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114119874B_ABST
    Figure CN114119874B_ABST
Patent Text Reader

Abstract

A method for reconstructing high-definition 3D facial texture from a single image based on GAN, wherein a generative network with a bottleneck residual block, i.e., a face dense alignment network, is trained through a face data set, and a high-definition facial texture data set is further generated based on DANF for training a super-resolution network with a residual dense block, i.e., an enhanced texture super-resolution generative adversarial network, and finally corresponding high-definition facial texture is generated through the trained ETSRGAN. The present invention introduces texture super-definition and considers face images at different angles, and adopts a GAN-based model to remodel a 3D model reconstructed from a single image, so as to effectively generate high-definition facial texture.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a technology in the field of image processing, specifically a method for reconstructing high-definition 3D facial texture from a single image based on GAN. Background Art

[0002] Existing 3D face reconstruction methods are designed to let the model learn 3DMM parameters. The three-dimensional dense face alignment technology (3DDFA) [Zhu X, Zhen L, Liu X, et al. Face Alignment Across Large Poses: A3D Solution [C] / / 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR). IEEE, 2016.] first introduced convolutional neural networks in face alignment. This approach is equivalent to converting 3D face models into images to solve the problem of face reconstruction. 3DMM CNN [Tran AT, Hassner T, Masi I, et al. Regressing Robust and Discriminative 3D Morphable Models with a Very Deep Neural Network [J]. IEEE, 2017.] is a very simple regression model, which uses the ResNet101 network to directly regress the shape coefficient and texture coefficient of the 3DMM. Microsoft's Accurate 3D Face Reconstruction with Weakly-Supervised Learning: From Single Image to Image Set[J].2019.] introduces a robust loss function that considers both pixel level and perception level. 2DASL[Tu X,Zhao J,Xie M,etal.3D face reconstruction from a single image assisted by 2D face images in the wild[J].IEEE Transactions on Multimedia,2020.] introduces the idea of ​​self-supervision, aiming to improve the model effect caused by the current small number of 2D corresponding to 3D data sets.

[0003] Although the 3D face reconstruction algorithm based on deep learning can quickly generate the 3D model results of the input image, it still faces many problems during the training process. The first is the lack of high-quality annotated data. For a 3D model, it is usually scanned by a 3D scanner. If the topological structure is unified, the 3D result after scanning needs to be cleaned and reconstructed. It is very time-consuming and costly. For the problem of lack of high-quality annotated data, the key point fitting method is usually used. How to better utilize the existing high-quality annotated data is an important breakthrough. The second is the accuracy of 3D face reconstruction. At present, there are two directions for 3D face reconstruction. One is to train the model to fit the face parameters, and the other is to train the model to directly fit the 3D face vertices. These two methods have their own advantages and disadvantages. How to optimize the model framework to improve the reconstruction accuracy is an urgent problem to be solved. The third is the texture clarity of the reconstructed face. There is an obvious problem in the single-image 3D face reconstruction that the reconstructed texture is very dependent on the resolution of the given image. How to ensure the lower limit of the clarity of the reconstructed model is very important. Summary of the invention

[0004] In view of the shortcomings of the prior art that images with noise (such as light) cannot be processed in detail with super-resolution, the present invention proposes a method for reconstructing high-definition 3D facial texture from a single image based on GAN. Texture super-definition is introduced and face images at different angles are considered. The 3D model reconstructed from a single image is remodeled using a GAN-based model, which can effectively generate high-definition facial texture.

[0005] The present invention is achieved through the following technical solutions:

[0006] The present invention relates to a method for reconstructing high-definition 3D facial texture from a single image based on GAN. A generative network with a bottleneck residual block, namely a dense alignment network for face (DANF), is trained by a face data set. A high-definition facial texture data set is further generated based on DANF for training a super-resolution network with a residual dense block, namely an enhanced texture super-resolution generative adversarial network (ETSRGAN). Finally, the trained ETSRGAN is used to generate the corresponding high-definition facial texture.

[0007] The enhanced texture super-resolution generative adversarial network comprises: a first convolutional layer, a plurality of dense residual blocks, a second convolutional layer, an upsampling layer, a third convolutional layer and a fourth convolutional layer connected in sequence.

[0008] Technical Effects

[0009] The present invention uses a dataset stretching algorithm and a dense face alignment network, and introduces an enhanced texture super-resolution generative adversarial network to change the relative discriminator to an absolute discriminator, which can improve the 3D face alignment accuracy and improve the 3D face reconstruction result to 1K resolution. Compared with the prior art, the present invention expands and crops the boundary part of the face key points of the face dataset by 1.58 times, obtains the cropped image and the corresponding face key points, compresses the cropped image and the corresponding face key points by 3 / 4 up and down and 3 / 4 left and right, and then expands and crops the boundary part of the face key points again by 1.58 times, and finally uses all the transformed images and the corresponding face key points to perform 3DMMFitting to obtain the final required face image and the corresponding face parameter data pair. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] Figure 1 It is a flow chart of the present invention;

[0011] Figure 2 Schematic diagram of the network model of the embodiment (the characters in the figure are fictitious). DETAILED DESCRIPTION

[0012] like Figure 1 As shown, this embodiment relates to a method for reconstructing high-definition 3D facial texture from a single image based on GAN. This embodiment uses the face dataset 300W-LP and uses Python to perform the following processing:

[0013] Step 1: Determine the cropping range of the face data set according to the pre-annotated facial key points to crop the image, obtain the preprocessed data of the target size, and divide the preprocessed data ratio into a training set and a test set. Specifically, expand the boundary part of the 68 facial key points by 1.58 times and crop them. After obtaining the cropped image and the corresponding 68 facial key points, the cropped image and the corresponding facial key points are rotated by ±60°, ±45°, ±30°, and ±15°, flipped, compressed by 3 / 4 up and down, and compressed by 3 / 4 left and right. Then, the boundary part of the facial key points is expanded by 1.58 times and cropped again. Finally, all the transformed images and the corresponding facial key points are used for 3DMMFitting to obtain the final required facial image and the corresponding facial parameter data pair.

[0014] The division described above divides the preprocessed data into a training set, a validation set and a test set in a ratio of 8:1:1.

[0015] Step 2: Input the training set into the face dense alignment network to obtain face parameter representation;

[0016] The face parameter representation includes: scaling parameter T GT ∈R 3×3, translation parameter offset GT ∈R 1×3 , face parameter α GT ∈R 50 ; T∈R 3×3 , offset∈R 1×3 , α∈R 50 , where GT represents the true value.

[0017] The generative network with bottleneck residual blocks combines MobileNet-V1 and MobileNet-V2, and changes the depth separable blocks of MobileNet-V1 into the bottleneck residual blocks of MobileNet-V2, including: a standard convolution kernel layer, several bottleneck residual blocks, an average pooling layer and a fully connected layer, wherein: each bottleneck residual block adopts a structure of first increasing dimension and then reducing dimension.

[0018] The bottleneck residual blocks all include: a 1×1 convolution kernel, 3×3 convolutions for each channel, and a 1×1 convolution kernel.

[0019] Step 3: Calculate the face parameter alignment loss L according to the face parameter representation by calling Pytorch and Python packages para =||w T ·Tdiff||+||w offset ·offsetDiff||+||w α ·αdiff||, where: weight w T ∈R 3×3 , w offset ∈R 1×3 , w α ∈R 50 And w T =Tdiff·||S||, w α = f·αdiff·||A||, scaling parameter alignment difference Tdiff=abs(T GT )-abs(T), translation parameter alignment difference offsetDiff=abs(offset GT )-abs(offset), face parameter alignment difference αdiff=abs(α GT )-abs(α), A is the shape and expression basis, f is the scaling factor, and VN is the number of face vertices;

[0020] The average face model provided by 3DDFA ([Zhu X, Zhen L, Liu X, et al. Face Alignment Across Large Poses: A 3D Solution[C] / / 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR). IEEE, 2016.]).

[0021] Step 4: Representation based on face parameters and average face model Calculate the face vertex alignment loss L vec =S GT -S, where:

[0022] The objective function of the training of the face dense alignment network is L total =L para +L vec ; By calling optimization functions such as back propagation in Pytorch, the parameters of the face dense alignment network are trained according to the objective function until the loss converges.

[0023] Step 5: Use the face dense alignment network to construct a high-definition facial texture dataset, and divide the preprocessed data into training and test sets.

[0024] The high-definition facial texture dataset is obtained in the following way:

[0025] i) Use the StyleGAN-based SeePrettyFace public high-definition face generation preprocessing model to quickly generate a large number of high-definition side profile photos of people;

[0026] The high-definition face generation preprocessing model adopts but is not limited to StyleGAN2 ([Karras T, Laine S, Aittala M, et al. Analyzing and Improving the Image Quality of StyleGAN[C] / / 2020IEEE / CVF Conference on Computer Vision and Pattern Recognition(CVPR).IEEE, 2020.])

[0027] ii) using the trained face dense alignment network to generate the corresponding high-definition incomplete texture for the high-definition side photo of the person obtained in step ii), and obtaining a high-definition complete texture dataset through partial symmetry of the complete side texture;

[0028] iii) adding false lighting and false shadows to each complete texture obtained in step ii), and finally obtaining a low-resolution incomplete lighting texture (256, 256) and a high-resolution complete unlit texture (1024, 1024) as a facial texture training set.

[0029] Step 6: Input the training set obtained in step 5 into the super-resolution network with residual dense blocks to obtain the super-resolution facial texture S t ;

[0030] The enhanced texture super-resolution generative adversarial network is based on ESRGAN ([X Wang, K Yu, S Wu, et al. ESRGAN: Enhanced Super-Resolution Generative Adversarial Networks [c] / / Computer Science - Computer Vision and Pattern Recognition (CVPR). IEEE, 2018.]), and specifically includes: a first convolution layer, a plurality of dense residual blocks, a second convolution layer, an upsampling layer, a third and a fourth convolution layer connected in sequence, wherein: the first convolution layer obtains the first convolution result according to the input image information, the plurality of dense residual blocks perform multiple dense residual processing according to the first convolution result information, and then perform the second convolution, further, the upsampling layer performs upsampling processing according to the secondary convolution result, and outputs the upsampling result, the third convolution layer performs convolution processing, outputs the third convolution result, and the fourth convolution layer performs the last convolution processing according to the third convolution information, and outputs the super-resolution facial texture result.

[0031] The convolution kernel size of the convolution layer is 3, the step size is 1, and the padding size is 1.

[0032] The dense residual block is composed of three dense blocks, and each dense block is further composed of five convolutional layers.

[0033] Step 7: Super-resolution facial texture S obtained by training in step 6 t And the true value of the training sample obtained in step 5, by calculating the perceptual loss L percep , Fighting Losses Training the enhanced texture super-resolution generative adversarial network includes the following steps:

[0034] e1. Initialize the batch size of low-resolution texture LDTextureBatch and the corresponding high-resolution texture HDTextureBatch;

[0035] e2. Obtain the generated results through the generation network G of the ESRGAN network;

[0036] e3. Minimize the loss function L D :

[0037] Update the discriminative network parameters θ through back propagation D ;

[0038] e4. Minimize the perceptual loss L percep : Where: L VGG / i,j is the minimum mean square error:

[0039] e5. Minimize the loss function L G :

[0040] Generate network parameters θ by back-propagation update G .

[0041] Step 8: Use the face dense alignment network trained in steps 3 and 4 and the enhanced texture super-resolution generative adversarial network trained in step 7 to generate the corresponding high-definition 3D facial texture according to the test set in step 1.

[0042] like Figure 2 As shown, a system for reconstructing high-definition 3D faces from a single image based on GAN for implementing the above method involved in this embodiment includes: a dense face alignment network and an enhanced texture super-resolution generative adversarial network, wherein: the dense face alignment network obtains predicted face parameter results based on input image information containing faces, and the enhanced texture super-resolution generative adversarial network performs super-resolution processing based on low-resolution facial texture information in the predicted face parameter results to obtain a facial texture result with a 1K resolution, and finally combines the 3D face model in the predicted face parameter results with the facial texture result with a 1K resolution to generate a final 3D high-definition facial texture.

[0043] After specific practical experiments, under the specific environment settings of Tesla P40 GPU and Python PyTorch framework, λ=10 -4 The fixed learning rate is trained from scratch for 50 periods, the batch size is 1024, the training time is about 40 hours, the model training data size is 120×120 resolution, and the project has an average inference time of 23ms.

[0044] Compared with the prior art, this method can improve the accuracy of face alignment by using the stretching algorithm of the face dataset and the proposed DANF network. For example, for the 3DDFA test set, the normalized mean error (NME) is used to evaluate the alignment accuracy. The alignment accuracy error of 3DDFA is 0.0698, and the alignment accuracy error of this method is 0.05712, which is an improvement of 18.1%. The present invention can improve the facial texture of the generated 3D face model to 1K by using the enhanced texture super-resolution generative adversarial network.

[0045] The above-mentioned specific implementation can be partially adjusted in different ways by those skilled in the art without departing from the principle and purpose of the present invention. The protection scope of the present invention shall be based on the claims and shall not be limited by the above-mentioned specific implementation. Each implementation scheme within its scope shall be subject to the constraints of the present invention.

Claims

1. A method for reconstructing high-definition 3D facial texture from a single image based on GAN, characterized in that: The generative network with bottleneck residual blocks, i.e., face dense alignment network, is trained through face datasets, and high-definition facial texture datasets are further generated based on DANF for training super-resolution networks with residual dense blocks, i.e., enhanced texture super-resolution generative adversarial networks. Finally, the corresponding high-definition facial textures are generated through the trained ETSRGAN. The face dense alignment network includes: a standard convolution kernel layer, a plurality of bottleneck residual blocks, an average pooling layer and a fully connected layer, wherein: each bottleneck residual block adopts a structure of first increasing dimension and then reducing dimension; The enhanced texture super-resolution generative adversarial network comprises: a first convolutional layer, a plurality of dense residual blocks, a second convolutional layer, an upsampling layer, a third and a fourth convolutional layer connected in sequence; The method for reconstructing high-definition 3D facial texture from a single image specifically comprises: Step 1: Determine the cropping range of the face dataset according to the pre-annotated facial key points to crop the image to obtain preprocessed data of the target size, and divide the preprocessed data into a training set and a test set according to the ratio; Step 2: Input the training set into the face dense alignment network to obtain the scaling parameter T GT ∈R 3×3 , translation parameter offset GT ∈R 1×3 , face parameter α GT ∈R 50 ; T∈R 3×3 , offset∈R 1×3 , α∈R 50 The face parameter representation is: GT represents the true value; Step 3: Calculate the face parameter alignment loss L according to the face parameter representation by calling Pytorch and Python packages para =||w T ·Tdiff||+||w offset ·offsetDiff||+||w α ·αdiff||, where: weight w T ∈R 3×3 ,w offset ∈R 1×3 ,w α ∈R 50 And w T =Tdiff·||S||, w α = f·αdiff·||A||, scaling parameter alignment difference Tdiff=abs(T GT )-abs(T), translation parameter alignment difference offsetDiff=abs(offset GT )-abs(offset), face parameter alignment difference adiff=abs(α GT )-abs(α), A is the shape and expression basis, f is the scaling factor, and VN is the number of face vertices; is the average face model; Step 4: Representation based on face parameters and average face model Calculate the face vertex alignment loss L vec =S GT –S, where: The objective function of the face dense alignment network is L total =L para +L vec ; By calling the back propagation optimization function in Pytorch, the parameters of the face dense alignment network are trained according to the objective function until the loss converges; Step 5: Use the face dense alignment network to construct a high-definition facial texture dataset, and divide the preprocessed data into a training set and a test set; Step 6: Input the training set obtained in step 5 into the super-resolution network with residual dense blocks to obtain the super-resolution facial texture S t ; Step 7: Super-resolution facial texture S obtained by training in step 6 t And the true value of the training sample obtained in step 5, by calculating the perceptual loss L percep , Fighting Losses Training a generative adversarial network for enhanced texture super-resolution; Step 8: Use the face dense alignment network trained in steps 3 and 4 and the enhanced texture super-resolution generative adversarial network trained in step 7 to generate the corresponding high-definition 3D facial texture according to the test set in step 1; The preprocessed data is specifically as follows: the boundary part of 68 facial key points is expanded by 1.58 times and cropped, and after the cropped image and the corresponding 68 facial key points are obtained, the cropped image and the corresponding facial key points are sequentially subjected to the following steps: rotation by ±60°, ±45°, ±30°, ±15°, flipping, vertical compression by 3 / 4, and horizontal compression by 3 / 4, and then the boundary part of the facial key points is expanded by 1.58 times and cropped again, and finally all the transformed images and the corresponding facial key points are used to perform three-dimensional variable face adaptation to obtain the final required facial image and the corresponding facial parameter data pair; The step seven specifically includes: e1. Initialize the batch size of low-resolution texture LDTextureBatch and the corresponding high-resolution texture HDTextureBatch; e2. Obtain the generated results through the generation network G of the ESRGAN network; e3. Discriminator minimizes the loss function Update the discriminative network parameters θ through back propagation D ; e4. Minimize the perceptual loss L percep : in: is the minimum mean square error: e5. Generator minimizes the loss function Generate network parameters θ by back-propagation update G .

2. The method for reconstructing high-definition 3D facial texture from a single image based on GAN according to claim 1, characterized in that: The high-definition facial texture dataset is obtained in the following way: i) Use a high-definition face generation preprocessing model to quickly generate a large number of high-definition side profile photos of people; ii) using the trained face dense alignment network to generate the corresponding high-definition incomplete texture for the high-definition side photo of the person obtained in step i), and obtaining a high-definition complete texture dataset through partial symmetry of the complete side texture; iii) Add false lighting and false shadows to each complete texture obtained in step ii), and finally obtain a low-resolution incomplete lighting texture of 256×256 and a high-resolution complete unlit texture of 1024×1024 as a facial texture training set.

3. The method for reconstructing high-definition 3D facial texture from a single image based on GAN according to claim 1, characterized in that: The dense residual block is composed of three dense blocks, and each dense block is further composed of five convolutional layers.

4. A system for implementing the method for reconstructing high-definition 3D facial texture from a single image based on GAN as described in any one of claims 1 to 3, characterized in that: include: A dense face alignment network and an enhanced texture super-resolution generative adversarial network, wherein: the dense face alignment network obtains predicted face parameter results based on the input image information containing the face, and the enhanced texture super-resolution generative adversarial network performs super-resolution processing based on the low-resolution facial texture information in the predicted face parameter results to obtain a 1K resolution facial texture result, and finally combines the 3D face model in the predicted face parameter results with the 1K resolution facial texture result to generate the final 3D high-definition facial texture.