This project uses a conditional GAN to convert grayscale images into colour images. The generator was fed a grayscale image and was tasked to produce the output in the LAB format. The discriminator was fed a concatenation of the grayscale image and its LAB counterpart, and was tasked to recognise the true images from synthetically generated ones. The architecture of the GAN follows that of the U-Net mode.
The test image shown above was resized to an image of size 32x32, and fed to the input of the generator.
The output of the GAN is as shown above
Python 2
Numpy
Keras
Tensorflow
Scikit-image
-
Clone the repo
-
Make sure relevant packages are installed
-
cd src/
-
Run "python gan.py" to train the GAN. The discriminator and generator models will be saved.
-
Run "python test.py" to test the generator