Avatar-Net: Multi-Scale Zero-Shot Style Transfer by Feature Decoration

Lu Sheng, Ziyi Lin, Jing Shao, Xiaogang Wang

Abstract

Zero-shot artistic style transfer is an important image synthesis problem aiming at transferring arbitrary style into content images. However, the trade-off between the generalization and efficiency in existing methods impedes a high quality zero-shot style transfer in real-time. In this paper, we resolve this dilemma and propose an efficient yet effective Avatar-Net that enables visually plausible multi-scale transfer for arbitrary style. The key ingredient of our method is a style decorator that makes up the content features by semantically aligned style features from an arbitrary style image, which does not only holistically match their feature distributions but also preserve detailed style patterns in the decorated features. By embedding this module into an image reconstruction network that fuses multi-scale style abstractions, the Avatar-Net renders multi-scale stylization for any style image in one feed-forward pass. We demonstrate the state-of-the-art effectiveness and efficiency of the proposed method in generating high-quality stylized images, with a series of successive applications include multiple style integration, video stylization and etc.

Introduction

Artistic style transfer—the process of applying the aesthetic qualities of a "style" image to a "content" image—has long faced a fundamental trade-off between quality and speed. Early optimization-based methods, while capable of producing high-quality results for any style, are computationally expensive and slow. Conversely, feed-forward networks offer real-time performance but are typically restricted to a fixed set of styles learned during training.

Recent "zero-shot" methods attempted to bridge this gap, but often at the cost of visual fidelity. Techniques like Adaptive Instance Normalization (AdaIN) or Whitening and Coloring Transforms (WCT) rely on global feature statistics, which can wash out intricate style details or cause content distortion. Avatar-Net addresses these issues by introducing a novel Style Decorator module within a multi-scale hourglass architecture, achieving high-quality, real-time stylization for arbitrary styles.

Methods and Architecture

The Avatar-Net framework is built upon two primary innovations: the Style Decorator and a multi-scale hourglass network.

The Style Decorator

The Style Decorator is the core component that enables semantic alignment between content and style. Unlike previous methods that match global statistics, this module uses Normalized Cross-Correlation (NCC) to find and swap semantically similar patches. The process involves three distinct steps:

  1. Projection: Content and style features are whitened to a common feature space.
  2. Matching and Reassembling: Content feature patches are replaced with the most similar patches from the style features, ensuring that "sky" in the content is decorated with "sky-like" patterns from the style.
  3. Reconstruction: A "coloring" transformation is applied to map the decorated features back into the original style's color and texture domain.

Multi-scale Hourglass Network

To capture both broad color strokes and fine-grained textures, the authors utilize a pre-trained VGG-19 encoder paired with a symmetrical decoder. This "hourglass" structure incorporates skip connections, allowing the network to fuse style information at multiple resolutions in a single feed-forward pass. This multi-scale approach ensures that the final image preserves the structural integrity of the content while adopting the complex patterns of the style.

The Avatar-Net is evaluated using standard content images like 'Lena' and a diverse array of artistic styles.

Datasets and Training

The model was trained using approximately 80,000 images from the MSCOCO dataset. The training objective focuses on reconstructing natural images, which makes the decoder "style-agnostic." This allows the network to generalize to any unseen style at test time. For evaluation, the authors tested the model on standard benchmarks and used the MPI Sintel dataset to demonstrate its robustness in video stylization tasks.

Key Results

Avatar-Net demonstrates significant improvements over existing zero-shot methods in both visual quality and efficiency.

  • Visual Fidelity: By "decorating" content features with actual style patches, the model preserves intricate brushstrokes and geometric shapes that global statistical methods (like AdaIN) often miss. It also avoids the structural distortions common in WCT.
  • Efficiency: Despite the complexity of patch matching, the Style Decorator is implemented using efficient convolutional operations. For a $512 \times 512$ image, Avatar-Net achieves stylization in 0.28 to 0.47 seconds, making it suitable for real-time applications.
  • Versatility: The framework supports advanced applications such as style interpolation (blending multiple styles) and video stylization, where the semantic patch matching leads to improved temporal stability and reduced flickering.
A comparison grid showing the versatility of Avatar-Net across various styles, highlighting its ability to preserve content structure while applying dense, detailed textures.

Conclusion and Future Work

Avatar-Net represents a major step forward in zero-shot style transfer, providing a robust solution that balances speed and artistic quality. While the current implementation uses fixed mathematical transformations for whitening and coloring, future work may involve replacing these with learnable modules to further enhance alignment. Additionally, optimizing the memory footprint of patch matching remains a key area for further refinement in high-resolution synthesis.

Summary updated

BibTeX
@inproceedings{sheng2018avatar,
  author = {Lu Sheng and Ziyi Lin and Jing Shao and Xiaogang Wang},
  title = {{Avatar-Net: Multi-Scale Zero-Shot Style Transfer by Feature Decoration}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2018},
  url = {https://openreview.net/forum?id=Hy-PA6WOZS},
}
Figure