Skip to content

tjhd408/AIPainting

 
 

Repository files navigation

AI Painting

Introduction

This repository contains a pyCaffe-based implementation of "A Neural Algorithm of Artistic Style" by L. Gatys, A. Ecker, and M. Bethge, which presents a method for transferring the artistic style of one input image onto another. You can read the paper here: http://arxiv.org/abs/1508.06576.

Neural net operations are handled by Caffe, while loss minimization and other miscellaneous matrix operations are performed using numpy and scipy. L-BFGS is used for minimization.

Requirements

  • Python >= 2.7
  • Caffe == latest
  • CUDA >= 7.0 (highly recommended)

TODOs

  • Verify model_WEIGHTS is working as expected
  • Add progress bar for minimize call

Download

To run the code, you must have Caffe-Windows pyCaffe installed. Detailed installation instructions for Caffe can be found here.

Follow the UI instruction, choose you style image, original image and convnet model_name. Here, <model_name> must be one of caffenet, googlenet, or vgg.

The protobufs which come with the vanilla Caffe install aren't quite compatible with this code - working ones have already been added to this repository as a result of this.

This will grab the convnet models from the links provided in the Caffe Model Zoo.

Or you can also download all packaged models from here, and replace the .\models folder;

After all of config above, just click Train botton and have fun. All results were generated in around two minutes on an NVidia GeForce Quadro K2200 GPU running the GoogleNet model and 30 minutes with VGG model.

Sample

You are able to visit more examples in .\outputs.

About

An implementation of "A Neural Algorithm of Artistic Style"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%