Three-dimensional face generation method and electronic device

By performing two refinement processes on the initial 3D face, a clearer target face texture UV map is generated, which solves the problem of low 3D face detail in the existing technology and achieves higher quality 3D face imaging.

CN118657880BActive Publication Date: 2026-02-24HANGZHOU PIXEL INTERACTIVE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410798784.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-19
Publication Date
2026-02-24
Estimated Expiration
2044-06-19

AI Technical Summary

Technical Problem

Existing technologies have low precision when generating 3D faces, resulting in poor image quality.

Method used

The geometric UV map and texture UV map of the face are generated based on the initial 3D face and input into the 3D face detail generation model. They are further processed in the high-definition face texture map generation model to generate a clearer target face texture UV map, which is finally merged to obtain the target 3D face.

Benefits of technology

It improves the imaging quality of 3D faces, generating more detailed and realistic 3D face models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118657880B_ABST
    Figure CN118657880B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a three-dimensional face generation method and an electronic device, wherein the three-dimensional face generation method comprises: obtaining a corresponding face geometry UV map and a face texture UV map from an initial three-dimensional face; the initial three-dimensional face is obtained by three-dimensional reconstruction of a two-dimensional face uploaded by a user; inputting the face geometry UV map and the face texture UV map into a three-dimensional face detail generation model to obtain a face mesh and a face texture UV map with a clarity greater than a first threshold; inputting a face normal map corresponding to the face mesh and the face texture UV map into a high-definition face texture map generation model to obtain a target face texture UV map with a clarity greater than a second threshold; the second threshold is greater than the first threshold; and obtaining a target three-dimensional face according to the face mesh and the target texture UV map. Through the embodiments of the present application, the imaging quality of the three-dimensional face is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of visual processing technology, and in particular to a three-dimensional face generation method and electronic device. Background Technology

[0002] 3D face recognition is a fundamental research area in computer graphics processing, with typical applications including 3D games, visual communication systems, virtual reality augmentation, and medical simulation. With the development of the internet, 3D face generation has become a research hotspot in video telephony and virtual web conferencing applications.

[0003] In related technologies, linear texture basis vectors and face shape basis vectors are extracted from a 2D face. These vectors are then used for 3D mesh reconstruction and UV mapping to generate a 3D face. However, this method produces 3D faces with low detail, reducing the overall image quality.

[0004] Therefore, how to generate high-quality 3D faces has become an urgent problem to be solved. Summary of the Invention

[0005] In view of this, embodiments of this application provide a three-dimensional face generation scheme to at least partially solve the above-mentioned problems.

[0006] According to a first aspect of the embodiments of this application, a three-dimensional face generation method is provided, comprising: obtaining a corresponding face geometry UV map and face texture UV map based on an initial three-dimensional face; the initial three-dimensional face is obtained by three-dimensional reconstruction of a two-dimensional face uploaded by a user; inputting the face geometry UV map and the face texture UV map into a three-dimensional face detail generation model to obtain a face mesh and face texture UV map with a sharpness greater than a first threshold; inputting the face normal map corresponding to the face mesh and the face texture UV map into a high-definition face texture mapping generation model to obtain a target face texture UV map with a sharpness greater than a second threshold; the second threshold is greater than the first threshold; and obtaining a target three-dimensional face based on the face mesh and the target texture UV map.

[0007] According to a second aspect of the embodiments of this application, a three-dimensional face generation apparatus is provided. The apparatus includes: an initial three-dimensional face reconstruction module, used to obtain a corresponding face geometry UV map and face texture UV map based on an initial three-dimensional face; the initial three-dimensional face is obtained by three-dimensional reconstruction of a two-dimensional face uploaded by a user; a three-dimensional face detail generation module, used to input the face geometry UV map and the face texture UV map into a three-dimensional face detail generation model to obtain a face mesh and a face texture UV map with a clarity greater than a first threshold; a three-dimensional face high-definition texture detail generation module, used to input the face normal map corresponding to the face mesh and the face texture UV map into a high-definition face texture map generation model to obtain a target face texture UV map with a clarity greater than a second threshold; the second threshold is greater than the first threshold; and a three-dimensional face generation module, used to obtain a target three-dimensional face based on the face mesh and the target texture UV map.

[0008] According to a third aspect of the present application, an electronic device is provided, comprising: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus; the memory is used to store at least one executable instruction, wherein the executable instruction causes the processor to perform an operation corresponding to the method described in the first aspect.

[0009] According to a fourth aspect of the embodiments of this application, a computer storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect.

[0010] According to the scheme provided in the embodiments of this application, based on an initial 3D face, corresponding face geometry UV maps and face texture UV maps are obtained; the initial 3D face is obtained by 3D reconstruction of a 2D face uploaded by the user; the face geometry UV maps and face texture UV maps are input into a 3D face detail generation model to obtain a face mesh and face texture UV maps with a clarity greater than a first threshold; the face normal map corresponding to the face mesh and the face texture UV maps are input into a high-definition face texture map generation model to obtain a target face texture UV map with a clarity greater than a second threshold; the second threshold is greater than the first threshold; based on the face mesh and the target texture UV maps, a target 3D face is obtained. In this process, the face geometry UV maps and face texture UV maps corresponding to the initial 3D face are input into a 3D face detail generation model, and analyzed and processed by the 3D face detail generation model to generate face details of the initial 3D face, resulting in a refined face mesh and face texture UV maps. Then, the refined face mesh and corresponding face normal map and face texture UV map are input into a high-resolution face texture mapping generation model. This model analyzes and processes the data, generating texture details from the face texture UV map to obtain a more refined target face texture UV map. The face mesh and target texture UV map are then merged to obtain the target 3D face. These two refinement processes on the initial 3D face improve the imaging quality of the 3D face. Attached Figure Description

[0011] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings.

[0012] Figure 1 A flowchart illustrating a three-dimensional face generation method provided in this application embodiment. Figure 1 ;

[0013] Figure 2 This application provides an overall architecture diagram of a 3D face generation system.

[0014] Figure 3 This is a flowchart illustrating a three-dimensional face generation method provided in an embodiment of this application. Figure 2 ;

[0015] Figure 4 An architecture diagram for two-dimensional face reconstruction provided in this application embodiment;

[0016] Figure 5An architecture diagram for obtaining a general three-dimensional face is provided in the embodiments of this application;

[0017] Figure 6 An architecture diagram for initial 3D face generation provided in this application embodiment;

[0018] Figure 7 A training architecture diagram of a 3D face detail generation model provided in this application embodiment;

[0019] Figure 8 An architecture diagram for generating target face texture UV mapping provided in this application embodiment;

[0020] Figure 9 A schematic diagram of a three-dimensional face generation device provided in this application embodiment;

[0021] Figure 10 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. Detailed Implementation

[0022] To enable those skilled in the art to better understand the technical solutions in the embodiments of this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art should fall within the protection scope of the embodiments of this application.

[0023] The following describes the three-dimensional face generation method provided in the embodiments of this application, such as... Figure 1 As shown, Figure 1 This is a flowchart illustrating a three-dimensional face generation method provided in an embodiment of this application. Figure 1 The three-dimensional face generation method provided in this application embodiment can be executed by the three-dimensional face generation device provided in this application embodiment, which can be implemented in software and / or hardware. In a specific embodiment, the device can be integrated into an electronic device, such as a computer or server.

[0024] To adapt to the 3D face generation method provided in the embodiments of this application, the embodiments of this application also provide a general architecture diagram of a 3D face generation system, that is, the 3D face generation method of the embodiments of this application can be applied to the 3D face generation system provided in the embodiments of this application. Figure 2 As shown, Figure 2This application provides an overall architecture diagram of a 3D face generation system, comprising four modules: a key point feature extraction module, an image preprocessing module, an image reconstruction module, and a 3D face progressive refinement module. Specifically, the 3D face progressive refinement module includes generating an initial face mesh and initial texture UVs, further refining the initial face mesh to obtain detailed face mesh generation, refining the initial face texture UVs to obtain texture detail UV map generation, and further refining the texture detail UV map to obtain high-resolution texture UV generation. The clarity of the high-resolution texture is greater than that of the refined texture detail UV map.

[0025] It should be noted that, Figure 2 The overall architecture diagram of the 3D face generation system shown is for illustrative purposes only and does not constitute a limitation on actual application scenarios or deployment methods. In practical applications, the system can be customized according to specific application scenarios and actual needs. Figure 2 The overall architecture diagram of the 3D face generation system shown is adaptively adjusted.

[0026] The following is combined Figure 2 The overall architecture diagram shown illustrates the 3D face generation method provided in the embodiments of this application. Continue reading... Figure 1 This embodiment will be described in detail from the following steps.

[0027] S101. Based on the initial 3D face, obtain the face geometry UV map and face texture UV map; the initial 3D face is obtained by 3D reconstruction of the 2D face uploaded by the user.

[0028] Specifically, the initial 3D face is the first-stage reconstruction result obtained from a 2D face uploaded by the user during the 3D face creation process. It provides the most basic structure and proportions of the 3D face and includes the user's specific features, but the model is relatively coarse and lacks detail. UV mapping is the process and result of unfolding the surface of the 3D face model into 2D texture coordinates. To add texture to the initial 3D face lacking detail, UV texture mapping can be used to determine the mapping position of the texture on the 3D face surface. Face geometry UV mapping is a UV map generated from the geometry of the 3D face, used to accurately represent the structure and shape of the 3D face in UV space. Face texture UV mapping is used to ensure that the texture is displayed on the model as expected. Face geometry UV mapping and face texture UV mapping can be obtained by unfolding, adjusting and optimizing the initial 3D face and mapping textures; this application does not impose any restrictions.

[0029] For example, an initial three-dimensional face can be obtained through three-dimensional scanning technology such as structured light scanning or laser scanning, or sensor technology such as depth camera, or three-dimensional reconstruction technology based on two-dimensional face, without limitation.

[0030] S102. Input the face geometry UV map and face texture UV map into the 3D face detail generation model to obtain a face mesh and face texture UV map with a clarity greater than the first threshold.

[0031] Specifically, the 3D face detail generation model primarily generates details of a 3D face based on an initial 3D face. During the training phase, this model learns a large number of facial geometry UV maps and facial texture UV maps, extracting key detail features from the input facial geometry UV maps and facial texture UV maps for learning and analysis. Then, on one hand, the input facial geometry UV maps are optimized for face model refinement and detail enhancement; on the other hand, the input facial texture UV maps are enhanced and optimized for texture realism and detail. Finally, the 3D face detail generation model outputs a face mesh and facial texture UV map with a clarity exceeding a first threshold. Clarity can be represented by resolution, pixels, color saturation, and accuracy, etc., which are not limited here.

[0032] For example, the details of a three-dimensional face may include skin texture, hair details, and the precise shape and proportion of facial features. Among these, skin texture may include skin roughness and skin gloss; hair details may include the shape and distribution of eyebrows, eyelashes, or beards; and the precise shape and proportion of facial features may include the size, shape, and spacing of the eyes, the height of the nose, etc., which are not limited in this application.

[0033] S103. Input the face normal map and face texture UV map corresponding to the face mesh into the high-definition face texture map generation model to obtain the target face texture UV map with a clarity greater than the second threshold; the second threshold is greater than the first threshold.

[0034] Specifically, a face normal map is a map that records the changes in the direction of normals on a 3D face surface. It makes the face appear more realistic and three-dimensional. A high-definition face texture mapping generation model is used to generate high-definition texture details for the face. The high-definition face texture mapping generation model results in a higher clarity of texture details than the face texture UV map output by a 3D face detail generation model. Clarity can be represented by resolution, pixels, color saturation, and accuracy. By combining the face normal map and the face texture UV map, the rendering effect of the face can be improved. Therefore, a refined face normal map and face texture UV map are input into a trained high-definition face texture mapping generation model. This model learns features from the input face geometry UV map and normal map, then generates face texture details, finally obtaining a target face texture UV map with a clarity greater than a second threshold, achieving further optimization of the face texture UV map. The second threshold is greater than the first threshold.

[0035] S104. Obtain the target 3D face based on the face mesh and target texture UV map.

[0036] Specifically, the target 3D face is a more refined face than the initial 3D face. After obtaining the target texture UV map, the target texture UV map can be mapped onto the face mesh, so that the texture information and the mesh correspond. Through the preset rendering engine, the specific target 3D face corresponding to the 2D face can be rendered according to the mesh and texture information.

[0037] For example, the preset rendering engine may include Unity, CryEngine and Unreal Engine, and this application does not limit it.

[0038] Understandably, in this embodiment, the initial 3D face geometry UV map and face texture UV map are input into a 3D face detail generation model. This model generates the texture details and geometric structure of the face, resulting in an optimized face mesh and face texture UV map. A face normal map is obtained from the face mesh. The face normal map and face texture UV map are then input into a high-resolution face texture mapping generation model. This model generates texture details for the face texture and, through joint learning of the normal map and face texture UV map, outputs a more refined and realistic target face texture UV map. Finally, the target face texture UV map and face mesh are merged to obtain a realistic and three-dimensional target 3D face, improving the imaging quality of the 3D face.

[0039] The three-dimensional face generation method provided in the embodiments of this application is further described below, such as... Figure 3 As shown, Figure 3 This is a flowchart illustrating a three-dimensional face generation method provided in an embodiment of this application. Figure 2 This method may specifically include the following steps:

[0040] S201. Extract the key points of facial features from the uploaded 2D face to obtain the extracted key points of facial features.

[0041] Specifically, the uploaded 2D face is the original 2D face without any preprocessing. The key facial features are the nose, mouth, eyes, and eyebrows. A face detection algorithm can be used on the uploaded 2D face to detect the specific face location. The position of the facial features is analyzed to obtain the relative position of each organ. Finally, the coordinate position of the key facial features is returned to achieve the purpose of extracting the key facial features.

[0042] For example, user A uploads raw 2D faces in different poses (e.g., 45 degrees to the left, 45 degrees to the right, looking down, and looking up), lighting conditions (e.g., cloudy days, sunny days, and indoor lighting), and expressions (smiling, frowning, closing eyes, and spacing out). Using a trained facial landmark extraction model as an example, the uploaded raw 2D face is first preprocessed, such as image enhancement, cropping, and scaling. The preprocessed 2D face is then input into the facial landmark extraction model (e.g., a convolutional neural network) for landmark prediction. Based on the prediction results, the facial landmarks are extracted. The extracted facial landmarks are then denoised or smoothed, and finally, the extracted facial landmarks are output.

[0043] S202. Calculate the affine transformation matrix for the key points of the facial features of a two-dimensional human face to obtain the calculated affine transformation matrix.

[0044] Specifically, the affine transformation matrix can be used to perform affine transformations on 2D faces, changing the face's position, size, and orientation in the image to make it closer to a preset standard layout. Based on the detected coordinates of facial key points, the affine transformation matrix required to map these key points to the preset standard layout can be calculated. Here, the standard layout is a theoretical reference frame.

[0045] For example, a set of point pairs can be created, consisting of the coordinates of the facial features of a 2D face and the coordinates of the facial features of a target 2D face. The coordinates of the facial features of the target 2D face typically correspond to the ideal alignment of the 2D face, such as the center points of the eyes being on the horizontal line with a fixed spacing, and the mouth being located below the eyes, etc., in a standard layout. Then, using these point pairs, the affine transformation matrix can be calculated according to the affine transformation formula, such as the getAffineTransform() function in OpenCV.

[0046] S203. Perform affine transformation on the two-dimensional face using an affine transformation matrix to obtain the processed face.

[0047] Specifically, affine transformations can be used to adjust the layout of facial features, allowing facial images to adapt to different display requirements. Affine transformations can include operations such as translation, rotation, and scaling. An affine transformation matrix is ​​calculated using the facial features of a 2D face. This matrix is ​​then used to perform affine transformations on the 2D face, adjusting facial images in different poses to a standard pose, resulting in a processed face.

[0048] For example, based on the key points of the facial features, such as the center point of the left eye, the center point of the right eye, the key point of the nose wing, and the leftmost key point of the mouth, an affine transformation matrix is ​​calculated. The user-uploaded 2D face is then processed based on the calculated affine transformation matrix to obtain a face image region that is cropped, corrected, and normalized to a fixed size of 512*512.

[0049] S204. Input the processed face into the second encoder to obtain the second new latent space feature vector.

[0050] Specifically, after obtaining the processed face through affine transformation, non-identification information needs to be removed for subsequent 3D face reconstruction and optimization. Non-identification information refers to information that cannot be used to identify an individual; similarly, the non-identification information of the processed 2D face cannot be used to identify an individual from the information in the face image. This removal of non-identification information can be performed using a trained face reconstruction model. The face reconstruction model includes a second encoder. The processed 2D face is input into the second encoder, which converts the input 2D face into a low-dimensional, compact vector, obtaining a second new latent space feature vector.

[0051] For example, the two-dimensional face uploaded by the user includes not only the facial features, but also various lighting, occlusions, and expressions. Among these, the lighting, occlusions, and expressions are all non-identification information. The processed two-dimensional face of user A is input into the second encoder, and features are extracted through operations such as convolution and pooling to obtain a low-dimensional vector, namely the latent space feature vector.

[0052] S205. Combine the second new latent space feature vector with the initialized latent space reconstructed image vector to obtain the second combined feature vector.

[0053] Specifically, the second new latent space feature vector can be combined with the initialized latent space reconstructed image vector to obtain the second combined feature vector.

[0054] For example, the second new latent space feature vector and the initialized latent space reconstructed image vector can be combined by vector addition, dot product or merging, and this application does not impose any restrictions.

[0055] S206. Input the second combined feature vector into the second latent space diffusion model to obtain the second denoised latent space feature vector.

[0056] Specifically, the face reconstruction model also includes a second latent space diffusion model. In order to generate high-quality images, the second combined feature vector can be input into the second latent space diffusion model. Noise can be added first, and then noise can be gradually removed to obtain the second denoised latent space feature vector.

[0057] S207. Input the second denoised latent space feature vector into the second decoder to remove non-identity information and obtain the target two-dimensional face.

[0058] Specifically, the face reconstruction model also includes a second decoder. This second decoder removes non-identity information based on the denoised latent space feature vector to obtain the target two-dimensional face. The target two-dimensional face contains only information that directly or indirectly identifies a specific individual.

[0059] For example, such as Figure 4 As shown, Figure 4 This application provides an architecture diagram for two-dimensional face reconstruction. The flowchart includes a second encoder, a second decoder, and a second latent space diffusion model, which together constitute the face reconstruction model. The specific processing involves the user uploading a face image (i.e., a two-dimensional face image that has undergone affine transformation). The uploaded two-dimensional face is input into the second encoder, which performs a low-dimensional vector transformation on the two-dimensional face to obtain a latent space feature vector. Noise is injected into the latent space feature vector to help the second latent space diffusion model enhance the details of the face image and improve the clarity of the face. Then, the data combining the latent space feature vector and the noise is input into the second latent space diffusion model for progressive denoising, resulting in a denoised latent space feature vector. Finally, the denoised latent space vector is input into the second decoder for face reconstruction, resulting in a uniformly illuminated, expressionless face image, i.e., a two-dimensional face image after removing non-identity information.

[0060] In the embodiments of this application, S204 to S207 are the process of reconstructing a face image from a processed two-dimensional face, i.e., the process of removing non-identifying information from the two-dimensional face image. The face reconstruction model includes a variational autoencoder (VAE) and a latent diffusion model (LatentDiffusion) where the image serves as condition control information. The VAE includes a second encoder and a second decoder. Before using the face reconstruction model, it needs to be trained. The specific training process is as follows:

[0061] S1. Obtain two-dimensional face training samples and input them into the second encoder to obtain latent space feature vectors.

[0062] Specifically, the 2D face training samples include 2D faces under arbitrary poses, lighting, and expressions, as well as 2D frontal faces with the same ID after removing non-identification information. That is, source face samples of the same person and target face samples obtained by removing non-identification information from the source face samples. The source face samples are input into the second encoder to obtain the latent space feature vector.

[0063] S2. Input the latent space feature vector into the second decoder to obtain the reconstructed two-dimensional face. Train the second decoder and the second encoder based on the reconstructed two-dimensional face and the target face.

[0064] For example, the source face training sample consists of user A in different poses (e.g., 45 degrees to the left, 45 degrees to the right, looking down, and looking up), lighting conditions (e.g., cloudy, sunny, and indoor lighting), and expressions (smiling, frowning, closing eyes, and spacing out). The target face training sample consists of a frontal face image of user A after removing non-identifying features such as lighting, pose, expression, and occlusions. The second encoder is input with a 2D face X of user A in a specific pose, lighting, and expression. Features are extracted using operations such as convolution and pooling to obtain a low-dimensional vector, the latent space feature vector Z. The latent space feature vector Z is input into the second decoder. The second decoder reconstructs the 2D face based on the latent space feature vector Z, obtaining the reconstructed 2D face Y. A first loss is calculated using X and Y, and a second loss is calculated using Z and the feature vector of the target face sample. The total loss is calculated based on the first and second losses. The parameters of the second encoder and second decoder are adjusted based on the total loss until the iteration condition is met, resulting in a trained second encoder and second decoder.

[0065] S2. Input the source face into the second encoder to obtain the latent space feature vector; based on the latent space feature vector and the second latent space diffusion model, obtain the denoised latent space feature vector; based on the denoised latent space feature vector and the second decoder, obtain the predicted two-dimensional face.

[0066] Specifically, the source face is input into the second encoder to obtain the latent space feature vector. The latent space feature vector is then combined with a randomly initialized latent space reconstructed image to obtain the combined feature vector. The combined feature vector is then input into the second latent space diffusion model. To enhance the diversity of data and the robustness of the model, noise can be added to the input data, i.e., the combined feature vector. After processing by the second latent space diffusion model, a denoised latent space feature vector is obtained. The denoised latent space feature vector is then input into the second decoder to reconstruct the two-dimensional face and obtain the predicted two-dimensional face.

[0067] For example, training sample pairs are constructed. The source 2D face training samples are user A in different poses (e.g., 45 degrees to the left, 45 degrees to the right, looking down, and looking up), lighting (e.g., cloudy, sunny, and indoor lighting), and expressions (smiling, frowning, closing eyes, and spacing out). The target 2D face training samples are frontal face images of user A after removing non-identifying features such as lighting, pose, expression, and occlusions. The source 2D faces are input into the second encoder to obtain the latent space feature vector Z. The latent space feature vector is then input into the second latent space diffusion model. To enhance data diversity and model robustness, initial noise W can be determined based on the defined noise type and magnitude. The initial noise W is added to the latent space feature vector. Specifically, this can be achieved by adding the initial noise W to the latent space feature vector Z. The noise-added latent space feature vector is analyzed and processed using the second latent space diffusion model to obtain the denoised latent space feature vector Y. The denoised latent space feature vector Y is then input into the second decoder. Based on the analysis of the denoised latent space feature vector Y by the second decoder, a two-dimensional face is reconstructed to obtain a predicted frontal face N that has had non-identity information features such as illumination, pose, expression, and occlusion removed.

[0068] S3. Determine the loss based on the predicted 2D face, the target 2D face, and the face recognition model, and adjust the parameters of the second latent space diffusion model based on the loss to obtain the trained second latent space diffusion model.

[0069] Specifically, the predicted 2D face and the target 2D face are input into the face recognition model to obtain their respective first and second face feature vectors. A first loss for face recognition is calculated based on these first and second face feature vectors. A second loss is obtained based on the initial input noise and the predicted noise. A total loss is then calculated based on the first and second losses. The parameters of the second latent space diffusion model are adjusted based on the total loss until a well-trained second latent space diffusion model is obtained.

[0070] For example, a predicted 2D face N, after removing non-identifying features such as illumination, pose, expression, and occlusions, is input into a face recognition model to obtain the corresponding first face feature vector. A target 2D face, also after removing non-identifying features such as illumination, pose, expression, and occlusions, is input into the face recognition model to obtain the corresponding second face feature vector. The mean squared error is calculated based on the first and second face feature vectors to obtain a first loss. The mean squared error is also calculated based on the predicted noise and initial noise to obtain a second loss. The first and second losses are summed to obtain a total loss. This total loss is used to adjust the parameters of the second latent space diffusion model. After reaching a certain number of iterations or a preset iteration condition, a trained second latent space diffusion model is obtained.

[0071] S208. Perform dimensionality reduction processing on the acquired 3D face dataset to obtain a preset number of face shape basis vectors and face texture basis vectors.

[0072] Specifically, face shape basis vectors primarily describe the geometric structure and morphological features of a face, including the relative positions and size proportions between key facial features. The 3D structure of a face can be reconstructed using face shape basis vectors. Face texture basis vectors primarily describe the skin texture and color of a 3D face, specifically related to details such as skin color, wrinkles, and facial hair. Unique facial features can be reconstructed using face texture basis vectors. A large-scale 3D face dataset with a resolution greater than a first threshold is obtained. Dimensionality reduction analysis is performed on this dataset to extract face shape basis vectors and face texture basis vectors that represent general face shapes and textures.

[0073] For example, a large dataset of 3D faces with a resolution greater than a first threshold is collected. This dataset includes different individuals, ages, genders, facial expressions, etc. Dimensionality reduction is performed on this dataset using PCA to obtain a set of feature vectors ordered by importance. The top K feature vectors are selected as the basis vectors for face shape. The color information of each 3D face surface is mapped onto a 2D face plane. A texture matrix is ​​constructed based on the mapped data. PCA is then used to process the texture matrix to obtain a set of feature vectors ordered by importance. The top K feature vectors are selected as the face texture vectors.

[0074] S209. Determine a general 3D face model based on face shape basis vectors and face texture basis vectors.

[0075] Specifically, the general 3D face model is an average face shape model, containing the average shape of the face and the main patterns of shape changes, but not specific individual features. A general 3D face model is constructed based on face shape basis vectors and face texture basis vectors extracted from a certain set. Face shape parameters describe the geometric structure of the face, such as position, size, and shape, while face texture parameters describe the appearance features of the face, such as skin color and texture. Subsequently, by adjusting the values ​​of these parameters, 3D face models with different shapes and textures can be generated.

[0076] Specifically, such as Figure 5 As shown, Figure 5 This is a diagram illustrating an architecture for acquiring a general 3D face, provided as an embodiment of this application. Figure 5 In this process, a large-scale 3D face dataset with the required accuracy is collected. A preset number of face shape basis vectors and a preset number of face texture basis vectors are obtained through dimensionality reduction techniques. A general 3D face model is constructed using the preset number of face basis vectors and the preset number of face texture basis vectors.

[0077] S210. Input the target two-dimensional face into the general three-dimensional face model for iterative optimization to obtain the initial three-dimensional face.

[0078] Specifically, the target two-dimensional face is input into a general three-dimensional face model, and the three-dimensional face model corresponding to the target two-dimensional face is generated by adjusting the values ​​of the face shape basis vector and the face texture basis vector parameters.

[0079] For example, such as Figure 6 As shown, Figure 6 This is a diagram illustrating an initial 3D face generation architecture provided in an embodiment of this application. Figure 6 In this process, the preprocessed face image, i.e., the target 2D face, is input into the initial 3D face model, i.e., the general 3D face model. By iteratively optimizing the parameter values ​​of the face shape basis vector and the face texture basis vector, the 3D face corresponding to the target 2D face is output. The corresponding 3D face is rendered using a preset renderer to obtain the rendered 2D face. The loss between the rendered 2D face and the target 2D face is calculated, and then the parameter values ​​of the face shape basis vector and the face texture basis vector are optimized. When the loss reaches a preset threshold, the initial 3D face corresponding to the target 2D face is obtained. The loss setting is shown in the following formula (1):

[0080] L diff =L lms +L photo +L reg (1)

[0081] In the above formula (1), L lmsThe mean square error between the facial landmarks detected in the uploaded 2D face and the facial landmarks projected from the 3D face model during iterative optimization; L photo The mean square error of the 2D face uploaded by the user and the 2D face rendered from the 3D face model during the iterative optimization process; L reg The L2 regularization term is used to iteratively optimize the solution of the basic face shape basis vectors and basic face texture basis vectors of the 3D face.

[0082] S211. Based on the initial 3D face, obtain the corresponding face geometry UV map and face texture UV map.

[0083] S212. Upsample the face geometry UV map and the face texture UV map to obtain the first face geometry UV map and the first face texture UV map.

[0084] Specifically, upsampling mainly involves sampling a low-resolution image into a high-resolution image. After obtaining the initial 3D face, the initial 3D face is unfolded to obtain the corresponding face geometry UV map and face texture UV map. The face geometry UV map and face texture UV map are then upsampled, i.e., the resolution is increased, to obtain the first face geometry UV map and the first face texture UV map.

[0085] For example, if the initial resolution of the face geometry UV map and face texture UV map corresponding to a 3D face is 512*512, in order to make the face image clearer or for subsequent image fusion, the 512*512 resolution face geometry UV map and face texture UV map can be upsampled to make the image clearer and more sizing. The resolution can be improved by interpolation algorithms, super-resolution algorithms, or image fusion methods (this application is not limited to these methods). For example, an interpolation algorithm can be used to improve the resolution of the 512*512 face geometry UV map and face texture UV map to a resolution of 1024*1024 face geometry UV map and face texture UV map.

[0086] S213. The first face geometry UV map and the first face texture UV map are stitched together according to preset channels to obtain the stitched first multi-channel face image.

[0087] Specifically, channel-dimensional stitching involves stitching different feature maps along the channel dimension to integrate feature information from different perspectives or scales. To enhance feature representation, reduce information loss, and complement features extracted at different scales to generate higher-quality 3D faces, the first face geometric UV map and the first face texture UV map can be stitched together according to preset channels to obtain the stitched first multi-channel face image.

[0088] For example, the first face geometry UV map and the first face texture UV map can be stitched together by channel to form a 6-channel matrix, thus obtaining the stitched first multi-channel face image.

[0089] S214. Combine the first multi-channel face image, the initialized latent code, and the noise image to obtain the combined input face image.

[0090] Specifically, latent coding is a type of encoding that represents the latent features or information of data. Initializing the latent coding involves setting initial values ​​for the encoding vectors in the latent space. Combining the first multi-channel face image with the initial latent coding and a noisy image can enhance the data diversity of the first multi-channel face image and simulate the uncertainties of the real world, resulting in an input face image with higher detail and clarity.

[0091] For example, the initial latent code can be initialized randomly, normally, or randomly; there are no restrictions here. When determining the noisy image, the type of noise is determined, such as Gaussian noise, and the noise level is set. Noise data is obtained according to the selected noise type and noise level. The first multi-channel face image, the initialized latent code, and the noisy image are added together or subjected to other settings to obtain the combined input face image.

[0092] S215. Input the combined input face image into the 3D face detail generation model to obtain the face mesh and face texture UV map.

[0093] Specifically, a 3D face detail generation model is used to analyze the combined input face image to obtain face mesh and face texture UV map.

[0094] In this embodiment, steps S211 and S215 describe the process provided in this application of generating a face mesh and face texture UV map with a sharpness greater than a first threshold based on an initial 3D face and a 3D face detail generation model. Before using the 3D face detail generation model, the model needs to be trained. An example is... Figure 7 As shown, Figure 7 This application provides a training architecture diagram for a 3D face detail generation model. The 3D face detail generation model is used as a generator, and a generative adversarial network composed of two discriminators is trained. In addition, Figure 7It also includes an encoder and a mapping network. The initial 3D face is flattened to obtain a geometric UV map and a texture UV map. These are then stitched together according to preset channels to obtain a multi-channel face image. The encoder encodes the stitched multi-channel face image into feature vectors. The mapping network converts the encoded feature vectors into a representation suitable for the generator's latent space. The generator generates new geometric UV maps and texture UV maps for preset channels based on the latent space representation and added noise. The input and output preset-channel geometric UV maps and texture UV maps are then stitched together, for example, to form a 12-channel matrix. This 12-channel face image is input into discriminator one to control the output to have more detail and to make the input and output geometric UV maps and texture UV maps more similar. Discriminator 2 receives a 3D face normal map calculated based on the face geometry UV map output by the generator. Discriminator 2 is used to control the output to provide more facial geometric details and to ensure more reasonable adjacency relationships between adjacent vertices of the 3D face. Furthermore, the architecture diagram also shows that the generator includes style noise injection, fully connected layers, and a mapping network.

[0095] S216. The face normal map and face texture UV map are stitched together according to preset channels to obtain the stitched second multi-channel face image.

[0096] S217. Input the second multi-channel face image into the first encoder to obtain the first new latent space feature vector.

[0097] S218. Combine the first new latent space feature vector with the initial latent space UV texture map feature vector to obtain the combined feature vector.

[0098] S219. Input the combined feature vector into the first latent space diffusion model to obtain the first denoised latent space feature vector.

[0099] S220. Input the latent space feature vector after the first denoising into the first decoder to obtain the reconstructed target face texture UV map.

[0100] Specifically, the high-definition face texture mapping generation model includes a first encoder, a first decoder, and a first latent space diffusion model. The face normal map and the face texture UV map are stitched together according to preset channels to obtain a stitched multi-channel face image. The stitched multi-channel face image is then subjected to low-dimensional vector transformation using the trained first encoder to obtain a first latent space feature vector. This first latent space feature vector is combined with the feature vector of the initial latent space UV texture map to obtain a combined feature vector. This combined feature vector is input into the first latent space diffusion model for progressive denoising, resulting in a first denoised latent space feature vector. This first denoised latent space feature vector is then input into the first decoder for image reconstruction, yielding the reconstructed target face texture UV map.

[0101] For example, such as Figure 8 As shown, Figure 8 This application provides an architecture diagram for generating a target face texture UV map. The flowchart includes a first encoder, a first decoder, and a first latent space diffusion model, which together constitute a high-definition face texture map generation model. Specifically, the obtained face normal map and face texture UV map are input into the first encoder. The first encoder performs low-dimensional vector transformation to obtain a latent space feature vector. Noise is injected into the latent space feature vector to help the first latent space diffusion model enhance details in the image and improve face clarity. Then, the data combining the latent space feature vector and noise is input into the first latent space diffusion model for progressive denoising to obtain a denoised latent space feature vector. Finally, the denoised latent space vector is input into the first decoder for face reconstruction, resulting in a high-quality target face texture UV map.

[0102] In this embodiment, both the face reconstruction model and the high-resolution face texture mapping generation model consist of an encoder, a decoder, and a latent space diffusion model. During the training phase, the face reconstruction model is trained using two-dimensional face samples, while the high-resolution face texture mapping generation model is trained using three-dimensional face samples. The internal processing procedures for the input data in both models are similar and will not be described in detail here.

[0103] S221. Obtain the target 3D face based on the face mesh and the target texture UV map.

[0104] Specifically, after obtaining the target texture UV map, the target texture UV map can be mapped onto the face mesh, so that the texture information and the mesh correspond. Then, through the preset rendering engine, the specific target 3D face corresponding to the 2D face can be rendered according to the mesh and texture information.

[0105] For example, the preset rendering engine may include Unity, CryEngine and Unreal Engine, and this application does not limit it.

[0106] Understandably, in this embodiment, affine transformations are performed on the key facial features of the uploaded 2D face to obtain a processed 2D face. This allows face images in different poses to be adjusted to a standard pose, improving the accuracy and effect of 3D face reconstruction. The processed 2D face is then processed by a second encoder, a second latent space diffusion model, and a second decoder to remove non-identity information, improving the generation quality of the corresponding 3D face mesh and face texture UV map. Face reconstruction is performed using the 2D face with removed non-identity information to obtain an initial 3D face containing specific features of the 2D face. A 3D face detail generation model is used to generate facial details from the initial 3D face, resulting in a face mesh and face texture UV map. Finally, the face normal map and face texture UV map corresponding to the face mesh are used to generate texture details using a high-resolution face texture map generation model to obtain the target face texture UV map. The target face texture UV map and the face mesh are then merged to obtain a 3D face with higher refinement than the initial 3D face, improving the imaging quality of the 3D face.

[0107] Figure 9 This is a structural schematic diagram of the three-dimensional face generation device provided in this application, as shown below. Figure 9 As shown, the device may specifically include:

[0108] The initial 3D face reconstruction module 901 is used to obtain the corresponding face geometry UV map and face texture UV map based on the initial 3D face; the initial 3D face is obtained by 3D reconstruction of the 2D face uploaded by the user.

[0109] The 3D face detail generation module 902 is used to input the face geometry UV map and the face texture UV map into the 3D face detail generation model to obtain a face mesh and face texture UV map with a clarity greater than a first threshold.

[0110] The 3D high-definition face texture generation module 903 is used to input the face normal map corresponding to the face mesh and the face texture UV map into the high-definition face texture map generation model to obtain a target face texture UV map with a clarity greater than a second threshold; the second threshold is greater than the first threshold;

[0111] The 3D face generation module 904 is used to obtain the target 3D face based on the face mesh and the target texture UV map.

[0112] In one embodiment, the 3D face detail generation module 902 is specifically used for:

[0113] The face geometry UV map and the face texture UV map are upsampled to obtain the first face geometry UV map and the first face texture UV map;

[0114] The first face geometric UV map and the first face texture UV map are stitched together according to a preset channel to obtain the stitched first multi-channel face image;

[0115] The first multi-channel face image, the initialized latent code, and the noise image are combined to obtain the combined input face image;

[0116] The combined input face image is input into the 3D face detail generation model to obtain the face mesh and the face texture UV map.

[0117] In one embodiment, the high-definition face texture mapping generation model includes a variational autoencoder and a first latent space diffusion model; the variational autoencoder includes a first decoder and a first encoder; and the three-dimensional high-definition face texture generation module 903 is specifically used for:

[0118] The face normal map and the face texture UV map are stitched together according to a preset channel to obtain a stitched second multi-channel face image;

[0119] The second multi-channel face image is input into the first encoder to obtain the first new latent space feature vector;

[0120] The first new latent space feature vector and the latent space initial UV texture map feature vector are combined to obtain the combined feature vector;

[0121] The target face texture UV map is determined based on the combined feature vector, the first latent space diffusion model, and the first decoder.

[0122] In one embodiment, the 3D high-definition face texture generation module 903 is specifically used for:

[0123] The combined feature vector is input into the first latent space diffusion model to obtain the first denoised latent space feature vector;

[0124] The first denoised latent space feature vector is input into the first decoder to obtain the reconstructed target face texture UV map.

[0125] In one embodiment, the 3D face generation module 904, before flattening the initial 3D face to obtain the face geometry UV map and face texture UV map, is specifically used for:

[0126] The acquired 3D face is dimensionality reduced to obtain a preset number of face shape basis vectors and face texture basis vectors;

[0127] A general 3D face model is determined based on the face shape basis vector and the face texture basis vector;

[0128] The target 2D face is input into the general 3D face model for iterative optimization to obtain the initial 3D face.

[0129] In one embodiment, the three-dimensional face generation device further includes a face reconstruction model for calculating the affine transformation matrix of the key facial features of a two-dimensional face to obtain the calculated affine transformation matrix; using the affine transformation matrix to perform affine transformation processing on the two-dimensional face to obtain the processed face; and inputting the processed face into the face reconstruction model for non-identity information removal to obtain the target two-dimensional face.

[0130] In one embodiment, the face reconstruction model includes a second encoder, a second decoder, and a second latent space diffusion model; the three-dimensional face generation device further includes the face reconstruction model, specifically used for:

[0131] The step of inputting the processed face into a face reconstruction model for non-identity information removal to obtain the target two-dimensional face includes:

[0132] The processed face is input into the second encoder to obtain a second new latent space feature vector;

[0133] The second new latent space feature vector is combined with the initialized latent space reconstructed image vector to obtain the second combined feature vector;

[0134] The second combined feature vector is input into the second latent space diffusion model to obtain the second denoised latent space feature vector;

[0135] The second denoised latent space feature vector is input into the second decoder to remove non-identity information, thereby obtaining the target two-dimensional face.

[0136] In one embodiment, the three-dimensional face generation device further includes a model training module. Before inputting the face geometry UV map and the face texture UV map into the three-dimensional face detail generation model to obtain the face mesh and face texture UV map with face clarity greater than a first threshold, the model training module is used to flatten the three-dimensional face training samples to obtain a second face geometry UV map and a second face texture UV map.

[0137] Upsample the face normal map and the second face texture UV map corresponding to the second face geometry UV map to obtain the third face geometry UV map and the third face texture UV map;

[0138] The third face geometric UV map and the third face texture UV map are spliced ​​together using the first preset channel to obtain the spliced ​​second multi-channel face.

[0139] The three-dimensional face detail generation model is trained based on the second multi-channel face and the preset discriminator to obtain the three-dimensional face detail generation model.

[0140] In one embodiment, the model training module is specifically used for:

[0141] The second multi-channel face is input into the three-dimensional face detail generation model to be trained to obtain the third multi-channel face;

[0142] The second multi-channel face and the third multi-channel face are stitched together to obtain the fourth multi-channel face;

[0143] The preset discriminator and the 3D face detail generation model to be trained are combined to form a generative adversarial network, and the generative adversarial network is trained using the third multi-channel face and the fourth multi-channel face to obtain the 3D face detail generation model.

[0144] In this device, the initial 3D face geometry UV map and face texture UV map are input into a 3D face detail generation model. The model analyzes and processes the data to generate refined face details, resulting in a detailed face mesh and face texture UV map. Then, the refined face mesh's corresponding face normal map and face texture UV map are input into a high-resolution face texture mapping generation model. This model analyzes and processes the face texture map to generate more detailed textures, resulting in a more refined target face texture UV map. Finally, the face mesh and target texture UV map are merged to obtain the target 3D face. These two refinement processes on the initial 3D face improve the imaging quality of the 3D face.

[0145] This application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method provided in any of the above embodiments.

[0146] This application also provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the method provided in any of the above embodiments.

[0147] Reference Figure 10 This document illustrates a schematic diagram of an electronic device according to an embodiment of this application. The specific embodiments of this application do not limit the specific implementation of the electronic device.

[0148] like Figure 10 As shown, the electronic device may include: a processor 1002, a communications interface 1004, a memory 1006, and a communications bus 1008.

[0149] in:

[0150] The processor 1002, communication interface 1004, and memory 1006 communicate with each other via communication bus 1008.

[0151] Communication interface 1004 is used to communicate with other electronic devices or servers.

[0152] The processor 1002 is used to execute program 1010, specifically the relevant steps in the above method embodiments.

[0153] Specifically, program 1010 may include program code that includes computer operation instructions.

[0154] The processor 1002 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application. The smart device includes one or more processors, which may be processors of the same type, such as one or more CPUs; or they may be processors of different types, such as one or more CPUs and one or more ASICs.

[0155] Memory 1006 is used to store program 1010. Memory 1006 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.

[0156] Specifically, program 1010 can be used to cause processor 1002 to execute the operations corresponding to the methods described in the above method embodiments.

[0157] The specific implementation of each step in program 1010 can be found in the corresponding steps and units described in the above method embodiments, and will not be repeated here. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the devices and modules described above can be referred to the corresponding process descriptions in the foregoing method embodiments, and will not be repeated here.

[0158] It should be noted that, depending on the implementation needs, the various components / steps described in the embodiments of this application can be broken down into more components / steps, or two or more components / steps or parts of the operation of components / steps can be combined into new components / steps to achieve the purpose of the embodiments of this application.

[0159] The methods described in the embodiments of this application can be implemented in hardware, firmware, or as software or computer code that can be stored in a recording medium (such as a CD-ROM, RAM, floppy disk, hard disk, or magneto-optical disk), or as computer code downloaded over a network that is originally stored in a remote recording medium or a non-transitory machine-readable medium and will be stored in a local recording medium. Thus, the methods described herein can be processed by software stored on a recording medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware (such as an ASIC or FPGA). It is understood that the computer, processor, microprocessor controller, or programmable hardware includes storage components (e.g., RAM, ROM, flash memory, etc.) capable of storing or receiving software or computer code that, when accessed and executed by the computer, processor, or hardware, implements the methods described herein. Furthermore, when a general-purpose computer accesses code used to implement the methods shown herein, the execution of the code transforms the general-purpose computer into a dedicated computer for executing the methods shown herein.

[0160] Those skilled in the art will recognize that the units and method steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the embodiments of this application.

[0161] The above embodiments are only used to illustrate the embodiments of this application, and are not intended to limit the embodiments of this application. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the embodiments of this application. Therefore, all equivalent technical solutions also fall within the scope of the embodiments of this application, and the patent protection scope of the embodiments of this application should be defined by the claims.

Claims

1. A method for generating a three-dimensional face, characterized in that, include: Based on the initial 3D face, the corresponding face geometry UV map and face texture UV map are obtained; The initial 3D face is obtained by 3D reconstruction of a 2D face uploaded by the user; The face geometry UV map and the face texture UV map are input into the 3D face detail generation model to obtain a face mesh and face texture UV map with a clarity greater than the first threshold. The face normal map and the face texture UV map corresponding to the face mesh are input into the high-definition face texture map generation model to obtain a target face texture UV map with a clarity greater than the second threshold. The second threshold is greater than the first threshold; The target 3D face is obtained based on the face mesh and the target face texture UV map; The high-definition face texture mapping generation model includes a variational autoencoder and a first latent space diffusion model; the variational autoencoder includes a first decoder and a first encoder; the step of inputting the face normal map corresponding to the face mesh and the face texture UV map into the high-definition face texture mapping generation model to obtain a target face texture UV map with a clarity greater than a second threshold includes: stitching the face normal map and the face texture UV map according to a preset channel to obtain a stitched second multi-channel face image; inputting the second multi-channel face image into the first encoder to obtain a first new latent space feature vector; combining the first new latent space feature vector with the initial latent space UV texture map feature vector to obtain a combined feature vector; inputting the combined feature vector into the first latent space diffusion model to obtain a first denoised latent space feature vector; and inputting the first denoised latent space feature vector into the first decoder to obtain the reconstructed target face texture UV map.

2. The method according to claim 1, characterized in that, The step of inputting the face geometry UV map and the face texture UV map into the 3D face detail generation model to obtain a face mesh and face texture UV map with a sharpness greater than a first threshold includes: The face geometry UV map and the face texture UV map are upsampled to obtain the first face geometry UV map and the first face texture UV map; The first face geometric UV map and the first face texture UV map are stitched together according to a preset channel to obtain the stitched first multi-channel face image; The first multi-channel face image, the initialized latent code, and the noise image are combined to obtain the combined input face image; The combined input face image is input into the 3D face detail generation model to obtain the face mesh and the face texture UV map.

3. The method according to claim 1, characterized in that, Before obtaining the face geometry UV map and face texture UV map based on the initial 3D face, the method further includes: The acquired 3D face is dimensionality reduced to obtain a preset number of face shape basis vectors and face texture basis vectors; A general 3D face model is determined based on the face shape basis vector and the face texture basis vector; The target 2D face is input into the general 3D face model for iterative optimization to obtain the initial 3D face.

4. The method according to claim 3, characterized in that, Before inputting the target 2D face into the general 3D face model for iterative optimization to obtain the initial 3D face, the method further includes: The affine transformation matrix is ​​calculated for the key facial features of a two-dimensional human face, and the calculated affine transformation matrix is ​​obtained. The two-dimensional face is subjected to affine transformation processing using the affine transformation matrix to obtain the processed face. The processed face is input into a face reconstruction model to remove non-identity information, thus obtaining the target two-dimensional face.

5. The method according to claim 4, characterized in that, The face reconstruction model includes a second encoder, a second decoder, and a second latent space diffusion model; The step of inputting the processed face into a face reconstruction model for non-identity information removal to obtain the target two-dimensional face includes: The processed face is input into the second encoder to obtain a second new latent space feature vector; The second new latent space feature vector is combined with the initialized latent space reconstructed image vector to obtain the second combined feature vector; The second combined feature vector is input into the second latent space diffusion model to obtain the second denoised latent space feature vector; The second denoised latent space feature vector is input into the second decoder to remove non-identity information, thereby obtaining the target two-dimensional face.

6. The method according to claim 1 or 2, characterized in that, Before inputting the face geometry UV map and the face texture UV map into the 3D face detail generation model to obtain a face mesh and face texture UV map with a sharpness greater than a first threshold, the method further includes: The 3D face training samples are flattened to obtain the second face geometry UV map and the second face texture UV map; Upsample the face normal map and the second face texture UV map corresponding to the second face geometry UV map to obtain the third face geometry UV map and the third face texture UV map; The third face geometric UV map and the third face texture UV map are spliced ​​together using the preset channels to obtain the spliced ​​second multi-channel face; The three-dimensional face detail generation model is trained based on the second multi-channel face and the preset discriminator to obtain the three-dimensional face detail generation model.

7. The method according to claim 6, characterized in that, The process of training the 3D face detail generation model based on the second multi-channel face and a preset discriminator to obtain the 3D face detail generation model includes: The second multi-channel face is input into the three-dimensional face detail generation model to be trained to obtain the third multi-channel face; The second multi-channel face and the third multi-channel face are stitched together to obtain the fourth multi-channel face; The preset discriminator and the 3D face detail generation model to be trained are combined to form a generative adversarial network, and the generative adversarial network is trained using the third multi-channel face and the fourth multi-channel face to obtain the 3D face detail generation model.

8. An electronic device, comprising: The processor, memory, communication interface, and communication bus are provided, wherein the processor, memory, and communication interface communicate with each other via the communication bus. The memory is used to store at least one executable instruction that causes the processor to perform an operation corresponding to the method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Image-based three-dimensional reconstruction and model training method and device, and storage medium

    CN115908712A

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

    CN116091687A