Inspiration

I wanted to build something that combines machine learning and interactive web design, a project that works right from the get-go. The idea of drawing a number and instantly seeing an AI recognize it felt like the perfect combination of awe and realism.

What it does

Draw2Digit lets users draw digits (0–9) on a canvas and predicts them instantly using a custom PyTorch CNN.

How we built it

We trained a CNN on the MNIST dataset with PyTorch, built a Flask backend to serve predictions, and used HTML/CSS/JS with Pillow for the drawing interface and image preprocessing.

Challenges we ran into

Matching web-drawn images to MNIST format, fixing color inversion, and debugging Flask and virtual environment issues.

Accomplishments that we're proud of

Building a working AI web app from scratch with real-time predictions and a clean, simple UI.

What we learned

How to connect ML models to live web apps (using HTML), handle image data, and debug efficiently under pressure.

What's next for Draw2Digit

Add letter recognition (EMNIST), host it online, and possibly visualize CNN layers for education.

Built With

Share this project:

Updates