You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fake Handwritten digits generation using GAN over MNIST dataset
📌 Project Overview
This project implements a Generative Adversarial Network (GAN) from scratch in Keras & TensorFlow to generate realistic handwritten digits similar to the MNIST dataset.
A GAN consists of two neural networks trained together:
Generator: Learns to create synthetic digit images from random noise.
Discriminator: Learns to distinguish between real MNIST images and fake images created by the generator.
Both models compete, and over time the generator produces increasingly realistic digits.
🏗 GAN Architecture used here
Generator
Discriminator
⚙️ Features
Custom-built Generator and Discriminator networks using TensorFlow/Keras.
Training loop with tf.GradientTape.
Model checkpointing to resume or reuse training.
Visualization of generated digits per epoch.
Creation of a GIF animation showing generator progress.
Export of all generated images (epochs 1–100) into a single ZIP archive.
📊 Results (Generated Fake Images)
Input
Epoch 1
Epoch 2
Epoch 3
Epoch 9
Epoch 17
Epoch 25
Epoch 50
Epoch 75
Epoch 100
Example (Generated Digits Progress)
Real MNIST images:
📈 Possible Improvements
Implement FID (Fréchet Inception Distance) or Inception Score for evaluation.
Explore deeper architectures for generator and discriminator.
Extend GAN training to color image datasets (e.g., CIFAR-10).
Try Conditional GANs (cGANs) to generate specific digits.
About
This project implements a Generative Adversarial Network (GAN) from scratch in Keras & TensorFlow to generate realistic handwritten digits similar to the MNIST dataset.