https://github.com/zahramh99/generative-ai-from-scratch
building a Generative AI model using Generative Adversarial Networks (GANs).
https://github.com/zahramh99/generative-ai-from-scratch
ai-projects deep-learning dl-from-scratch gan generative-adversarial-network generative-ai image-generation machine-learning neural-networks pytorch tensorflow unsupervised-learning
Last synced: about 2 months ago
JSON representation
building a Generative AI model using Generative Adversarial Networks (GANs).
- Host: GitHub
- URL: https://github.com/zahramh99/generative-ai-from-scratch
- Owner: zahramh99
- Created: 2025-04-08T21:36:31.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-08T21:39:59.000Z (about 1 year ago)
- Last Synced: 2025-04-10T03:40:32.695Z (about 1 year ago)
- Topics: ai-projects, deep-learning, dl-from-scratch, gan, generative-adversarial-network, generative-ai, image-generation, machine-learning, neural-networks, pytorch, tensorflow, unsupervised-learning
- Language: Python
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Generative AI Model From Scratch with Python
This project implements a Generative Adversarial Network (GAN) from scratch to generate handwritten digits using the MNIST dataset.
## Generative Adversarial Networks (GANs)
Generator: Generates new data samples.
Discriminator: Evaluates whether a given data sample is real (from the training data) or fake (generated by the generator).
The two networks are trained together in a zero-sum game: the generator tries to fool the discriminator, while the discriminator aims to accurately distinguish real from fake data.
A GAN consists of the following key components:
Noise Vector: A random input vector fed into the generator.
Generator: A neural network that transforms the noise vector into a data sample.
Discriminator: A neural network that classifies input data as real or fake.
## Project Structure
- `src/`: Contains the main implementation code
- `outputs/`: Stores generated images during training
- `notebooks/`: Contains exploratory analysis (if any)
## Requirements
- Python 3.6+
- Keras
- NumPy
- Matplotlib
## Installation
```bash
pip install -r requirements.txt
## Usage
To train the model:
python src/train.py
## Results
The model generates handwritten digits after training. Sample outputs are stored in the outputs/ directory.