NOTE: TO BE UPDATED
Torch implementation of the papers Universal Style Transfer and A Closed-form Solution to Photorealistic Image Stylization
This is an unofficial implementation. The original implementation of Universal Style Transfer and A Closed-form Solution to Photorealistic Image Stylization are there <-
- Download the decoders from the directories
python3 run_wct.py --x 4 --style <path to style> --content <path to content> --output <output file name> --decoder decoder_1/dec_1849.pkl,decoder_2/dec_1849.pkl,decoder_3/dec_1849.pkl,decoder_4/dec_1849.pkl --smooth True
- Get the 2017 MS COCO train and validation datasets and unzip them
- Download PyTorch VGG16 model
wget https://download.pytorch.org/models/vgg16-397923af.pth
- For every layer(x = 1 to 4) train the decoder. It is recommended to run training twice with starting lr 0.001 and then 0.0001
python3 --x <layer number> --batch_size <64> --decoder <saved checkpoint if any> --optimizer <optimized checkpoint if any>
Note: all decoders & optimizers are saved in the dirdecoder_<x>
Clockwise from top left: image, style, whitening+coloring, whitening+coloring+smoothing
- Make training easier
- Make running easier