Style transfer is a neural network that allows you to take famous paintings, and recreate your own images in their styles! The network learns the underlying techniques of those paintings and figures out how to apply them on its own.

Available styles

How to use it

  1. Clone the git repository.
  2. The network has been trained on a few different styles and saved into checkpoint files, which will save you time training the network from scratch on these paintings.
  3. Assuming you have Anaconda installed, create an environment and activate it:
    conda create -n style-transfer python=3.5
    activate style-transfer
  4. Install the dependencies of this network; Python 3.5, TensorFlow library, Scipy, Pillow:
    conda install -c conda-forge tensorflow=0.12.1
    conda install scipy pillow
  5. Copy the checkpoints and the image you want to style into the style-transfer folder
  6. In your terminal, navigate to the fast-style-transfer folder and enter the following code to style your image:
    python evaluate.py --checkpoint ./rain_princess.ckpt --in-path <path_to_input_file> --out-path ./output_img.jpg

    A real example would be as follows:

    python evaluate.py --checkpoint ./rain_princess.ckpt --in-path C:\PyProjects\deep-learning\stytran\pic.jpg --out-path ./pic_output.jpg

 

Result