Optimization-based Neural Style Transfer

From Quantitative Analysis Software Courses
Revision as of 13:17, 24 July 2018 by Psuri8 (talk | contribs) (Neural Style Transfer implementation in Python using Keras)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

OVERVIEW This page provides instructions on how to set up and run an artistic style transfer program on your machines. The following implementation is based on the optimization method proposed by Gatys et al in 2015 ([1]).

SETUP Pre-requisites This program has been implemented in Python 2.7. The following libraries must be installed on your system to run it:

  • Numpy
  • Scipy
  • Keras
  • h5py
  • Tensorflow

Getting Started

  1. Download the following zip file for the code Template:File-DL to your preferred directory on your machine
  2. Open the Terminal from that directory and run the program using the following command:

    python NST.py path/to/content/image path/to/content/image path/to/style/image(s) path/to/generated/image

    One or more style images can be provided by seperating each path with a space. Example

    python NST.py images/inputs/content/Dipping-Sun.jpg images/inputs/style/the_scream.jpg images/inputs/style/wave_kanagawa.jpg Results/blue