TL;DR
This paper introduces a novel zero-shot domain adaptation technique that transforms non-photorealistic synthetic face renders into high-resolution, photorealistic images. It achieves this by mapping synthetic images to the latent space of a pre-trained StyleGAN2 model, preserving semantic attributes like pose and expression while significantly enhancing visual realism without requiring any paired synthetic training data.
What Problem Does This Paper Address?
Generating photorealistic human faces at scale is a notoriously difficult task in computer graphics due to the complexity of simulating light, geometry, and materials accurately. While deep generative models like StyleGAN2 excel at producing realistic faces from image data, they often lack fine-grained control over attributes and inherit biases from their training data. This creates a gap: we can easily generate synthetic faces with controllable attributes (pose, expression, etc.) using traditional graphics pipelines, but these are not photorealistic. Conversely, GANs produce photorealistic faces but offer limited control. The challenge is to bridge this gap by making synthetic faces photorealistic while retaining their controllable semantics, without needing extensive paired training data.
Methods
The core of the proposed method involves finding a latent code in a pre-trained StyleGAN2 model that generates a photorealistic image closely matching a given synthetic input. This is achieved in four main steps:
- Sampling: An initial latent code is found by sampling from the StyleGAN2 latent space. This step is guided by a loss function that combines perceptual similarity (LPIPS), luminance, color, and landmark alignment. To improve robustness across diverse synthetic inputs (pose, lighting, ethnicity), the authors introduce control vectors derived from a small annotated subset of StyleGAN2's latent space, allowing for manipulation of attributes like face angle and hair length.
- Convex Set Approximate Nearest Neighbour Search (CS-ANNS): This novel algorithm refines the initial latent code. It leverages the observation that convex combinations of latent codes from the StyleGAN2 prior also produce realistic images. CS-ANNS traverses the latent space, optimizing a combination of sampled latent codes to find a refined code that adheres to the prior distribution while staying close to the synthetic input.
- Synthetic Fit and Latent Code Interpolation: The method performs an "exact fit" to the synthetic image using a modified StyleGAN2 optimization process to obtain a latent code that closely matches the synthetic input. Then, it interpolates between this "exact fit" latent code and the refined code from CS-ANNS. This interpolation allows for preserving the overall facial geometry from the synthetic image while incorporating the fine details and photorealism from the StyleGAN2 latent space.
- Sample Selection: Finally, the algorithm selects the best candidate latent code from the generated proposals based on Structural Similarity (SSIM) metric at a high resolution, which is found to be more effective than perceptual losses for matching facial features.
Crucially, the method requires only a pre-trained StyleGAN2 generator and a few manual annotations for control vectors, making it a "zero-shot" approach in terms of needing no synthetic training data.
Datasets
- FFHQ (Flickr-Faces-HQ): Used as the target domain for training the StyleGAN2 model. The authors use the same pre-processing and normalization as in the original StyleGAN2 paper.
- Synthetic Dataset: A diverse set of 1000 synthetic face images generated using a traditional graphics pipeline. This dataset is used for evaluation and is also used to derive control vectors.
- Small Annotated Subset (2000 samples): A subset of the synthetic dataset is annotated with simple attributes to derive control vectors for manipulating pose, lighting, and expression.
Key Insights and Ideas
- Leveraging the StyleGAN2 Prior: The core idea is that the latent space of a well-trained GAN like StyleGAN2 represents a "prior" of realistic images. Convex combinations of points in this prior space also tend to be realistic, a property exploited by the CS-ANNS algorithm.
- Zero-Shot Adaptation: The ability to adapt a synthetic image to a photorealistic domain without any paired synthetic-to-real training data is a significant advancement. This bypasses the need for large, curated datasets for domain transfer.
- Combining Strengths: The method effectively combines the controllability of synthetic graphics with the photorealism of deep generative models. It uses synthetic data for semantic control and StyleGAN2 for photorealistic rendering.
- Importance of Landmark Alignment: The authors found that using Structural Similarity (SSIM) for final sample selection, rather than purely perceptual losses like LPIPS, yielded better results. This suggests that precise alignment of facial features is critical for effective domain adaptation, even if the perceptual quality is high.
- Control Vectors for Diversity: Introducing control vectors derived from a small annotated subset of the latent space allows the method to handle a wider range of synthetic inputs (pose, lighting, ethnicity) than a simple nearest-neighbor search in the latent space.
Key Results
- Photorealism: User studies indicate that the proposed method produces images considered more photorealistic than the StyleGAN2 baseline in 94.48% of cases and more realistic than the input synthetic images in 95.1% of cases.
- Semantic Preservation: The method preserves semantic attributes like pose and expression from the synthetic input.
- High Resolution: The algorithm operates at a 1K resolution, which was a significant leap forward at the time of publication.
- Quantitative Metrics: The method improves FID scores compared to the StyleGAN2 baseline. The FID difference between "Ours" and "Ours (only face)" suggests that background and hair preservation can impact FID, though human assessment may not reflect this as strongly.
- Landmark Accuracy: The median absolute error for facial landmark alignment is low (20.2 pixels horizontally, 14.2 pixels vertically on 1024x1024 images), indicating good preservation of facial geometry.
Limitations and Future Work
- Processing Time: The method requires substantial processing time per image. The authors hypothesize this could be amortized by training a model to directly predict StyleGAN2 embeddings from synthetic images.
- Temporal Consistency: Temporal consistency for processing animations is left as future work.
- User Study Size: While the user study is informative, the authors suggest that a larger number of samples would be beneficial for a more conclusive result.
- Fairness: The authors acknowledge that while they attempt to balance sampling for fairness, it requires closer examination in future work.
- Background/Hair Impact on Metrics: The paper notes that while "Ours (only face)" preserves background and hair, impacting FID positively, this might not align with human perception of realism.
Summary updated