dcgan-mnist-demo / README.md
ju4nppp's picture
Uploaded 3 files
a0ab06e verified
|
raw
history blame
1.38 kB

DCGAN MNIST Generator

This repository contains a Deep Convolutional GAN (DCGAN) trained on the MNIST dataset. The model generates handwritten-like digit images from random noise.

Model Architecture

The model implementation is based on the paper Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networks.

  • Generator architecture: 5 transposed convolutional layers with batch normalization
  • Latent space dimension: 100
  • Output: 64x64 grayscale images

Demo App

The included Gradio app allows you to generate new MNIST-like images using the pre-trained model.

Running Locally

  1. Install dependencies:
pip install -r requirements.txt
  1. Run the app:
python app.py

Features

  • Generate multiple images at once
  • Set a random seed for reproducible outputs
  • Visualize the generated images in a grid

Training Details

This model was trained for 25 epochs on the MNIST dataset using PyTorch. For optimal results, the model checkpoint from epoch 21 is used for inference, as it produced the most realistic images without mode collapse.

Acknowledgments

  • Original DCGAN implementation based on PyTorch examples
  • Training was tracked using Weights & Biases