A 3D consistent face generation method based on neural signed distance field

Through a method based on neural symbolic distance fields, using multi-resolution hash coding and feature integral rendering, combined with a style generator, the problem of inconsistency and computational complexity in multi-view generation of 3D-GANs is solved, achieving high efficiency and excellent quality. 3D model generation and image generation.

CN118570418BActive Publication Date: 2024-10-22SMALL WALNUT
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202411036347.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2024-10-22
Estimated Expiration
2044-07-31

AI Technical Summary

Technical Problem

Existing 3D generative adversarial networks (3D-GANs) suffer from inconsistencies and high computational complexity in multi-view generation tasks, and it is difficult to generate high-quality 3D models under single-view conditions, and the data collection and training process are cumbersome.

Method used

Using a method based on neural signed distance fields, through multi-resolution hash encoding and feature integral rendering, combined with a style generator, high-resolution images are generated, and non-saturated generative adversarial loss and Eikonal loss are used to ensure image quality and view consistency.

Benefits of technology

Significantly improves the generation quality and training speed of 3D models, reduces computational burden, improves image detail reconstruction capabilities and memory usage efficiency, ensuring the system's ability to operate in a real-time environment, and the generated images maintain high quality at high resolutions and consistency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118570418B_ABST
    Figure CN118570418B_ABST
Patent Text Reader

Abstract

This paper proposes a 3D consistent face generation method based on neural signed distance field, which combines a lightweight NeRF-GAN and a style-based neural upsampler. The proposed NeRF-GAN adopts a multi-resolution hash grid as the encoder of the scene representation, which can effectively improve the training speed. In order to solve the inconsistency problem of multi-view images, an additional self-supervision method is integrated in the proposed neural upsampler. In addition, SDF modeling can generate higher quality 3D models. Experimental results show that the proposed method is superior to the baseline method, especially the synthesized images still maintain high quality and details at high resolution, demonstrating its excellent performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of three-dimensional reconstruction and generation of human faces, and in particular relates to a three-dimensional consistent face generation method based on a neural signed distance field. Background Art

[0002] In the field of computer vision, with the development of generative models, highly realistic image generation has made significant progress. Generative adversarial networks (GANs) are a powerful class of generative models that have made important contributions to this progress. 2D-GANs can synthesize realistic images with a resolution of 1024*1024 pixels and above. In particular, Style-GAN has demonstrated unprecedented image generation quality. However, these methods are limited to the synthesis of two-dimensional images and ignore the fact that our real world is a three-dimensional structure.

[0003] To solve this problem, some researchers have begun to focus on 3D generative adversarial networks (3D-GANs). These models attempt to learn richer and more realistic representations from 3D shape data in order to consider factors such as geometry, perspective changes, and texture during the generation process. However, such methods usually require the use of 3D or multi-view supervision, and the collection of explicit data sets is relatively difficult. In addition, the amount of computation required by 3D-GANs is also very large. They need to process large-scale 3D data, which places extremely high demands on hardware equipment. High-intensity computing resources and storage space are essential, which increases the cost and complexity of using 3D-GANs.

[0004] There are currently some methods for synthesizing high-quality multi-view images, but they usually rely on multi-view data for supervised learning, which puts higher requirements on data collection and the training process is relatively cumbersome. On the other hand, 3D-GANs based on single-view supervision have shown excellent performance in multi-view synthesis tasks, among which only a few studies can generate corresponding three-dimensional models. These methods usually use the Marching Cubes algorithm based on voxel density, but under single-view conditions, it is difficult to generate a synthetic model with good surface quality due to the lack of detail information.

[0005] To this end, the present invention proposes a new way to realize the 3D-GAN that generates a model corresponding to an image, that is, using MLP based on coordinates and camera rays to represent the space as a signed distance field and a feature field. At the same time, the core architecture of the generative model is constructed by volume rendering a low-resolution feature image and generating a geometric model, and a multi-resolution hash map is combined to achieve fast and high-quality image generation. Finally, a style-based generator is used to efficiently extract features from the feature image for generating high-resolution images. The model of the present invention uses a non-saturated generative adversarial loss to ensure the quality of the image, uses an Eikonal loss to constrain SDF modeling, and calculates consistency to maintain visual Figure 1 Consistency. Summary of the invention

[0006] The present invention provides a 3D consistent face generation method based on neural signed distance field, aiming to solve the problems of inconsistent multi-view generation and failure of 3D mesh generation in the prior art. By using multi-resolution hash coding to efficiently encode the space and combining signed distance field SDF and feature field, the training speed of the model and the quality of generated images are improved. The specific steps include: firstly, obtaining the original data set of a single view, then encoding the 3D points and ray directions, using the MLP network to calculate RGB colors, eigenvalues, signed distance values ​​and volume density, then using the volume rendering method to generate a low-resolution feature image and a geometric model, and then inputting the feature map into a style generator, generating a high-resolution image through upsampling of a 2D convolutional neural network, and finally defining the generation adversarial loss, Eikonal loss and content loss to ensure the quality and visual quality of the generated image. Figure 1 The advantage of the present invention is that the multi-resolution hash coding and feature integral rendering method significantly improves the scene detail reconstruction capability and memory usage efficiency, ensuring the system's ability to operate in a real-time environment. Experimental results show that the present invention has good image quality, visual quality, and Figure 1 Compared with existing methods, this method has good results in terms of consistency, training speed and memory usage efficiency.

[0007] To achieve the above object, the present invention provides a method for generating a three-dimensional consistent face based on a neural signed distance field, comprising the following steps:

[0008] Step S1: Obtain face-related data and obtain face RGB images from the FFHQ dataset;

[0009] Step S2: Create a volume rendering network based on a neural signed distance field (SDF) and initialize the network hyperparameters;

[0010] Step S3: A learnable multi-resolution hash grid is used to hash the 3D points and ray directions, and a potential mapping network is used to process the potential codes, and the mapped potential codes and hash codes are used as inputs of the designed NeRF-GAN generator;

[0011] Step S4: The NeRF-GAN generator outputs the SDF value, eigenvalue and RGB color of the sampling point, and adopts the 2D noise injection method;

[0012] Step S5: Volume rendering is used to synthesize an image with a resolution of 64×64, and a feature map F carrying prior knowledge in the generation process is additionally rendered;

[0013] Step S6: design a style-based neural upsampler to process the feature map to generate a high-resolution two-dimensional image, and adopt a two-stage supervision method;

[0014] Step S7: Calculate the adversarial loss, camera pose loss, Eikonal loss and consistency loss to optimize the generated model.

[0015] Furthermore, the step S1 of obtaining a face RGB image from the FFHQ dataset includes:

[0016] 70,000 face images with different resolutions of 256x256 are obtained from the FFHQ dataset, and the images are normalized. The images in the dataset are downsampled to a resolution of 64x64.

[0017] Furthermore, in step S2, a volume rendering network based on a neural signed distance field SDF is created and network hyperparameters are initialized, including:

[0018] The volume rendering network consists of a generator network and a discriminator network. The generator is used to generate high-quality images and geometric models, and the discriminator is used to evaluate the authenticity and consistency of the generated images. Initializing the system hyperparameters includes setting the learning rate, the weight of the loss function, and the number of iterations.

[0019] Furthermore, in step S3, a learnable multi-resolution hash grid is used to perform hash encoding on the three-dimensional points and ray directions, including:

[0020] Encode the 3D point x and the camera light direction d in the canonical space, and divide the 3D canonical space into grids of different resolutions ,in is the maximum number of grid layers of different resolutions, is the number of layers. The hash table values ​​corresponding to the mesh vertices are queried at different resolutions respectively, and the encoding values ​​at the resolution are obtained through trilinear interpolation. Spherical co-encoding is used to encode the camera light direction d.

[0021] Furthermore, in step S4, the NeRF-GAN generator outputs the SDF value, eigenvalue and RGB color of the sampling point, including:

[0022] The lightweight NeRF-GAN adopts a three-layer MLP activated by LeakyReLU as its mapping network, transforming the latent code Obtaining the latent vector through the mapping network , the latent vector from the latent space The affine transformation is performed by feature linear modulation FiLM, injected into each layer of the mapping network, and the mapping network is expanded to 8 layers as the mapping network of the style-based neural upsampler. Each SURF block receives the latent space The latent vector of is used as the noise input and a learnable linear layer is used to generate the frequency for each block. and phase shift , and inject noise through a periodic activation function;

[0023] The SURF block is represented as: , , , , , ,in Indicates The input of the layer, and is the weight matrix and bias vector of the fully connected layer, Represents the intermediate vectors output by the three fully connected layers and the SURF layer After two fully connected layers and , generating the feature vector and SDF value , linear layer And the activation function Used to and Convert to RGB values ​​required for volume rendering and body density ,in is a learnable activation function;

[0024] The generated SDF value is used to extract the mesh model and train the parameters. To indicate the compactness of the surface, and use the SDF value for volume rendering, using the formula The SDF value Convert to spatial volume density .

[0025] Furthermore, the step S5 uses volume rendering to synthesize an image with a resolution of 64×64, including:

[0026] Rendering images using the volume rendering equation, , ,in , represents the cumulative transmittance of light, and are rays The feature vector and color of correspond to the pixel features and colors in the pixel space, is a position on the ray, is the position on the ray The three-dimensional coordinates of It's rays Direction vector , and Represent three-dimensional space points RGB values, eigenvectors and volume densities, and They are the near bound and far bound of the camera ray respectively;

[0027] Sampling a set of discrete points to approximate the integral value, the sampling strategy is to Divided evenly Segments, random sampling points in the middle of each segment , sampled only once, then and Rewrite as ,in and The sampling points are The corresponding eigenvectors and color values, Indicates the distance between adjacent sampling points.

[0028] Furthermore, in step S6, a style-based neural upsampler is designed and a two-stage supervision method is adopted, including:

[0029] The designed style-based neural upsampler takes the feature map F with camera prior as input in the first layer, and gradually enhances the resolution of the feature map as the level increases, converts the feature maps of different resolutions into RGB images, and uses bilinear upsampling for skip connection. Each layer of the sampler combines the mapping network generated space;

[0030] The two-stage supervision method adopted is to first reduce the dataset to a resolution of 64×64 and then Perform bicubic upsampling to obtain a high-resolution estimated image , the high-resolution estimated image With the generated high-resolution image Used together in the training process to optimize the generated network.

[0031] Furthermore, the calculation of the adversarial loss, camera pose loss, Eikonal loss and consistency loss in step S7 includes:

[0032] Calculate adversarial loss: Use non-saturated loss as the generation adversarial loss , , where the function The expression is shortened to , t is the independent variable, represents the mathematical expectation, and Represents the generator and discriminator of lightweight NeRF-GAN, camera pose Taken from camera distribution , latent coding Taken from a standard normal distribution , real image Taken from the training set distribution , It is a hyperparameter, set by default =0.5;

[0033] Camera pose loss :Use a discriminator , while detecting the generated low-resolution image, generate the camera pose of the corresponding image , and L1 loss is used to calculate the generated camera pose Compared with the real camera pose The error between ;

[0034] Eikonal loss: Using Eikonal loss , the calculated SDF value Regularize, ,in yes The gradient of

[0035] Setting loss coefficient =10, = 0.1, and the overall loss function of the SDF volume renderer Defined as ;

[0036] Consistency loss: The same loss function and regularization as StyleGAN2 are used when training the style-based neural upsampler, computing the image obtained by the bicubic upsampling operation High-resolution images obtained with volume rendering The L1 loss between them is used as an additional consistency loss for training the neural upsampler , ,in and Respectively represent the horizontal and vertical coordinates of the corresponding pixels of the image, The loss coefficient is set to 0.1.

[0037] Beneficial effects of the present invention: Lightweight NeRF-GAN combines NeRF-GAN with coordinate encoding to improve training speed, reduces the number of layers of the MLP network and uses coordinate encoding to represent high-dimensional inputs, thereby reducing the computational burden, and uses Eikonal loss to enhance the quality of 3D models, making the generated geometric shapes more continuous and smooth;

[0038] The style-based neural upsampler injects prior knowledge from NeRF-GAN to improve the quality and resolution of synthesized images. It further improves image quality and training stability through multi-layer 2D noise injection and a three-layer MLP mapping network. It also reduces the inconsistency of multi-view images through self-supervision methods, improving the consistency and realism of images.

[0039] Signed distance field (SDF) modeling uses SDF values ​​instead of volume density to build 3D models, generating higher quality, continuous and smooth geometric shapes. Applying SDF values ​​in the Marching Cubes algorithm makes 3D mesh extraction more accurate and detailed, better captures geometric details, and improves the overall quality of the 3D model.

[0040] Improved image quality, achieving state-of-the-art performance in multi-view image synthesis of unsupervised 2D data, showing significantly better image quality than baseline methods, and the synthesized images still maintain high quality and details at high resolution of 256x256 pixels;

[0041] Higher resolution and realism: Through a two-stage rendering method, high-resolution images up to 256x256 pixels are generated, and the consistency of multiple perspectives is maintained. The generated facial images are realistic, high-quality, and rich in details. The self-supervision method is used to ensure the consistency of multi-view images, reducing artifacts and inconsistencies when switching perspectives;

[0042] Efficient 3D model generation. Compared with the traditional volume density method, the 3D models generated using SDF values ​​are of higher quality and richer details. The Marching Cubes algorithm combined with SDF values ​​can effectively extract high-quality 3D meshes, improve the refinement of the model, and improve training efficiency, significantly shortening the time required to generate high-quality 3D models. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 It is the overall framework diagram of the present invention;

[0044] Figure 2 Figure 2. The framework diagram of the style-based neural upsampler. DETAILED DESCRIPTION

[0045] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. The specific embodiments described herein are only used to explain the technical solutions of the present invention and are not limited to the present invention.

[0046] 70,000 face images with a resolution of 256x256 are obtained from the FFHQ dataset for training and evaluating the model. The 3D point x and the ray direction d are encoded, and a multi-resolution hash grid is used to improve the training speed. Specifically, the 3D point x is multi-resolution hash encoded to obtain the encoded feature vector, and the ray direction d is spherical co-encoded to better represent and process the 3D geometric information. The RGB color, eigenvalue, signed distance value and volume density are calculated through the MLP network. The SDF value represents the distance from the query point x to the surface boundary, and the sign indicates whether the point is inside or outside the surface. The SDF field is used instead of the volume density field, and the Marching Cubes algorithm is combined to extract a high-quality 3D mesh model.

[0047] For each pixel, a ray is emitted from the camera point o, and the eigenvalue and RGB color value are calculated using the volume rendering function to generate a feature map and a low-resolution image. Through the volume rendering method, the three-dimensional point and the viewing direction are input into the renderer, and the eigenvalue and RGB color value of each sampling point are calculated uniformly along the ray. Then, these feature maps are input into the style generator, and a 2D convolutional neural network is used to upsample to generate a high-resolution image. The style generator starts with a 64x64 resolution feature map and upsamples it layer by layer to a high-resolution image. At the same time, a discriminator network is used to evaluate the quality of the generated image to ensure the realism and consistency of the image. In order to optimize the generation process, GAN loss, Eikonal loss and content loss are defined to ensure the quality and visual quality of the generated image. Figure 1 Consistency, during the training process, the SDF volume renderer is trained by simulating the position of the camera on the spherical surface in front of the object, sampling the camera pose ξ, extracting the camera light, and sampling the 3D space points on the light. The 64x64 feature map generated by the volume rendering is input into the style generator, and a high-resolution image is generated by upsampling the 2D convolutional neural network. The generator and discriminator networks are optimized using the generative adversarial loss, Eikonal loss, and consistency loss to ensure the high quality and visual quality of the generated images. Figure 1 Consistency.

[0048] A method for generating three-dimensional consistent faces based on neural signed distance fields comprises the following steps:

[0049] Step S1: Obtain face-related data and obtain face RGB images from the FFHQ dataset;

[0050] Step S2: Create a volume rendering network based on a neural signed distance field (SDF) and initialize the network hyperparameters;

[0051] Step S3: A learnable multi-resolution hash grid is used to hash the 3D points and ray directions, and a potential mapping network is used to process the potential codes, and the mapped potential codes and hash codes are used as inputs of the designed NeRF-GAN generator;

[0052] Step S4: The NeRF-GAN generator outputs the SDF value, eigenvalue and RGB color of the sampling point, and adopts the 2D noise injection method;

[0053] Step S5: Volume rendering is used to synthesize an image with a resolution of 64×64, and a feature map F carrying prior knowledge in the generation process is additionally rendered;

[0054] Step S6: design a style-based neural upsampler to process the feature map to generate a high-resolution two-dimensional image, and adopt a two-stage supervision method;

[0055] Step S7: Calculate the adversarial loss, camera pose loss, Eikonal loss and consistency loss to optimize the generated model.

[0056] Furthermore, the step S1 of obtaining a face RGB image from the FFHQ dataset includes:

[0057] 70,000 face images with different resolutions of 256x256 are obtained from the FFHQ dataset, and the images are normalized. The images in the dataset are downsampled to a resolution of 64x64.

[0058] Furthermore, in step S2, a volume rendering network based on a neural signed distance field SDF is created and network hyperparameters are initialized, including:

[0059] The volume rendering network consists of a generator network and a discriminator network. The generator is used to generate high-quality images and geometric models, and the discriminator is used to evaluate the authenticity and consistency of the generated images. Initializing the system hyperparameters includes setting the learning rate, the weight of the loss function, and the number of iterations.

[0060] Furthermore, in step S3, a learnable multi-resolution hash grid is used to perform hash encoding on the three-dimensional points and ray directions, including:

[0061] Encode the 3D point x and the camera light direction d in the canonical space, and divide the 3D canonical space into grids of different resolutions ,in is the maximum number of grid layers of different resolutions, is the number of layers. The hash table values ​​corresponding to the mesh vertices are queried at different resolutions respectively, and the encoding values ​​at the resolution are obtained through trilinear interpolation. Spherical co-encoding is used to encode the camera light direction d.

[0062] Furthermore, in step S4, the NeRF-GAN generator outputs the SDF value, eigenvalue and RGB color of the sampling point, including:

[0063] The lightweight NeRF-GAN adopts a three-layer MLP activated by LeakyReLU as its mapping network, transforming the latent code Obtaining the latent vector through the mapping network , the latent vector from the latent space The affine transformation is performed by feature linear modulation FiLM, injected into each layer of the mapping network, and the mapping network is expanded to 8 layers as the mapping network of the style-based neural upsampler. Each SURF block receives the latent space The latent vector of is used as the noise input and a learnable linear layer is used to generate the frequency for each block. and phase shift , and inject noise through a periodic activation function;

[0064] The SURF block is represented as: , , , , , ,in Indicates The input of the layer, and is the weight matrix and bias vector of the fully connected layer, Represents the intermediate vectors output by the three fully connected layers and the SURF layer After two fully connected layers and , generating the feature vector and SDF value , linear layer And the activation function Used to and Convert to RGB values ​​required for volume rendering and body density ,in is a learnable activation function;

[0065] The generated SDF value is used to extract the mesh model and train the parameters. To indicate the compactness of the surface, and use the SDF value for volume rendering, using the formula The SDF value Convert to spatial volume density .

[0066] Furthermore, the step S5 uses volume rendering to synthesize an image with a resolution of 64×64, including:

[0067] Rendering images using the volume rendering equation, , ,in , represents the cumulative transmittance of light, and are rays The feature vector and color of correspond to the pixel features and colors in the pixel space, is a position on the ray, is the position on the ray The three-dimensional coordinates of It's rays Direction vector , and Represent three-dimensional space points RGB values, eigenvectors and volume densities, and They are the near bound and far bound of the camera ray respectively;

[0068] Sampling a set of discrete points to approximate the integral value, the sampling strategy is to Divided evenly Segments, random sampling points in the middle of each segment , sampled only once, then and Rewrite as ,in and The sampling points are The corresponding eigenvectors and color values, Indicates the distance between adjacent sampling points.

[0069] Furthermore, in step S6, a style-based neural upsampler is designed and a two-stage supervision method is adopted, including:

[0070] The designed style-based neural upsampler takes the feature map F with camera prior as input in the first layer, and gradually enhances the resolution of the feature map as the level increases, converts the feature maps of different resolutions into RGB images, and uses bilinear upsampling for skip connection. Each layer of the sampler combines the mapping network generated space;

[0071] The two-stage supervision method adopted is to first reduce the dataset to a resolution of 64×64 and then Perform bicubic upsampling to obtain a high-resolution estimated image , the high-resolution estimated image With the generated high-resolution image Used together in the training process to optimize the generated network.

[0072] Furthermore, the calculation of the adversarial loss, camera pose loss, Eikonal loss and consistency loss in step S7 includes:

[0073] Calculate adversarial loss: Use non-saturated loss as the generation adversarial loss , , where the function The expression is shortened to , t is the independent variable, represents the mathematical expectation, and Represents the generator and discriminator of lightweight NeRF-GAN, camera pose Taken from camera distribution , latent coding Taken from a standard normal distribution , real image Taken from the training set distribution , It is a hyperparameter, set by default =0.5;

[0074] Camera pose loss :Use a discriminator , while detecting the generated low-resolution image, generate the camera pose of the corresponding image , and L1 loss is used to calculate the generated camera pose Compared with the real camera pose The error between ;

[0075] Eikonal loss: Using Eikonal loss , the calculated SDF value Regularize, ,in yes The gradient of

[0076] Setting loss coefficient =10, = 0.1, and the overall loss function of the SDF volume renderer Defined as ;

[0077] Consistency loss: The same loss function and regularization as StyleGAN2 are used when training the style-based neural upsampler, computing the image obtained by the bicubic upsampling operation High-resolution images obtained with volume rendering The L1 loss between them is used as an additional consistency loss for training the neural upsampler , ,in and Respectively represent the horizontal and vertical coordinates of the corresponding pixels of the image, The loss coefficient is set to 0.1.

[0078] The experimental data of the present invention on the FFHQ dataset are as follows.

[0079] algorithm FID↓ KID(*1000)↓ GRAF 77.3 51.9 GIRAFFE 36.4 22.3 StyleSDF 24.5 12.1 The present invention 21.8 8.3

[0080] The above table is a quantitative comparison with the baseline method, showing the FID score (↓) and KID score (↓) of the baseline method and the present invention at 256*256 pixels, where KID*1000 is times for ease of representation.

[0081] algorithm speed Parameter quantity GIRAFFE 3.3 0.7 StyleSDF 6.9 7.6 The present invention 16.5 13.3

[0082] The table above compares training speed and network parameters, showing the number of iterations per second, and the number of generator network parameters is in the order of millions.

[0083] A 3D consistent face generation method based on neural signed distance field is proposed in this paper, which combines a lightweight NeRF-GAN and a style-based neural upsampler. The proposed NeRF-GAN adopts a multi-resolution hash grid as an encoder for scene representation, which can effectively improve the training speed. In order to solve the inconsistency problem of multi-view images, an additional self-supervision method is integrated in the proposed neural upsampler. In addition, SDF modeling can generate higher quality 3D models. Experimental results show that this method is superior to the baseline method, especially the synthesized images still maintain high quality and details at high resolution, demonstrating its excellent performance.

[0084] The above only expresses the preferred implementation mode of the present invention, and its description is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that for ordinary technicians in this field, without departing from the concept of the present invention, several modifications, improvements and substitutions can be made, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be based on the attached claims.

Claims

1. A method for generating three-dimensional consistent faces based on neural signed distance fields, characterized in that: The following steps are involved: Step S1: Obtain face-related data and obtain face RGB images from the FFHQ dataset; Step S2: Create a volume rendering network based on a neural signed distance field (SDF) and initialize the network hyperparameters; Step S3: A learnable multi-resolution hash grid is used to hash the 3D points and ray directions, and a potential mapping network is used to process the potential codes, and the mapped potential codes and hash codes are used as inputs of the designed NeRF-GAN generator; Step S4: The NeRF-GAN generator outputs the SDF value, eigenvalue and RGB color of the sampling point, and adopts the 2D noise injection method; The lightweight NeRF-GAN adopts a three-layer MLP activated by LeakyReLU as its mapping network, transforming the latent code Obtaining the latent vector through the mapping network , from the latent space The latent vector of is affine transformed by feature linear modulation FiLM and injected into each layer of the mapping network, and the mapping network is expanded to 8 layers as the mapping network of the style-based neural upsampler. Each SURF block receives the latent space The latent vector of is used as the noise input and a learnable linear layer is used to generate the frequency for each block. and phase shift , and inject noise through a periodic activation function; The SURF block is represented as: , , , , , ,in Indicates The input of the layer, and is the weight matrix and bias vector of the fully connected layer, Represents the intermediate vectors output by the three fully connected layers and the SURF layer After two fully connected layers and , generating the feature vector and SDF value , linear layer And the activation function Used to and Convert to RGB values ​​required for volume rendering and body density ,in is a learnable activation function; The generated SDF value is used to extract the mesh model and train the parameters. To indicate the compactness of the surface, and use the SDF value for volume rendering, using the formula The SDF value Convert to spatial volume density ; Step S5: Volume rendering is used to synthesize an image with a resolution of 64×64, and a feature map F carrying prior knowledge in the generation process is additionally rendered; Step S6: design a style-based neural upsampler to process the feature map to generate a high-resolution two-dimensional image, and adopt a two-stage supervision method; Step S7: Calculate the adversarial loss, camera pose loss, Eikonal loss and consistency loss to optimize the generated model.

2. A method for generating three-dimensional consistent faces based on neural signed distance fields according to claim 1, characterized in that: The step S1 of obtaining a face RGB image from the FFHQ dataset includes: 70,000 face images with different resolutions of 256x256 are obtained from the FFHQ dataset, and the images are normalized. The images in the dataset are downsampled to a resolution of 64x64.

3. The method for generating three-dimensional consistent faces based on neural signed distance fields according to claim 1, characterized in that: In the step S2, a volume rendering network based on a neural signed distance field SDF is created and the network hyper parameters are initialized, including: The volume rendering network consists of a generator network and a discriminator network. The generator is used to generate high-quality images and geometric models, and the discriminator is used to evaluate the authenticity and consistency of the generated images. Initializing the system hyperparameters includes setting the learning rate, the weight of the loss function, and the number of iterations.

4. The method for generating three-dimensional consistent faces based on neural signed distance fields according to claim 1, characterized in that: In step S3, a learnable multi-resolution hash grid is used to perform hash encoding on three-dimensional points and ray directions, including: Encode the 3D point x and the camera light direction d in the canonical space, and divide the 3D canonical space into grids of different resolutions ,in is the maximum number of grid layers of different resolutions, is the number of layers. The hash table values ​​corresponding to the mesh vertices are queried at different resolutions respectively, and the encoding values ​​at the resolution are obtained through trilinear interpolation. Spherical co-encoding is used to encode the camera light direction d.

5. The method for generating three-dimensional consistent faces based on neural signed distance fields according to claim 1, characterized in that: The step S5 uses volume rendering to synthesize an image with a resolution of 64×64, including: Rendering images using the volume rendering equation, , ,in , represents the cumulative transmittance of light, and are rays The feature vector and color of correspond to the pixel features and colors in the pixel space, is a position on the ray, is the position on the ray The three-dimensional coordinates of It's rays Direction vector , and Represent three-dimensional space points RGB values, eigenvectors and volume densities, and They are the near bound and far bound of the camera ray respectively; Sampling a set of discrete points to approximate the integral value, the sampling strategy is to Divided evenly Segments, random sampling points in the middle of each segment , sampled only once, then and Rewrite as ,in and The sampling points are The corresponding eigenvectors and color values, Indicates the distance between adjacent sampling points.

6. The method for generating three-dimensional consistent faces based on neural signed distance fields according to claim 1, characterized in that: In step S6, a style-based neural upsampler is designed, and a two-stage supervision method is adopted, including: The designed style-based neural upsampler takes the feature map F with camera prior as input in the first layer, and gradually enhances the resolution of the feature map as the level increases, converts the feature maps of different resolutions into RGB images, and uses bilinear upsampling for skip connection. Each layer of the sampler combines the mapping network generated space; The two-stage supervision method adopted is to first reduce the dataset to a resolution of 64×64 and then Perform bicubic upsampling to obtain a high-resolution estimated image , the high-resolution estimated image With the generated high-resolution image Used together in the training process to optimize the generated network.

7. The method for generating three-dimensional consistent faces based on neural signed distance fields according to claim 1, characterized in that: The calculation of the adversarial loss, camera pose loss, Eikonal loss and consistency loss in step S7 includes: Calculate adversarial loss: Use non-saturated loss as the generation adversarial loss , , where the function The expression is shortened to , t is the independent variable, represents the mathematical expectation, and Represents the generator and discriminator of lightweight NeRF-GAN, camera pose Taken from camera distribution , latent coding Taken from a standard normal distribution , real image Taken from the training set distribution , It is a hyperparameter, set by default =0.5; Camera pose loss :Use a discriminator , while detecting the generated low-resolution image, generate the camera pose of the corresponding image , and L1 loss is used to calculate the generated camera pose Compared with the real camera pose The error between ; Eikonal loss: Using Eikonal loss , the calculated SDF value Regularize, ,in yes The gradient of Setting loss coefficient =10, = 0.1, and the overall loss function of the SDF volume renderer Defined as ; Consistency loss: The same loss function and regularization as StyleGAN2 are used when training the style-based neural upsampler, computing the image obtained by the bicubic upsampling operation High-resolution images obtained with volume rendering The L1 loss between them is used as an additional consistency loss for training the neural upsampler , ,in and Respectively represent the horizontal and vertical coordinates of the corresponding pixels of the image, The loss coefficient is set to 0.1.

Citation Information

Patent Citations

  • Three-dimensional head model reconstruction method and device based on deformable nerve radiation field

    CN114648613A

  • Three-dimensional reconstruction method based on neural radiation field

    CN117036612A

  • Virtual image synthesis method, synthesis device, equipment and medium

    CN117115331A

  • Three-dimensional content generation method based on periodic implicit representation

    CN117372644A

  • Multi-view three-dimensional reconstruction method based on deep residual error and neural implicit surface learning

    CN117830520A