GAN2X: Non-Lambertian Inverse Rendering of Image GANs

Xingang Pan, Ayush Tewari, Lingjie Liu, Christian Theobalt

Introduction

Inverse rendering—the process of decomposing a 2D image into its constituent 3D components, such as geometry, material properties, and lighting—remains a fundamental challenge in computer vision. Traditionally, this task requires "paired" data, such as multiple photographs of the same object captured from various angles or under controlled lighting conditions. However, collecting such data for "in-the-wild" objects, such as human faces or vehicles, is often impractical.

Recent advancements in "Shape-from-GAN" methods have attempted to circumvent this data bottleneck by utilizing 2D Generative Adversarial Networks (GANs) as sources of unsupervised data. While promising, these methods typically rely on the simplifying assumption that surfaces are Lambertian (perfectly matte). In reality, most real-world objects exhibit complex specular highlights—the glint on a car's hood or the shine on human skin. When models ignore these highlights, they often "bake" them into the texture (albedo) or distort the 3D geometry to explain the bright spots. GAN2X addresses this limitation by explicitly modeling non-Lambertian materials, allowing for high-quality 3D reconstruction and relighting from a single 2D image.

Methodology

GAN2X treats a pre-trained 2D GAN (such as StyleGAN2) as a "pseudo-light-stage," extracting latent 3D knowledge through a structured pipeline. The framework consists of four primary components:

1. Implicit Neural Representation

Rather than using traditional meshes, GAN2X represents the object using Multi-Layer Perceptrons (MLPs). One MLP is dedicated to modeling the Signed Distance Function (SDF), which defines the 3D geometry. A second MLP models material properties, including diffuse albedo, specular intensity, and shininess.

2. Hybrid Rendering

To bridge the gap between 3D representations and 2D images, the system employs a hybrid rendering approach. It uses differentiable volume rendering to handle the geometry and Phong shading to simulate the interaction between light and non-Lambertian materials. This allows the model to backpropagate errors from the 2D image pixels directly to the 3D neural parameters.

3. Exploration-Exploitation Loop

The core training mechanism is an iterative loop:

  • Exploration: The model uses a simple convex shape prior to re-render a GAN-generated image from novel viewpoints and lighting conditions. These renders are then "projected" back onto the GAN’s image manifold, creating a set of pseudo-paired images that the GAN considers realistic.
  • Exploitation: The neural surface representation is trained to reconstruct these pseudo-paired images, effectively learning the underlying 3D structure and materials that the GAN implicitly understands.

4. Shading-Based Refinement (SBR)

Because 2D GANs are not perfectly 3D-consistent, initial reconstructions may lack fine-grained details. SBR is a final optimization step that fine-tunes the model parameters to match the target image's specific details—such as wrinkles, teeth, or unique textures—while ensuring the 3D structure remains valid.

Experiments and Results

The model was evaluated on several diverse datasets, including human faces (CelebA, CelebAHQ), animals (AFHQ Cat), and objects (LSUN Car). Quantitative evaluation was performed using the H3DS dataset, which provides ground-truth 3D scans of human faces.

Key Findings

  • State-of-the-Art Accuracy: On the H3DS benchmark, GAN2X achieved a Chamfer Distance of 2.08, significantly outperforming previous unsupervised methods like GAN2Shape (2.62) and Unsup3d (3.60).
  • Material Disentanglement: By explicitly modeling specularity, the framework successfully separates highlights from base textures. This prevents geometric distortions; for example, the model can recover subtle features like double-fold eyelids without being confused by skin reflections.
  • Realistic Relighting: Because the material properties are disentangled, the model can realistically simulate how light moves across a surface. In testing, specular highlights on lips or car bodies move naturally as the virtual light source rotates, while the underlying color remains constant.

Discussion and Limitations

GAN2X demonstrates that 2D GANs implicitly learn sophisticated 3D geometry and light transport to achieve photorealism. By providing the tools to "milk" this latent knowledge, GAN2X enables high-quality inverse rendering without 3D supervision.

However, some challenges remain:

  • Lighting Complexity: The current model assumes a single point light source and ambient light, which may fail in complex environments with multiple light sources.
  • Convexity Bias: The reliance on a convex shape prior (like an ellipsoid) for the exploration phase makes it difficult to reconstruct highly non-convex objects, such as bicycles or furniture.
  • Material Ambiguity: Distinguishing between dark materials and low lighting remains difficult. For instance, the model occasionally assigns high shininess to car tires because they are dark and lack the predictable features found on the car's body.

Future work may involve integrating more advanced 3D-aware GAN architectures to further refine geometry and accommodate more complex object topologies.

Summary updated

BibTeX
@inproceedings{pan2022gan,
  author = {Xingang Pan and Ayush Tewari and Lingjie Liu and Christian Theobalt},
  title = {{GAN2X: Non-Lambertian Inverse Rendering of Image GANs}},
  booktitle = {3DV},
  year = {2022},
  doi = {10.1109/3dv57658.2022.00081},
}
Figure