This project implements a Pix2Pix GAN (Generative Adversarial Network) for image-to-image translation using the Keras framework.
Pix2Pix GAN is a conditional generative adversarial network designed for paired image-to-image translation tasks. The GAN consists of two main components:
- Generator: Transforms the input image into the desired output image.
- Discriminator: Distinguishes between real images and those generated by the Generator.
In this project, the model is implemented with the U-Net architecture for the Generator, which allows for high-quality image generation by using skip connections. This implementation is based on the architecture proposed by Isola et al. in their paper Image-to-Image Translation with Conditional Adversarial Networks, which introduced the Pix2Pix framework for image-to-image translation tasks.
The dataset used in this project is the Maps dataset, available here. This dataset contains pairs of satellite images and their corresponding Google Maps representations.
The architecture used in this project includes:
- Generator: A U-Net-based architecture with skip connections.
- Discriminator: A PatchGAN discriminator that classifies each patch in an image as real or fake.
The model architecture is implemented using the Keras Functional API, and the model structure is visualized using plotting functions.
The training of the model is implemented in the train_gan()
function. This function trains both the Discriminator and the Generator for a specified number of epochs and batch size. After each epoch, the function plots a random sample of image pairs from the dataset, along with the corresponding image generated by the Generator.
- Optimization: The model uses the Adam optimizer with tuned hyperparameters.