xch-liu / learning-warp-st

Learning to Warp for Style Transfer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This is the code for the paper

Learning to Warp for Style Transfer

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).

2021_Demo_Lowres.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:

  • Download the model for geometric warping
cd geometric_warping
mkdir model
  • Download the model for texture rendering
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]

About

Learning to Warp for Style Transfer


Languages

Language:MATLAB 62.8%Language:Python 34.5%Language:Shell 2.8%