Giter Site home page Giter Site logo

sketchygan's Introduction

SketchyGAN: Towards Diverse and Realistic Sketch to Image Synthesis

Code for "SketchyGAN: Towards Diverse and Realistic Sketch to Image Synthesis".

Prerequisites

  • Python 3, NumPy, SciPy, OpenCV 3
  • Tensorflow(>=1.7.0)
  • A recent NVIDIA GPU

Preparations

  • The path to data files needs to be specified in input_pipeline.py. See below for detailed information on data files.
  • You need to download "Inception-V4 model", unzip it and put the checkpoint under inception_v4_model.

Dataset

Pre-built tfrecord files are available for out of the box training.

  • Files for the Sketchy Database can be found here.
  • Files for Augmented Sketchy(i.e. flickr images+edge maps), resized to 256x256 regardless of original aspect ratios, can be found here.

If you wish to get the image files:

  • The Sketchy Database can be found here.
  • Use extract_images.py under data_processing to extract images from tfrecord files. You need to specify input and output paths. The extracted images will be sorted by class names.
  • Please contact me if you need the original (not resized) Flickr images, since they are too large to upload to any online space.

Configurations

The model can be trained out of the box, by running main_single.py. But there are several places you can change configurations:

  • Commandline options in main_single.py
  • Some global options in config.py
  • Activation/Normalization functions in models_mru.py

Model

  • The model will be saved periodically. If you wish to resume, just use commandline switch resume_from.
  • If you wish to test the model, change mode from train to test and fill in resume_from.

Citation

If you use our work for your research, please cite our paper

@InProceedings{Chen_2018_CVPR,
author = {Chen, Wengling and Hays, James},
title = {SketchyGAN: Towards Diverse and Realistic Sketch to Image Synthesis},
booktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
month = {June},
year = {2018}
}

Credits

  • Incpetion-V4 and VGG16 code by Tensorflow Authors.
  • Tensorflow implementation of Spectral Normalization by minhnhat93
  • Improved WGAN

sketchygan's People

Contributors

wchen342 avatar

Watchers

James Cloos avatar

Forkers

wangdian215

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.