A Caffe2 implementation of the paper "Arbitrary Style Transfer in Real-time with Adaptive Instance Normalization".
- Python 3
- Caffe2
- numpy
- skimage
- scipy
python adain_caffe2.py <arguments>
- --vgg_init (-vi) : VGG-19 (normalized) Caffe2 init net PB file
- --vgg_predict (-vp) : VGG-19 (normalized) Caffe2 predict net PB file
- --decoder_init (-di) : Decoder Caffe2 init net PB file
- --decoder_predict (-dp) : Decoder Caffe2 predict net PB file
- --content (-c) : input content image (JPG/PNG)
- --content_size (-cs) <num_pixels> : resize resolution (short side) for the content image (default: 512)
- --style (-s) : input style image (JPG/PNG)
- --style_size (-ss) <num_pixels> : resize resolution (short side) for the style image (default: 512)
- --gpu (-g) : GPU device ID for CUDNN (default: -1, CPU)
An example image stylized by la_muse.jpg with 1024 for both content and style rescaling resolution.
Tested environment
- Ubuntu 16.04
- Anaconda Python 3.6