Joint Bilateral Learning for Real-Time Universal Photorealistic Style Transfer

Xide Xia, Meng Zhang, Tianfan Xue, Zheng Sun, Hui Fang, Brian Kulis, Jiawen Chen

Abstract

Photorealistic style transfer is the task of transferring the artistic style of an image onto a content target, producing a result that is plausibly taken with a camera. Recent approaches, based on deep neural networks, produce impressive results but are either too slow to run at practical resolutions, or still contain objectionable artifacts. We propose a new end-to-end model for photorealistic style transfer that is both fast and inherently generates photorealistic results. The core of our approach is a feed-forward neural network that learns local edge-aware affine transforms that automatically obey the photorealism constraint. When trained on a diverse set of images and a variety of styles, our model can robustly apply style transfer to an arbitrary pair of input images. Compared to the state of the art, our method produces visually superior results and is three orders of magnitude faster, enabling real-time performance at 4K on a mobile phone. We validate our method with ablation and user studies.

Introduction

Style transfer has traditionally been divided into artistic and photorealistic domains. While artistic transfer allows for dramatic warping and painterly effects, photorealistic transfer requires the output to appear as if it were captured by a camera—maintaining sharp edges and avoiding spatial distortions.

Existing solutions for photorealistic transfer often struggle with a trade-off between speed and quality. Optimization-based methods are prohibitively slow, while early feed-forward networks often introduce "painterly" artifacts or require expensive post-processing steps like the Matting Laplacian. This paper introduces a universal, real-time model that satisfies the photorealism constraint by design, achieving 4K performance on mobile devices.

Methodology: Bilateral Learning and Decoupled Resolution

The proposed architecture utilizes a dual-stream approach to decouple complex style prediction from high-resolution rendering.

1. Grid Prediction Stream

Operating at a low resolution (e.g., $256 \times 256$), this stream extracts features from both content and style images using a pre-trained VGG-19 backbone. Feature Transfer Blocks then use Adaptive Instance Normalization (AdaIN) to align content and style statistics. The final output of this stream is a bilateral grid ($\Gamma$): a 3D data structure where each cell contains a $3 \times 4$ affine transformation matrix.

2. Full-Resolution Rendering

The high-resolution rendering is performed via a simple, edge-aware slicing operation. For every pixel in the original image, the model "slices" the corresponding affine matrix from the bilateral grid based on the pixel's spatial coordinates and intensity. This matrix is then applied to the pixel's color values.

The proposed method learns local affine transforms in bilateral space. Different regions (blue vs. red boxes) receive distinct intensity mappings, ensuring edge-aware, photorealistic stylization.

3. The Bilateral Prior

Using bilateral space as a prior is a key innovation. Because the grid is low-resolution and the slicing is based on luma, the model is physically constrained from producing high-frequency spatial warping. To ensure smooth transitions between grid cells, the authors employ a Bilateral-space Laplacian Regularizer during training.

Evaluation and Results

The model was trained on high-quality landscape datasets and evaluated on a diverse test set of 400 images.

  • Performance: The method is three orders of magnitude faster than optimization-based approaches. It processes images in under 5ms on an NVIDIA V100 and maintains 30Hz at 4K resolution on modern smartphones.
  • Visual Quality: User studies involving 20 participants and 1,200 image comparisons showed that this method outperforms state-of-the-art baselines like PhotoWCT and LST. It provides photorealism comparable to WCT² but with significantly higher robustness and speed.
  • Temporal Stability: Despite being trained on static images, the local affine model provides excellent temporal coherence, making it suitable for real-time video stylization.

Conclusion

By learning local affine transforms in bilateral space, this approach provides a robust solution for real-time, universal photorealistic style transfer. While the model currently faces minor limitations in edge contrast and memory footprint, its ability to deliver high-quality 4K stylization on mobile hardware represents a significant leap forward for computational photography. Future work will explore the continuum between photorealistic and artistic styles.

Summary updated

BibTeX
@inproceedings{xia2020joint,
  author = {Xide Xia and Meng Zhang and Tianfan Xue and Zheng Sun and Hui Fang and Brian Kulis and Jiawen Chen},
  title = {{Joint Bilateral Learning for Real-Time Universal Photorealistic Style Transfer}},
  booktitle = {European Conference on Computer Vision},
  year = {2020},
  url = {https://openreview.net/forum?id=b7QUGE_4Wzw},
}
Figure