Home

Awesome

Wasserstein GAN

This repository provides a Torch implementation of Wasserstein GAN as described by Arjovsky et. al. in their paper Wasserstein GAN.

Prerequisites

Please refer to the official Torch website to install Torch.

Usage

  1. Choose a dataset and create a folder with its name (ex: mkdir celebA; cd celebA). Inside this folder create another folder (images for example) containing your images.
    Note: You can download the celebA dataset on the celebA web page. Extract the images and run
DATA_ROOT=celebA th data/crop_celebA.lua
  1. Train the Wasserstein model
DATA_ROOT=<dataset_folder> name=<whatever_name_you_want> th main.lua

The networks are saved into the checkpoints/ directory with the name you gave.

  1. Generate images
net=<path_to_generator_network> name=<name_to_save_images> th generate.lua

Example:

net=checkpoints/generator.t7 name=myimages display=2929 th generate.lua

The generated images are saved in myimages.png.

Display images in a browser

If you want, install the display package (luarocks install display) and run

th -ldisplay.start <PORT_NUMBER> 0.0.0.0

to launch a server on the port you chose. You can access it in your browser with the url http://localhost:PORT_NUMBER.

To train your network or for completion add the variable display=<PORT_NUMBER> to the list of options.

Optional parameters

In your command line instructions you can specify several parameters (for example the display port number), here are some of them:

References