Real-time Virtual-Try-On from a Single Example Image through Deep Inverse Graphics and Learned Differentiable Renderers

Robin Kips, Ruowei Jiang, Sileye O. Ba, Brendan Duke, Matthieu Perrot, Pietro Gori, Isabelle Bloch

Abstract

This paper presents a hybrid inverse graphics framework designed to bridge the gap between high-fidelity neural rendering and the performance of traditional Augmented Reality (AR) engines. By training a neural "imitator" to serve as a differentiable proxy for a standard, non-differentiable renderer, the authors enable an encoder to map a single reference image directly into a graphics parameter space. This approach facilitates real-time virtual try-on (VTO) for makeup and hair on mobile devices, achieving high-resolution consistency and temporal stability. Experimental results demonstrate that the system matches or exceeds the quality of manual expert tuning while maintaining inference speeds suitable for mobile deployment.

Introduction

Virtual Try-On (VTO) technology for makeup and hair has become a staple of mobile AR, yet it faces a persistent trade-off between two paradigms. Traditional physically-based renderers are efficient and stable but require manual parameter tuning by experts to match specific products. Conversely, generative neural networks, such as GANs, offer high realism but suffer from high computational costs, temporal flickering in video, and resolution constraints.

This research addresses a central challenge: How can we automatically find the exact parameters for a fast, traditional AR engine just by looking at one reference photo? The authors propose a clever solution that uses deep learning to "teach" an encoder how to use a classical renderer, combining the speed of traditional graphics with the intelligence of neural networks.

Methodology

The authors introduce a two-stage self-supervised pipeline that enables an "inverse graphics" approach without requiring a rewrite of legacy rendering code.

1. The Learned Imitator ($I$)

Because traditional AR engines (like lipstick or hair shaders) are non-differentiable, standard gradient descent cannot be used to train an encoder against them. To solve this, the authors train a generative network—the "Imitator"—to perfectly reproduce the behavior of the AR renderer. Once trained, this Imitator acts as a differentiable "proxy" for the real engine.

2. Inverse Graphics Encoder ($E$)

This network takes a reference image and predicts a vector of graphics parameters ($g$), such as RGB values, glossiness, or metallic levels. During training, the predicted $g$ is passed through the Imitator. The loss is calculated by comparing the Imitator's output to the original reference image.

3. Rendering Sensitivity Loss

A key technical contribution is the Rendering Sensitivity Loss. To ensure the Imitator understands the "knobs" of the renderer rather than just producing static images, the authors force the Imitator to match the partial derivatives of the real renderer. If a parameter like "gloss" is adjusted in the real engine, the Imitator must change the image in the exact same way. This ensures the parameter space remains continuous and meaningful.

At inference time, the Imitator is discarded. The mobile application simply runs the lightweight Encoder once to extract parameters, which are then fed into the standard, high-speed AR engine for real-time video rendering.

Experimental Setup and Results

The model was trained using a combination of the FFHQ portrait dataset and a synthetic dataset of 15,000 images generated by sampling random parameters through the AR engine. Performance was evaluated against a Makeup Transfer Benchmark and a custom User Study Dataset containing 2,500 images with expert-tuned parameters.

Key Findings

  • Efficiency: The inverse graphics encoder runs in approximately 27ms on an iPhone X. Since parameters are estimated only once, the actual AR rendering remains at full camera frame rates.
  • Visual Fidelity: Qualitative comparisons showed the method produced more realistic textures—specifically shine and highlights—compared to purely generative models like BeautyGAN or PSGAN.
  • User Preference: In a study with human judges, the automated system's parameters were preferred over manual expert tuning 48.5% of the time, and judged equally valid in another 19.7% of cases.
  • Ablation Study: The "Sensitivity Loss" was proven vital, reducing perceptual distance errors from 0.071 to 0.054 for lipstick applications.

Conclusion and Future Work

The proposed framework demonstrates that differentiability is a choice; one can train a neural twin to bridge the gap between deep learning and legacy C++ renderers. While the system is currently bound by the capabilities of the underlying AR engine and struggles with extreme out-of-distribution colors, it provides a robust foundation for real-time VTO. Future work may extend this inverse graphics approach to other AR categories, such as eyewear, nail polish, or complex geometry estimation for accessories.

Summary updated

BibTeX
@article{kips2022real,
  author = {Robin Kips and Ruowei Jiang and Sileye O. Ba and Brendan Duke and Matthieu Perrot and Pietro Gori and Isabelle Bloch},
  title = {{Real-time Virtual-Try-On from a Single Example Image through Deep Inverse Graphics and Learned Differentiable Renderers}},
  journal = {Computer Graphics Forum},
  year = {2022},
  doi = {10.1111/cgf.14456},
}
Figure