Skip to content

marounilabuni/diffusion-handwrite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŒ€ Diffusion-Based Character Image Generator

A PyTorch-based implementation of a Denoising Diffusion Probabilistic Model (DDPM) trained on the EMNIST dataset to generate handwritten characters from noise.

PyTorch License Status


πŸ“¦ Dataset

I used the EMNIST dataset to train a character generation model. It includes thousands of grayscale handwritten character images.

from torchvision.datasets import EMNIST

πŸš€ How to Run

  1. Clone the repo and navigate to the notebook:
git clone https://github.com/marounilabuni/diffusion-handwrite.git
cd diffusion-handwrite
  1. Install dependencies:
pip install torch torchvision matplotlib tqdm
  1. Open the notebook:
jupyter notebook diffusion_images_final.ipynb

πŸ§ͺ Sampling Preview

Once trained, the model can generate samples like these:

DDPM


πŸ“ Project Structure

β”œβ”€β”€ diffusion_images_final.ipynb   # Main training & sampling
└── README.md                      # Project overview

🧠 Future Work

  • βœ… Add DDIM sampling
  • πŸ”„ Add case-sensitive character generation (upper vs lower)
  • 🧬 Enable style-conditioned character generation to mimic specific handwriting

πŸ“„ License

This project is licensed under the Apache 2.0 License. See the LICENSE file for details.


Crafted with πŸ’» + β˜• by Maroun Ilabuni.

About

Diffusion-Based Character Image Generator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published