Predict handwritten digits using a trained deep learning model and an interactive drawing canvas built with Tkinter.
This project demonstrates a simple yet effective way to train a digit recognition model on the MNIST dataset and use it in a graphical interface for real-time predictions.
- π― Train your own model with
model.py - π¨ Draw digits and predict them live with
drawingPredict.py
- π§ Trains a deep learning model using TensorFlow/Keras
- ποΈ Interactive canvas using Tkinter
- πΎ Saves and loads trained model automatically
- π Real-time digit recognition after drawing
| Tool | Purpose |
|---|---|
| Python | Programming Language |
| TensorFlow/Keras | Model Training |
| Tkinter | GUI Drawing Canvas |
| NumPy & PIL | Image Processing |
| MNIST Dataset | Training Dataset |
git clone https://github.com/vaishnavdounde65/MNIST-Number-Prediction.git
cd mnist-number-predictorpip install PIL numpy tensorflow tkinter
Note: Make sure Python β₯ 3.6 is installed.
Run the script to train and save the model:
python model.py
Trains on the MNIST dataset
Saves the model as mnist_model.h5
Use the drawing interface to draw digits and predict:
python drawingPredict.py
A Tkinter window will open
Draw a digit with your mouse
Click Predict to see the modelβs guess!
βββ model.py # Train and save the model
βββ drawingPredict.py # GUI for drawing and predicting
βββ mnist_model.h5 # Saved model (after training)
βββ README.md # Project overview
MNIST Dataset - Yann LeCun
TensorFlow/Keras
Tkinter GUI Library
Vaishnav Dounde π vaishnav.site
If you found this project useful, feel free to β the repo and share it!
