Skip to content

ca1773130n/AdaIN-Caffe2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AdaIN-Caffe2

A Caffe2 implementation of the paper "Arbitrary Style Transfer in Real-time with Adaptive Instance Normalization".

Requirements

  • Python 3
  • Caffe2
  • numpy
  • skimage
  • scipy

Usage

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)

Examples

An example image stylized by la_muse.jpg with 1024 for both content and style rescaling resolution.

original_image stylized_image

Acknowledgement

Tested environment

  • Ubuntu 16.04
  • Anaconda Python 3.6

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages