Abstract
Given a random pair of images, an arbitrary style transfer method extracts the feel from the reference image to synthesize an output based on the look of the other content image. Recent arbitrary style transfer methods transfer second order statistics from reference image onto content image via a multiplication between content image features and a transformation matrix, which is computed from features with a pre-determined algorithm. These algorithms either require computationally expensive operations, or fail to model the feature covariance and produce artifacts in synthesized images. Generalized from these methods, in this work, we derive the form of transformation matrix theoretically and present an arbitrary style transfer approach that learns the transformation matrix with a feed-forward network. Our algorithm is highly efficient yet allows a flexible combination of multi-level styles while preserving content affinity during style transfer process. We demonstrate the effectiveness of our approach on four tasks: artistic style transfer, video and photo-realistic style transfer as well as domain adaptation, including comparisons with the state-of-the-art methods.
Introduction
Style transfer aims to blend the stylistic elements of a reference image with the structural content of a target image. Traditional methods have historically faced a trade-off between speed and quality. Early iterative optimization approaches were slow, while subsequent "universal" methods like AdaIN and WCT introduced new limitations. AdaIN is fast but only matches first-order statistics (mean and variance), often failing to capture complex textures. WCT matches full covariance for higher quality but relies on Singular Value Decomposition (SVD), which is computationally expensive and difficult to accelerate on GPUs. This paper addresses the need for a method that achieves the quality of covariance matching at the speed of feed-forward networks, while avoiding the structural distortions common in neural style transfer.
Methods
The proposed framework models style transfer as a linear transformation between content features and a learned transformation matrix $T$.
- Theoretical Foundation: The authors prove that a linear transformation can minimize style reconstruction loss by aligning feature covariances. They derive the optimal form of $T$ based on the covariance of content and style features.
- Transformation Learning Module: Instead of calculating $T$ via SVD, the system uses two lightweight CNNs to learn the mapping from covariance matrices directly to the transformation matrix.
- Efficiency via Factorization: To manage high-dimensional features, the module factorizes the computation, compressing features to a lower dimension before computing the transformation and subsequently uncompressing them.
- Architecture: The model utilizes a pre-trained VGG-19 as a fixed encoder and a symmetric trained decoder to reconstruct the final stylized image.
Results and Discussion
The model was trained using MS-COCO for content and WikiArt for style. It was evaluated across artistic transfer, video consistency, photo-realism, and domain adaptation.
Artistic Style Transfer
The method achieves high-quality artistic results that match complex textures without the "melting" artifacts seen in simpler methods. By using the covariance matrix as input, the network remains agnostic to resolution and aspect ratio.
Performance and Stability
- Speed: The method reaches approximately 140 FPS for $256 \times 256$ images, significantly outperforming WCT (~1 FPS) and matching the speed of AdaIN.
- Affinity Preservation: Because the transformation is linear, it naturally preserves the pairwise relationships between pixels (feature affinity). This leads to superior temporal consistency in video tasks and sharper edges in photo-realistic transfers.
Domain Adaptation
The framework was applied to bridge the gap between synthetic game data (GTA) and real-world street scenes (Cityscapes). By aligning the feature statistics of the synthetic data to the real-world domain, the authors improved the Mean Intersection over Union (mIoU) for semantic segmentation tasks.
Conclusion
By replacing algorithmic matrix decomposition with a learned linear transformation, this approach provides a highly efficient and flexible solution for arbitrary style transfer. While the method is constrained by the expressiveness of the underlying VGG encoder and the linear nature of the transformation—which may struggle with extreme geometric deformations—it sets a new standard for speed and structural integrity in universal style transfer tasks.
Summary updated