Generate synthetic (βfakeβ) images using a Generative Adversarial Network (GAN).
This project trains a DCGAN to learn the distribution of a dataset and produce new, realistic-looking samples from random noise.
Note: These images are synthetic, created by the model β not copied from the dataset.
- β DCGAN training loop (Generator vs Discriminator)
- β Stabilization tricks (label smoothing, noise injection optional)
- β Saves generated image grids during training
- β Checkpoint saving + inference script
- Generator (G): takes random noise
zβ produces a fake image - Discriminator (D): receives an image β predicts real vs fake
- Training is adversarial: G tries to fool D, D tries to catch G
This repo is set up for:
- Fashion-MNIST (default, 28Γ28 grayscale)
You can switch to CIFAR-10 or custom datasets with minor changes.
Generator
- Dense β reshape β Conv2DTranspose blocks β output image (tanh)
Discriminator
- Conv2D blocks β flatten β sigmoid output (real/fake)
git clone <YOUR_REPO_URL>
cd <YOUR_REPO_NAME>