CCPL: Contrastive Coherence Preserving Loss for Versatile Style Transfer

Zijie Wu, Zhen Zhu, Junping Du, Xiang Bai
7/11/2022
145 citations
cs.CV

Official code: JarrentWu1031/CCPL (206 stars, Python, Apache-2.0, PyTorch, last commit 2024-02-17).

Abstract

In this paper, we aim to devise a universally versatile style transfer method capable of performing artistic, photo-realistic, and video style transfer jointly, without seeing videos during training. Previous single-frame methods assume a strong constraint on the whole image to maintain temporal consistency, which could be violated in many cases.

Show full abstract

Instead, we make a mild and reasonable assumption that global inconsistency is dominated by local inconsistencies and devise a generic Contrastive Coherence Preserving Loss (CCPL) applied to local patches. CCPL can preserve the coherence of the content source during style transfer without degrading stylization. Moreover, it owns a neighbor-regulating mechanism, resulting in a vast reduction of local distortions and considerable visual quality improvement. Aside from its superior performance on versatile style transfer, it can be easily extended to other tasks, such as image-to-image translation. Besides, to better fuse content and style features, we propose Simple Covariance Transformation (SCT) to effectively align second-order statistics of the content feature with the style feature. Experiments demonstrate the effectiveness of the resulting model for versatile style transfer, when armed with CCPL.

View on arXivView PDF

Code Implementations(1)

JarrentWu1031/CCPLOfficial100%
PyTorchApache-2.0

[ECCV 2022 Oral] Official Pytorch implementation of CCPL and SCTNet

20627Python, ShellJun 29, 20222 years agoApache-2.0
arbitrary-style-transferartistic-style-transfercontrastive-learningcontrastive-lossdeep-learning+9 more

Similar Papers

Cite this paper

@article{wu2022ccpl,
  title  = {CCPL: Contrastive Coherence Preserving Loss for Versatile Style Transfer},
  author = {Zijie Wu and Zhen Zhu and Junping Du and Xiang Bai},
  year   = {2022},
  eprint = {2207.04808},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2207.04808v4}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2207.04808.svg)](https://codeofpaper.com/paper/2207.04808)

Discussion