Inverting Generative Adversarial Renderer for Face Reconstruction

Jingtan Piao, Keqiang Sun, Kwan-Yee Lin, Quan Wang, Hongsheng Li

Abstract

Given a monocular face image as input, 3D face geometry reconstruction aims to recover a corresponding 3D face mesh. Recently, both optimization-based and learning-based face reconstruction methods have taken advantage of the emerging differentiable renderer and shown promising results. However, the differentiable renderer, mainly based on graphics rules, simplifies the realistic mechanism of the illumination, reflection, etc., of the real world, thus cannot produce realistic images. This brings a lot of domain-shift noise to the optimization or training process. In this work, we introduce a novel Generative Adversarial Renderer (GAR) and propose to tailor its inverted version to the general fitting pipeline, to tackle the above problem. Specifically, the carefully designed neural renderer takes a face normal map and a latent code representing other factors as inputs and renders a realistic face image. Since the GAR learns to model the complicated real-world image, instead of relying on the simplified graphics rules, it is capable of producing realistic images, which essentially inhibits the domain-shift noise in training and optimization. Equipped with the elaborated GAR, we further proposed a novel approach to predict 3D face parameters, in which we first obtain fine initial parameters via Renderer Inverting and then refine it with gradient-based optimizers. Extensive experiments have been conducted to demonstrate the effectiveness of the proposed generative adversarial renderer and the novel optimization-based face reconstruction framework. Our method achieves state-of-the-art performances on multiple face reconstruction datasets.

Introduction

Monocular 3D face reconstruction—recovering a 3D mesh from a single 2D photo—is a cornerstone of computer vision with applications in AR, VR, and facial recognition. Currently, researchers use two main strategies: learning-based (regressing 3D parameters directly) and optimization-based (iteratively fitting a 3D model until its render matches the photo).

The bottleneck for both is the Differentiable Renderer (DR). Traditional DRs rely on simplified graphics rules like Lambertian reflectance and basic lighting models. Consequently, their output looks "uncanny" or "cartoonish" compared to real photos. This creates a domain gap: an optimizer trying to match a realistic photo to a simplified render often gets "confused" by the stylistic differences, leading to inaccuracies. Furthermore, traditional renderers often struggle with complex details like hair, accessories, and realistic skin textures.

Methodology

Generative Adversarial Renderer (GAR)

We propose a paradigm shift: instead of using a hard-coded graphics engine, we use a learned neural network for rendering. Based on the StyleGAN2 architecture, the GAR takes two inputs: a face normal map (representing geometry) and a latent code (representing texture, lighting, and identity).

Overview of the GAR architecture and the novel losses used for training.

Normal Injection Module (NIM)

To ensure the geometry is strictly controlled, we developed the Normal Injection Module (NIM). Instead of just concatenating the normal map to the features, NIM uses the normal map to spatially modulate the convolution kernels, providing much finer control over the resulting face shape.

Training and Inverting

To ensure the geometry and texture inputs remain decoupled, we employ a Normal Consistency Loss (ensuring a pre-trained estimator can recover the original normal map from the render) and contrastive losses to keep identity stable across different poses.

To reconstruct a face, we perform Renderer Inverting. We train a separate Inverting Network to predict an initial latent code and 3D Morphable Model (3DMM) parameters. We then perform a joint optimization of these parameters to minimize the difference between the GAR’s photorealistic output and the target image.

Key Results

Our method achieves state-of-the-art accuracy on the Florence dataset with a point-to-plane error of 0.90–0.94mm, outperforming previous leaders like GANFIT. Qualitatively, the GAR produces renders that are virtually indistinguishable from real photos, capturing hair and skin details that traditional 3DMM renderers miss entirely.

Qualitative comparison of 3D face reconstruction and rendering results against state-of-the-art methods on in-the-wild images.

By bridging the domain gap, the optimization process becomes significantly more stable. The "noise" caused by comparing a real photo to a plastic-looking 3D model is eliminated, allowing for high-fidelity reconstructions even in challenging "in-the-wild" scenarios.

Conclusion

By replacing simplified graphics rules with a Generative Adversarial Renderer, we effectively eliminate domain-shift noise in face reconstruction. The proposed GAR and NIM modules allow for high-fidelity, geometry-aware face synthesis and accurate 3D mesh recovery. Future work may extend this concept to other categories, such as rendering realistic indoor scenes from basic geometric layouts.

Summary updated

BibTeX
@inproceedings{piao2021inverting,
  author = {Jingtan Piao and Keqiang Sun and Kwan-Yee Lin and Quan Wang and Hongsheng Li},
  title = {{Inverting Generative Adversarial Renderer for Face Reconstruction}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2021},
  doi = {10.1109/cvpr46437.2021.01536},
}
Figure