Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Style Transfer (Neural Style)

Tensorflow implementation of Image Style Transfer (Neural Style)

Preferred Environments

  • OS : Windows 10 or Ubuntu 14.04 ~
  • GPU : ~
  • Library : TF 1.x with CUDA ~ + CuDNN ~
  • Python 3.x

Prerequisites

  • Python 3.x
  • Tensorflow 1.x
  • Scipy
  • Pillow
  • Internet :) (for downloading VGG19 pre-trained model)

Usage

$ python style_transfer.py --content <content image> --style <style image> ...

Example : python style_transfer.py --content content/deadpool.jpg --style style/guernica.jpg

Arguments

Required

  • --content : file path of a content image, default : contents/deadpool.jpg
  • --style : file path of a style image, default : styles/guernica.jpg

Optional

  • --content_w : weight of content loss, default : 0.05
  • --style_w : weight of style loss, default : 0.02
  • --image_width : file path of a content image, default : 333
  • --image_height : file path of a style image, default : 250
  • --train_steps : total training epochs, default : 500

Repo Tree

│
├── checkpoints       (model checkpoint)
│    ├── checkpoint
│    ├── ...
│    └── xxx.ckpt
├── contents          (content images)
│    ├── deadpool.jpg
│    └── ...
├── styles            (style images)
│    ├── guernica.jpg
│    └── ...
├── outputs           (results of style-transfer)
│    ├── deadpool_guernica_xxx.jpg
│    └── ...
├── graphs            (tensorboard)
│    └── ...
├── utils.py          (image utils & download pre-trained model)
├── vgg19.py          (VGG19 model)
└── style_transfer.py (style transfer)

Sample results

DeadPool with guernica & monet & vangogh (333 x 250)

conetent\style guernica monet vangogh
Generated Image Generated Image Generated Image Generated Image

Stata with wave & udnie (1024 x 679)

conetent\style wave udnie
Generated Image Generated Image Generated Image

Author

HyeongChan Kim / (@kozistr, @zer0day)

About

style-transfer with tensorflow

Topics

Resources

License

Releases

No releases published

Packages

No packages published

Languages