human-pokemon-cycleGAN

This is an attempt to create a cycleGAN that converts images of humans into pokemon and vice-versa.

Project website: https://abhishek-choudharys.github.io/human-pokemon-cycleGAN.


Running Instructions:

To run the code on Google Colaboratory, type in the following commands:

!git clone https://github.com/abhishek-choudharys/human-pokemon-cycleGAN
cd human-pokemon-cycleGAN
run resize.py
run convertToRGB.py
run cycleGAN.py

This will begin training of the image-to-image translator using a batch size of 8 images, and a step size of 20. The default number of epochs have been set to 50.
Unfortunately, due to lack of a powerful GPU, I’ve not been able to finish training the cycleGAN to acquire results.

Note: The implementation is based on Tensorflow 2.2.0 and it is required to run the code.


CycleGAN

Cycle consistent Generative Adversarial Network, or simply CycleGAN, involves automatic image to image translations without the need for paired training data. It accomplishes this by using two generators and discriminators, trained in an unsupervised manner using images from two different domains across which image translation is needed. It is an extension of the GAN architecture that involves the simultaneous training of two generator models and two discriminator models.

While most techniques require data collected as translated pairs of instances from both domains, which is quite hard to obtain, cycleGAN is able to use unpaired images from both domains to achieve quality translation results.

It is a simple, yet powerful, technique which manages to achieve visually impressive results on a wide range of application domains. Some recently implemented applications include the translation of horses and zebras, changing images of day to night, etc.

Dataset

The data for training the cycleGAN has been acquired from https://github.com/KristofferLM96/GAN-human-pokemon.

Number of human images: 500
Number of pokemon images: 10118

The images are resized to 256x256 and then converted to RGB format by ensuring there is no alpha channel (RGBA). Next, they are stored as .jpg images for faster and efficient use.

The following commands are run for the above tasks:

run resize.py
run convertToRGB.py

Project website: https://abhishek-choudharys.github.io/human-pokemon-cycleGAN.