https://github.com/muhammadshavaiz/gan-digit-generator
This PyTorch-based GAN generates MNIST-like handwritten digits. It features a generator with transposed convolutions to create 28x28 images from noise and a convolutional discriminator to classify images as real or fake. The model trains adversarially using standard GAN loss to improve both generator and discriminator performance.
https://github.com/muhammadshavaiz/gan-digit-generator
convolutional-neural-networks gan mnist
Last synced: about 1 month ago
JSON representation
This PyTorch-based GAN generates MNIST-like handwritten digits. It features a generator with transposed convolutions to create 28x28 images from noise and a convolutional discriminator to classify images as real or fake. The model trains adversarially using standard GAN loss to improve both generator and discriminator performance.
- Host: GitHub
- URL: https://github.com/muhammadshavaiz/gan-digit-generator
- Owner: MuhammadShavaiz
- Created: 2024-05-19T18:38:03.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-31T13:52:25.000Z (almost 2 years ago)
- Last Synced: 2025-01-11T03:44:55.652Z (over 1 year ago)
- Topics: convolutional-neural-networks, gan, mnist
- Language: Jupyter Notebook
- Homepage:
- Size: 1.84 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GAN Digit Generator
This repository contains a Generative Adversarial Network (GAN) implementation using PyTorch to generate handwritten digit images similar to those in the MNIST dataset.
## Overview
The GAN model consists of a generator and a discriminator, trained adversarially. The generator creates digit images from random noise, while the discriminator attempts to distinguish between real MNIST digits and generated ones.
## Model Architecture
- **Generator:** A simple feedforward network with transposed convolutional layers to upscale random noise into a 28x28 grayscale digit image.
- **Discriminator:** A convolutional network that classifies 28x28 images as real or fake.
## Training
The training process involves iteratively updating the generator and discriminator using a standard GAN loss. The generator learns to produce increasingly realistic digits, while the discriminator improves its ability to differentiate between real and generated images.
## Results
After training, the generator can produce realistic-looking digit images, showcasing the effectiveness of the GAN model.
## Usage
To generate new digits, simply run the provided script and observe the generated outputs saved in the specified directory.