This project is an implementation of the paper infoGAN using Pytorch Lightning.
git clone https://github.com/mohith-sakthivel/infogan-pytorch.git infogan_pl
cd infogan_pl
conda env create -f environment.yml
conda activate infogan_pl
To train the model on MNIST dataset , use
python -m infogan.infogan_module --datadir <dir> --max_epochs <max_epochs>
datadir - Directory to log data
max_epochs - Maximum number of training epochs
InfoGAN can learn meaningul disentangled features in an unsupervised fashion. The following figures illustrate the high level image features captured by the latent factors when trained on the MNIST dataset. The latent code used has a variable sampled from a uniform categorical distribution with 10 classes and 2 independent gaussian variables.
- The follwing figure show the variation in the generated images with each class of the categorical distribution.
- The categorical latents captures the 10 digit classes
- The follwing figures show the variation in the generated images when the a single gaussian variable is gradually changed from -5 to +5.
- The first gaussian latent code learns to capture the thickness of the text
- The second gaussian latent code captures the orientation (or) slant of the digit
- Add other datasets
- Implement Wasserstein loss with spectral normalization
- X Chen, Y Duan, R Houthooft, J Schulman, I Sutskever, P Abbeel - InfoGAN: Interpretable Representation Learning by Information Maximizing Generative Adversarial Nets, NeurIPS 2016. (paper)