Skip to content

Latest commit

 

History

History
90 lines (59 loc) · 2.44 KB

README.md

File metadata and controls

90 lines (59 loc) · 2.44 KB

GANGogh

Blog post

Requirements

  • OS: Windows or Linux

  • Python 3.5.6

    pyenv is recommended

  • Python dependencies

    pip install -r requirements.txt
  • Tensorflow with GPU support for v1.2.1 (macOS not supported)

    Tensorflow v1.2.1 requires CUDA 8 and cuDNN 5.1

    To test if Tensorflow GPU is correctly set up run:

    import tensorflow as tf
    tf.test.is_gpu_available()

Usage

1. Gather training data

We used training data from wikiart.org, but any training data will do.

You can download the training data from:

If both of those fail, consider using scrape_wiki.py as a last resort.

2. Prepare the training data

Adjust the variables ORIGINAL_IMAGES_PATH and RESIZED_IMAGES_PATH in settings.py accordingly.

Use resize_rename.py to create image data set of 64x64 pieces of art scraped from wikiart.org:

python misc/resize_rename_images.py

3. Modify files

Update the styles variable in wikiart_genre.py dictating the number of training images per genre. If using the training data set linked, above, use the following:

styles = {
  'abstract': 14999,
  'animal-painting': 1798,
  'cityscape': 6598,
  'figurative': 4500,
  'flower-painting': 1800,
  'genre-painting': 14997,
  'landscape': 15000,
  'marina': 1800,
  'mythological-painting': 2099,
  'nude-painting-nu': 3000,
  'portrait': 14999,
  'religious-painting': 8400,
  'still-life': 2996,
  'symbolic-painting': 2999
}

4. Make art!

Run gangogh.py

python gangogh.py

Credits

Code heavily inspired and built off of the improved wasserstein GAN training code available and found at igul222/improved_wgan_training