Skip to content
The implementation of Temporal Generative Adversarial Nets with Singular Value Clipping
Branch: master
Clone or download
Latest commit 53fde1b Oct 6, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
configs first commit Oct 5, 2017
datasets first commit Oct 5, 2017
docs Merge pull request #2 from pfnet-research/mattya-patch-1 Oct 5, 2017
evaluation first commit Oct 5, 2017
models first commit Oct 5, 2017
updaters first commit Oct 5, 2017
.gitignore first commit Oct 5, 2017
LICENSE.md Add LICENSE.md Oct 6, 2017
README.md Merge pull request #3 from mitmul/add-gif Oct 6, 2017
infer.py first commit Oct 5, 2017
make_ucf101.py first commit Oct 5, 2017
train.py first commit Oct 5, 2017
visualizer.py first commit Oct 5, 2017

README.md

Temporal Generative Adversarial Nets

This repository contains a collection of scripts used in the experiments of Temporal Generative Adversarial Nets with Singular Value Clipping.

Disclaimer: PFN provides no warranty or support for this implementation. Use it at your own risk. See license for details.

Results

Requirements

These scripts require the following python libraries.

  • Chainer 2.0.0+
  • h5py
  • numpy
  • pandas
  • PIL
  • PyYAML
  • matplotlib

Note that they also require ffmpeg to produce a video from a set of images.

Usage

Datasets

In order to run our scripts, you need to prepare MovingMNIST and UCF-101 datasets as follows.

MovingMNIST

  1. Download mnist_test_seq.npy from here.
  2. Put it on path-to-tgans/data/mnist_test_seq.npy.

UCF-101

There are two ways to create an UCF-101 dataset for this script.

  1. Transforms all the videos in the UCF-101 dataset to the images.
  2. Resizes these images to the appropriate resolution, and concatenate them into as single hdf5 format represented as (time, channel, rows, cols). In this transformation we used make_ucf101.py in this repository. Note that this script also produces a config file that describes videos and these corresponding label information.
  3. puts them on path-to-tgans/data.

Another way is to simply download these files; please download them from this url, and put them on the same directory.

Training

TGAN with WGAN and Singular Value Clipping

python train.py --config_path configs/moving_mnist/mnist_wgan_svd_zdim-100_no-beta-all_init-uniform-all.yml --gpu 0
python train.py --config_path configs/ucf101/ucf101_wgan_svd_zdim-100_no-beta.yml --gpu 0

TGAN (WGAN and weight clipping)

python train.py --config_path configs/moving_mnist/mnist_wgan_clip_zdim-100_no-beta-all_init-uniform-all.yml --gpu 0
python train.py --config_path configs/ucf101/ucf101_wgan_clip_zdim-100_no-beta.yml --gpu 0

TGAN (vanilla GAN)

python train.py --config_path configs/ucf101/ucf101_vanilla_zdim-100_no-beta.yml --gpu 0

Citation

Please cite the paper if you are interested in:

@inproceedings{TGAN2017,
    author = {Saito, Masaki and Matsumoto, Eiichi and Saito, Shunta},
    title = {Temporal Generative Adversarial Nets with Singular Value Clipping},
    booktitle = {ICCV},
    year = {2017},
}

License

MIT License. Please see the LICENSE file for details.

You can’t perform that action at this time.