Home

Awesome

This is the code for the paper

Learning to Warp for Style Transfer

Project Page | Paper | Poster | Video

<p align='center'> <img src='images/teaser.jpg' height="140px"> </ p>

Our method performs non-parametric warping to match artistic geometric style. The above shows content, style (geometry+texture), and output images for a Picasso style transfer (left) and a Salvaor Dali style transfer (right).

https://user-images.githubusercontent.com/58788896/124906358-e30dd380-dfde-11eb-99b2-b7b640a6a8d9.mov

If you find this code useful for your research, please cite

@InProceedings{Liu21LWST, 
  author={Xiao-Chang Liu and Yong-Liang Yang and Peter Hall},
  title={Learning to Warp for Style Transfer},
  booktitle={IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
  year={2021}
}

Preresquisites

Dependencies:

Pre-trained Models:

cd geometric_warping
mkdir model
cd texture_rendering
python models/download_model.py

Usage

1. Run geometric style transfer to warp the content image:

cd geometric_warping
run geo_warping.m [--STYLE_IMAGE] [--CONTENT_IMAGE]

After warping, empty background regions (if appear) are inpainted with pixels nearby.

2. Run texture style transfer to render the warped image:

cd texture_rendering
run multi_scale_st.sh [--STYLE_IMAGE] [--CONTENT_IMAGE] [--STYLE_WEIGHT]