TL;DR
This paper introduces PhotoApp, a novel method for photorealistic editing of head portraits, allowing users to simultaneously adjust both the scene illumination and camera viewpoint. By leveraging the latent space of StyleGAN and a combination of supervised learning and generative modeling, PhotoApp achieves high-quality, generalizable results on "in-the-wild" images, outperforming existing methods.
What Problem Does This Paper Address?
Editing the appearance of head portraits, such as changing the lighting or camera angle, is a challenging task due to the complex interplay of light, surface properties, and human sensitivity to facial inconsistencies. Existing methods often fall into two camps: those requiring extensive, controlled capture setups (like light stages) which limit generalization, or those using generative models like StyleGAN but lacking direct supervision, leading to less precise control and potential artifacts. A key gap is the ability to perform both illumination and viewpoint editing simultaneously on real-world images with high photorealism, without requiring massive datasets or complex capture rigs.
Methods
The core innovation of PhotoApp lies in its approach to learning within the latent space of StyleGAN. Instead of directly manipulating pixels, the method learns to map the StyleGAN latent code of an input image to the latent code of a desired output image. This mapping is learned in a supervised manner using a light-stage dataset.
Here's a breakdown of the key components:
- StyleGAN Latent Space: The paper leverages the powerful generative capabilities of StyleGAN, specifically its W+ latent space, which offers a rich representation of facial appearance.
- Supervised Latent Mapping: A neural network, PhotoAppNet, is trained to predict a displacement in the StyleGAN latent space. This displacement, when added to the input image's latent code, results in the desired edited image.
- Loss Functions: The training is guided by two primary loss terms:
- Latent Loss: Ensures the predicted latent code is close to the ground truth latent code. This is crucial for preserving identity and enabling generalization to unseen expressions.
- Perceptual Loss: Uses the LPIPS metric to compare the visual similarity between the synthesized and ground truth images, ensuring high perceptual quality.
- Conditional Input: A binary input
pis used to condition the network, allowing it to distinguish between cases where only relighting is needed (target pose same as input) and cases where both relighting and viewpoint change are required.
This approach combines the benefits of supervised learning (precision and quality) with the generalization power of generative models.
Datasets
- Training: The primary training dataset is a light-stage dataset from Weyrich et al. [2006], which contains 341 identities captured with 8 cameras and 150 different light sources. This dataset allows for generating ground truth images under various lighting and viewpoint conditions.
- Environment Maps: HDR environment maps from the Laval Outdoor [Hold-Geoffroy et al. 2019] and Naval Indoor [Gardner et al. 2017] datasets are used to generate naturally lit images.
- Evaluation: The paper evaluates its method on both the light-stage test set and "in-the-wild" portrait images from sources like Shih et al. [2014] and Karras et al. [2019].
Key Insights and Ideas
- Latent Space is Key for Generalization: The paper strongly advocates for learning in the StyleGAN latent space. This approach allows for significant generalization to "in-the-wild" images and even unseen expressions, despite the training data having limited variations (e.g., closed eyes).
- Supervised Learning in Latent Space is Powerful: By combining supervised losses with the StyleGAN latent space, PhotoApp achieves a sweet spot between precise control and photorealistic synthesis, outperforming methods that are purely generative or purely supervised on limited data.
- Simultaneous Editing is Achievable and Beneficial: The ability to edit both illumination and viewpoint simultaneously, rather than sequentially, leads to more coherent and higher-quality results.
- Limited Supervision is Sufficient: The method demonstrates impressive results even when trained with a surprisingly small number of identities (as few as 3), highlighting the efficiency of the learned latent space representation.
Key Results
- Photorealistic Editing: PhotoApp produces high-quality, photorealistic results that capture complex effects like shadows and specularities, and can edit the full portrait image including hair, eyes, and background.
- Quantitative Performance: The method achieves state-of-the-art results on quantitative metrics like Si-MSE and SSIM, often outperforming competitors by a significant margin, especially on "in-the-wild" data. For instance, in Table 1, PhotoApp achieves the lowest Si-MSE for relighting. In Table 2, it outperforms competing methods in both Si-MSE and SSIM for joint editing.
- Speed: The method is interactive, taking approximately 160ms to compute an edit, significantly faster than methods like PIE which take around 10 minutes per image.
- Generalization: The method shows strong generalization capabilities, producing good results on diverse identities and expressions not seen during training, even with limited training data.
Limitations and Future Work
- Accessories and Backgrounds: The paper acknowledges that the method can struggle with preserving accessories like caps and sunglasses, and can be affected by background clutter.
- Extreme Edits: Very large edits in pose and illumination can sometimes lead to degradation in quality or identity preservation.
- Video Flicker: While results on videos are promising, slight flicker and instability can occur, suggesting a need for temporal consistency improvements.
- Future Work: The authors suggest exploring methods that can better preserve input illumination when editing viewpoint, and incorporating temporal consistency for video editing. They also hope their work inspires further research into generative representations for synthesis applications.
Summary updated