CAP-VSTNet: Content Affinity Preserved Versatile Style Transfer

Linfeng Wen, Chengying Gao, Changqing Zou

Abstract

CAP-VSTNet is a novel framework designed to address the "content affinity" challenge in style transfer—the preservation of sharp details and spatial relationships during the stylization of images and videos. By integrating a perfectly reversible residual network with a stable, Cholesky-based linear transformation, the proposed method achieves state-of-the-art performance in both photorealistic and artistic stylization. The architecture is efficient enough to support 4K resolution processing while ensuring temporal consistency in video applications.

The Challenge of Content Affinity

Traditional style transfer methods often struggle with two primary issues: the loss of photorealism and a lack of video consistency. When applying a style to a photograph, spatial relationships between pixels—referred to as "content affinity"—are frequently disrupted, resulting in unwanted blurriness or artifacts at semantic boundaries. In video contexts, this manifests as "flickering," where style characteristics shift inconsistently between frames.

Most existing approaches rely on pre-trained VGG encoders. While effective for classification, these encoders prioritize high-level semantic features over the fine-grained spatial data necessary for high-fidelity reconstruction.

Methodology: CAP-VSTNet

The CAP-VSTNet architecture departs from standard encoder-decoder models through three key innovations:

  1. Reversible Residual Network (RRB): By utilizing a reversible architecture, the model ensures that input content can be perfectly reconstructed from its features. This prevents the loss of structural information during the encoding phase.
  2. Channel Refinement (CR) Module: To manage the redundant information often accumulated in reversible networks, the authors introduced the CR-RRB module. This component cleanses feature maps by redistributing channel information into spatial patches, enhancing the effectiveness of the subsequent stylization.
  3. Unbiased Linear Transform (cWCT): Instead of the computationally intensive and potentially unstable Singular Value Decomposition (SVD) used in standard Whitening and Coloring Transforms (WCT), CAP-VSTNet employs Cholesky decomposition. This "cWCT" approach is faster, more numerically stable, and minimizes transformation-induced artifacts.

The model is trained using a multi-faceted loss function, including Matting Laplacian loss for edge preservation, Gram-based style loss, and Cycle Consistency loss to maintain the accuracy of the reversible operations.

Key Results and Performance

CAP-VSTNet demonstrates significant improvements over existing methods across several benchmarks, including MS COCO, WikiArt, and MPI Sintel.

Visual comparison of CAP-VSTNet against state-of-the-art methods (DSTN, PCA-KD) and its performance on photorealistic and artistic video stylization.
  • Quantitative Superiority: The model achieved an SSIM of 0.650, outperforming the next best method, PCA-KD (0.634), in structural preservation.
  • Efficiency: The cWCT transform is approximately 12 times faster than standard WCT (0.097s vs. 1.186s for 512x512 features).
  • Versatility and Resolution: The framework handles photorealistic images, artistic videos, and photorealistic videos with high fidelity. Its efficiency allows for seamless 4K style transfer, a task that typically exhausts the memory or detail-retention capabilities of VGG-based models.

Limitations and Future Directions

While CAP-VSTNet excels at structural preservation, it faces challenges with highly complex, high-frequency textures (e.g., the intricate details of a galaxy). Future research may explore whether larger-scale models can capture these textures without compromising the efficiency and stability inherent in the CAP-VSTNet architecture.

Summary updated

BibTeX
@inproceedings{wen2023cap,
  author = {Linfeng Wen and Chengying Gao and Changqing Zou},
  title = {{CAP-VSTNet: Content Affinity Preserved Versatile Style Transfer}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2023},
}
Figure