Code for A Closed-form Solution to Universal Style Transfer (https://arxiv.org/abs/1906.00668) - ICCV2019
This work mathematically derives a closed-form solution to universal style transfer. It is based on the theory of optimal transport and is closed related to AdaIN and WCT. AdaIN ignores the correlation between channels and WCT does not minimize the content loss. We consider both of them. Details of the derivation can be found in the paper.
Link to AdaIN : https://github.com/xunhuang1995/AdaIN-style
Link to WCT : https://github.com/Yijunmaverick/UniversalStyleTransfer
-
Install Torch from http://torch.ch/
-
Download encoders, decoders from here and unzip it to models/
-
For single image usage, see demo.sh
-
For folder images usage, see demo_folder.sh
If you find this code useful in your research, please consider to cite the following paper:
@article{lu2019optimal,
title={a closed-form solution to universal style transfer},
author={Ming Lu, Hao Zhao, Anbang Yao, Yurong Chen, Feng Xu, Li Zhang},
journal={ICCV 2019},
year={2019}
}