NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

3D GAN Inversion with Pose Optimization

Jaehoon Ko, Kyusun Cho, Daewon Choi, Kwangrok Ryoo, Seungryong Kim

TL;DR

This paper introduces a robust method for 3D GAN Inversion, allowing researchers to project a single 2D real-world photo into the latent space of a 3D-aware GAN (like EG3D). By simultaneously optimizing camera pose and latent codes through a hybrid "encoder-plus-optimization" approach, the method enables high-fidelity 3D reconstruction and multi-view consistent semantic editing from just one image.

What Problem Does This Paper Address?

GAN inversion—the process of finding the latent code that reconstructs a specific real-world image—is a cornerstone of AI-based image editing. While 2D GAN inversion (e.g., StyleGAN) is well-studied, it suffers from a major flaw: it lacks an underlying understanding of 3D geometry. If you try to "rotate" a face inverted in a 2D GAN, the identity often shifts or the image distorts because the model doesn't know the difference between a change in shape and a change in viewpoint.

3D-aware GANs (which integrate Neural Radiance Fields, or NeRF) solve the consistency problem but introduce a new "chicken-and-egg" challenge for inversion. To reconstruct an image, you need both the latent code (the "what") and the camera pose (the "where"). Optimizing both simultaneously is notoriously difficult; if the initial pose estimate is slightly off, the latent code will try to compensate by distorting the geometry, leading to "local minima" where the reconstruction looks okay from one angle but "melts" when rotated.

Methods

The authors propose a multi-stage pipeline to navigate this complex optimization landscape:

  1. Hybrid Initialization: Instead of starting from random noise, they use pre-trained encoders to get a "best guess" for both the latent code ($w$) and the camera pose ($\pi$). Since real-world datasets lack ground-truth 3D labels, they generate a pseudo-dataset using the 3D GAN itself to train these encoders.
  2. Simultaneous Optimization: They refine the initial guesses by minimizing a combination of losses. A key novelty here is the Depth-based Warping Loss. By leveraging the depth maps inherent in NeRF-based generators, they warp the generated image into different viewpoints to ensure the 3D structure remains plausible.
  3. Depth Regularization: To prevent the "floaters" and "cracks" common in NeRF reconstructions from sparse data, they introduce a smoothness loss ($\mathcal{L}_{DR}$) that encourages neighboring pixels to have similar depth values.
  4. 3D Pivotal Tuning (PTI): Finally, they adapt the Pivotal Tuning technique to 3D. They slightly fine-tune the weights of the generator itself to "anchor" the latent space around the specific target image, ensuring near-perfect reconstruction without losing the ability to perform semantic edits (like adding a smile).

Datasets

The method was evaluated across several popular benchmarks:

  • FFHQ & CelebA-HQ: Used for human face reconstruction and editing.
  • AFHQ & AnimalFace10: Used to demonstrate that the method generalizes to other categories, specifically cat faces.
  • Pseudo-dataset: A custom dataset of 30,000 face pairs and 10,000 cat pairs generated by EG3D to pre-train the initial encoders.

Key Insights and Ideas

  • Pose is a First-Class Citizen: The paper argues that pose optimization isn't just a pre-processing step but a core part of the inversion loop. Treating pose as a learnable parameter with a dedicated estimator significantly reduces reconstruction artifacts.
  • Geometry as a Constraint: By using depth-based warping, the authors force the model to find a latent code that is "3D-legal." This prevents the latent code from "cheating" by painting 2D features that only look correct from a single perspective.
  • Category Agnosticism: Unlike previous methods that relied on 3D Morphable Models (3DMMs) specifically designed for human faces, this approach is more generalizable because it relies on the GAN's own learned manifold and generic depth smoothness.

Key Results

  • Multi-view Consistency: Qualitatively, the method far outperforms 2D GAN inversion. When rotating an inverted face, the identity remains stable, and the 3D structure (visible in extracted meshes) is significantly cleaner.
  • Quantitative Superiority: On the CelebA-HQ test set, the method achieved a LPIPS score of 0.0777 and an Identity Similarity of 0.7013, outperforming standard 2D baselines like StyleGAN2-W+ and PTI in 3D-aware metrics.
  • Editing Capability: The authors demonstrate that they can perform complex edits (changing age, adding smiles, or changing gender) while rotating the camera, maintaining a level of geometric integrity that 2D methods cannot match.

Limitations and Future Work

  • High-Frequency Details: While the reconstruction is highly accurate, extremely fine details (like individual hair strands or specific skin pores) can still be softened during the inversion process.
  • Extreme Poses: The method's success is partially tied to the distribution of the underlying 3D GAN. If the GAN wasn't trained on extreme profile views, the inversion will struggle to reconstruct them.
  • Computational Overhead: The optimization-based refinement and Pivotal Tuning stages are computationally intensive compared to pure encoder-based "forward-pass" inversion methods. Future work could focus on accelerating this process for real-time applications.

Summary updated

BibTeX
@inproceedings{ko2023d,
  author = {Jaehoon Ko and Kyusun Cho and Daewon Choi and Kwangrok Ryoo and Seungryong Kim},
  title = {{3D GAN Inversion with Pose Optimization}},
  booktitle = {IEEE/CVF Winter Conference on Applications of Computer Vision},
  year = {2023},
  url = {https://openreview.net/forum?id=3lQV2ngJ9y},
}

Loading related content...

Figure