Home

Awesome

Triple Generative Adversarial Nets (Triple-GAN)

Chongxuan Li, Kun Xu, Jun Zhu and Bo Zhang

Code for reproducing most of the results in the paper. Triple-GAN: a unified GAN model for classification and class-conditional generation in semi-supervised learning.

Warning: the code is still under development.

Triple-GAN-V2 and code in Pytorch!

We propose Triple-GAN-V2 built upon mean teacher classifier and projection discriminator with spectral norm and implement Triple-GAN in Pytorch. See the source code at https://github.com/taufikxu/Triple-GAN

Envoronment settings and libs we used in our experiments

This project is tested under the following environment setting.

Python Numpy Scipy Theano Lasagne(version 0.2.dev1) Parmesan

Thank the authors of these libs. We also thank the authors of Improved-GAN and Temporal Ensemble for providing their code. Our code is widely adapted from their repositories.

Results

Triple-GAN can achieve excellent classification results on MNIST, SVHN and CIFAR10 datasets, see the paper for a comparison with the previous state-of-the-art. See generated images as follows:

Comparing Triple-GAN (right) with GAN trained with feature matching (left)

<img src="https://github.com/zhenxuan00/triple-gan/blob/master/images/mnist_fm.png" width="320"> <img src="https://github.com/zhenxuan00/triple-gan/blob/master/images/mnist_random.png" width="320">

Generating images in four specific classes (airplane, automobile, bird, horse)

<img src="https://github.com/zhenxuan00/triple-gan/blob/master/images/class-0.png" width="320"> <img src="https://github.com/zhenxuan00/triple-gan/blob/master/images/class-1.png" width="320"> <img src="https://github.com/zhenxuan00/triple-gan/blob/master/images/class-2.png" width="320"> <img src="https://github.com/zhenxuan00/triple-gan/blob/master/images/class-7.png" width="320">

Disentangling styles from classes (left: data, right: Triple-GAN)

<img src="https://github.com/zhenxuan00/triple-gan/blob/master/images/svhn_data.png" width="320"> <img src="https://github.com/zhenxuan00/triple-gan/blob/master/images/svhn_share_z.png" width="320">

Class-conditional linear interpolation on latent space

<img src="https://github.com/zhenxuan00/triple-gan/blob/master/images/svhn_linear.png" width="640">