Generative Adversarial Network (GAN) generates synthetic images based on dataset. Then perform image super-resolution using a separate CNN-based model
Generator (G) Step:
Generate fake image.
Fool discriminator (i.e., get output close to 1).
Update generator.
Discriminator (D) Step:
Real image → Discriminator → should output 1.
Fake image → Discriminator → should output 0.
Loss is binary cross entropy for both real and fake.
Update discriminator using loss_real + loss_fake.
Super-Resolution Network
A simple CNN that:
Upscales 28×28 → 56×56.
Uses Conv2d, ReLU, Upsample, and final Tanh.
Summary
GAN - Train generator to create realistic dataset images.
Generator - Takes noise and produces fake images.
Discriminator - Distinguishes between real and fake images.
BCE Loss - Binary cross-entropy for discriminator and generator training.
Super-Resolution - A separate CNN model that enhances image resolution.
Normalization - Maps data to range [-1, 1] for Tanh compatibility.
Upsampling - Uses bilinear interpolation and conv layers to restore resolution.
View Github Code