Learning Linear Transformations for Fast Image and Video Style Transfer

Xueting Li, Sifei Liu, Jan Kautz, Ming-Hsuan Yang

Abstract

This paper introduces a novel universal style transfer framework that replaces computationally expensive matrix operations, such as Singular Value Decomposition (SVD), with a learnable linear transformation module. By training lightweight convolutional neural networks (CNNs) to predict a transformation matrix directly from image feature covariances, the authors achieve high-quality artistic, photo-realistic, and video style transfer. The proposed method operates at speeds up to 140 FPS, significantly outperforming previous state-of-the-art methods in both computational efficiency and temporal stability for video applications.

Introduction

Style transfer aims to synthesize an image that preserves the semantic content of one image while adopting the stylistic characteristics of another. While early optimization-based methods produced high-quality results, they were too slow for real-time use. Subsequent feed-forward networks improved speed but were often restricted to a fixed set of styles.

Universal Style Transfer (UST) emerged to handle arbitrary image pairs, yet existing UST methods face a difficult trade-off. Matrix-based approaches like WCT rely on expensive SVD operations to align feature statistics, leading to slow processing for high-resolution images and temporal flickering in videos. Furthermore, deep networks often distort fine textures and geometric structures, making photo-realistic transfer challenging. This paper addresses these limitations by proposing a "Learning Linear Transformation" (LLT) framework.

Proposed Methodology

The core of the LLT framework is the conceptualization of style transfer as a linear operation: $F_d = T F_c$, where $F_c$ represents content features and $T$ is a transformation matrix.

Learnable Transformation Module

Instead of calculating $T$ via SVD, the authors utilize two lightweight CNNs that take the covariance matrices of content and style features as input. Using covariance matrices ($C \times C$) rather than raw feature maps makes the module agnostic to image resolution and focuses the model on global style statistics. This drastically reduces parameter counts and ensures a global style shift independent of spatial layout.

Architecture and Training

The system employs a pre-trained, fixed VGG-19 encoder and a trained symmetric decoder. To capture both fine textures and coarse patterns, the model is trained using a combination of reconstruction and style losses (Gram matrices) across multiple VGG layers. For photo-realistic tasks, a Spatial Propagation Network (SPN) is integrated as an "anti-distortion" filter, using the original content image to refine the stylized output and preserve sharp edges.

Experimental Results

The LLT framework demonstrates superior performance across several metrics, particularly in speed and stability.

Overview of style transfer results across artistic, photo-realistic, and video domains.

Efficiency and Speed

At a resolution of $256 \times 256$, the method runs at approximately 140 FPS (0.007s per image). In comparison, WCT requires 0.922s and optimization-based methods can take over 16 seconds. This efficiency allows for a single feed-forward pass without the multi-stage cascading required by previous universal methods.

Video Stability and Photo-realism

The authors prove that applying a linear transformation $T$ to features preserves the "affinity" (pairwise pixel relationships) of the original content. This mathematical property ensures stable video results without the need for expensive temporal constraints like optical flow. In user studies, the proposed method was preferred 81.8% of the time for video stability. Additionally, the combination of the linear transform and the SPN module allows for color transfer that respects object boundaries far better than traditional deep style transfer methods.

Conclusion

The Learning Linear Transformation framework provides a highly efficient and versatile solution for universal style transfer. By replacing SVD with learnable modules, the authors achieve unprecedented speeds and improved temporal stability. While shallower encoders are preferred for video and photo-realism to preserve spatial detail, deeper encoders remain effective for abstract artistic styles. Future work may extend this learnable linear framework to other image-to-image translation tasks where content structure preservation is critical.

Summary updated

BibTeX
@inproceedings{li2019learning,
  author = {Xueting Li and Sifei Liu and Jan Kautz and Ming-Hsuan Yang},
  title = {{Learning Linear Transformations for Fast Image and Video Style Transfer}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2019},
  doi = {10.1109/cvpr.2019.00393},
}
Figure