This project is intended to be the course final project for Columbia University GR5242 Advanced Machine Learning.
All copyrights reserved by author: Tian Gao (CU UNI: tg2585)
project/
|---- input/
| |---- content/
| | |---- content.jpg
| |---- style/
| | |---- style.jpg
|---- output/
| |---- output.jpg
|
|---- style_transfer.py
|---- neural_network.py
|---- visual_geometry_group.py
|
|---- utils.py
|---- constants.py
|---- settings.py
|---- logger.py
|
|---- imagenet-vgg-verydeep-19.mat
|---- requirements.txt
This directory structure only shows directories and files that are necessary to run the code and generate certain outputs.
This repository also includes a report
folder which contains the full project report (source files, illustrations and PDF), which is exclusively for Columbia University GR5242. All copyrights reserved.
-
Construct your folder exactly as of the structure above; put the content picture (the one to be transfered) in
content
folder and put the style picture (the one that provides with the artistic style) instyle
folder -
Make sure you have the pre-trained neural network data from VGG
-
This project runs with Python 3.6. Install dependencies with
pip install -r requirements.txt
and then run the following command
python style_transfer.py --content content.jpg --style style.jpg --output output.jpg
Change
*.jpg
in the command input to match your file names
This project is inspired by the paper on style transfer.
Thanks to the authors of the paper, who had such interesting ideas and inspired this work.