A PyTorch-based implementation of a Denoising Diffusion Probabilistic Model (DDPM) trained on the EMNIST dataset to generate handwritten characters from noise.
I used the EMNIST dataset to train a character generation model. It includes thousands of grayscale handwritten character images.
from torchvision.datasets import EMNIST- Clone the repo and navigate to the notebook:
git clone https://github.com/marounilabuni/diffusion-handwrite.git
cd diffusion-handwrite- Install dependencies:
pip install torch torchvision matplotlib tqdm- Open the notebook:
jupyter notebook diffusion_images_final.ipynbOnce trained, the model can generate samples like these:
βββ diffusion_images_final.ipynb # Main training & sampling
βββ README.md # Project overview
- β Add DDIM sampling
- π Add case-sensitive character generation (upper vs lower)
- 𧬠Enable style-conditioned character generation to mimic specific handwriting
This project is licensed under the Apache 2.0 License. See the LICENSE file for details.
Crafted with π» + β by Maroun Ilabuni.
