Data-Efficient GAN Training

0
709

To begin with, what are GANs? Generative adversarial networks (GANs) are algorithmic architectures that make use of mainly two neural networks, pitting one against the other to generate new, synthetic instances of data that can pass for real data. They are widely used for image generation, video generation, and voice generation.

The Beginning

GANs were first introduced in a paper by Ian Goodfellow and other researchers at the University of Montreal, in 2014. GANs’ potential for both good and evil is huge, as they can learn to mimic any distribution of data. GANs can be taught to create worlds that are extremely similar to our own in almost all domains: images, music, speech, prose. They are robot artists and in a sense poignant.

Training a GAN model requires a humungous collection of the annotated dataset (FFHQ dataset, Imagenet Dataset), and making these large-scale datasets can take ages – months or even years. Using less data for training GAN models is the pressing need today, but training with fewer data points degrades accuracy. To overcome this issue, researchers have developed the technology of ‘data augmentation’ by which the data sample can be increased considerably without collecting new data points. The most common data augmentation techniques are cropping, flipping, scaling, color jittering, and region masking.

Application

When these transformations are applied only to real images, the generator tries to match the distribution of the augmented images hence resulting in a distribution shift. If at all these transformations are applied both to real and output images while training, it can lead to an unbalanced optimization. For stabilizing this situation researchers of various universities and institutions have developed an advanced technique called ‘Differentiable Augmentation for Data-Efficient GAN Training’.

Training


Differentiable Augmentation (DiffAugment) is a straightforward method that applies the same Differentiable augmentation to real and generated images indiscriminately during the training of GAN.


-Datasets used for Experiments
-ImageNet
-FFHQ and LSUN-Cat
-CIFAR-10 and CIFAR-100

Steps for training GANs:

  1. Requirements and Installation for Differentiable Augmentation
  2. Train the model
  3. Train your model
  4. Differentiable Augmentation Demo using Pre-Trained Model
    4.1 Clone the repositories and then install the requirements.
    4.2 Import all the required libraries and packages.
    4.3 Helper functions
    4.4 Load the data and visualize it

It is advisable to load the pre-trained model for baseline style GAN and generate the output by passing it to the helper functions as discussed above. Differentiable Augmentation can generate high-quality images with a limited amount of data and hence can offer an excellent prelude to the further immense possibilities in this field.

Follow and connect with us on FacebookLinkedin & Twitter.