“GANs and the variations are the most interesting idea in the last 10 years in ML.”Yann Lecun
The potential of Generative Adversarial Networks (GANs) was already witnessed at the Sotheby’s auction, a couple of years ago when the painting titled Edmond de Belamy, from La Famille de Belamy was sold for a whopping $432,500, and it now hangs opposite the works of pop art geniuses like Andy Warhol.
The applications of GANs have made their presence felt in the esoteric trading floors, nuclear facilities and even the office of Presidents. The rise in its popularity indicates that its usage is only limited by the imagination of its users. In the era of APIs, it’s a no-brainer to not to build algorithms from scratch.
Here are a few libraries that can be used to experiment around with GANs:
Sign up for your weekly dose of what's up in emerging technology.
Tensorflow’s TF-GAN is a lightweight library for training and evaluating GANs. This library provides simple function calls that cover the majority of GAN use-cases to get a model up and running in just a few lines of code. It is built in a modular way to cover more exotic GAN designs as well.
Training in TF-GAN can be down as follows:
Download our Mobile App
- Specify the input to networks.
- Set up a generator and discriminator using a GANModel.
- Specify loss using a GANLoss.
- Create your train ops using a GANTrainOps.
- Run your train ops.
GAN Lab is an interactive visualisation tool for anyone to learn and experiment with GANs. With GAN Lab, one can interactively train GAN models for 2D data distributions and visualise their inner-workings
pygan is a Python library to implement GANs and its variants that include Conditional GANs, Adversarial Auto-Encoders (AAEs), and Energy-based Generative Adversarial Network (EBGAN).
Using this library one can design the Generative models based on the Statistical machine learning problems in relation to GANs. Conditional GANs, Adversarial Auto-Encoders (AAEs), and Energy-based Generative Adversarial Network (EBGAN) to practice algorithm design for semi-supervised learning.
pip install pygan
The torchgan package provides an easy to use API, which can be used to train popular GANs and its variants. This package is designed to facilitate easy and rapid generative adversarial model research.
VeGANs library can be used to easily train various existing GANs in PyTorch. This library is built for those who want to use existing GAN training techniques with their own generators/discriminators. Researchers can also use GAN base class for quicker implementation of new GAN training techniques.
Comparing GANs is difficult – mild differences in the implementations and evaluation methodologies can result in huge performance differences. Mimicry is a lightweight PyTorch library built to facilitate reproducibility of GAN research.
Mimicry addresses by providing the following:
- A framework for implementation of GANs without rewriting most of training boilerplate code, with support for GAN evaluation metrics.
- Standardised implementations of popular GANs that closely reproduce reported scores; Baseline scores of GANs trained and evaluated under the same conditions.
pip install torch-mimicry
StudioGAN is a Pytorch library used for implementation of representative GANs for conditional/unconditional image synthesis. This library is designed to help machine learning researchers to compare the new idea with other GANs in the same Pytorch environment.
Keras-GAN is a collection of Keras implementations of GANs. These models can be simplified versions of the ones ultimately described in the research papers.