Skip to content

Handwritten digit recognition using a deep learning model trained on the MNIST dataset. Includes a Tkinter-based canvas where you can draw digits and get real-time predictions.

Notifications You must be signed in to change notification settings

vaishnavxd/MNIST-Number-Prediction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”’ MNIST Number Prediction

Predict handwritten digits using a trained deep learning model and an interactive drawing canvas built with Tkinter.


πŸ“Œ Project Overview

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

✨ Features

  • 🧠 Trains a deep learning model using TensorFlow/Keras
  • πŸ–ŒοΈ Interactive canvas using Tkinter
  • πŸ’Ύ Saves and loads trained model automatically
  • πŸ” Real-time digit recognition after drawing

πŸ› οΈ Tech Stack

Tool Purpose
Python Programming Language
TensorFlow/Keras Model Training
Tkinter GUI Drawing Canvas
NumPy & PIL Image Processing
MNIST Dataset Training Dataset

πŸš€ Getting Started

1️⃣ Clone the Repository

git clone https://github.com/vaishnavdounde65/MNIST-Number-Prediction.git
cd mnist-number-predictor

2️⃣ Install Dependencies

pip install PIL numpy tensorflow tkinter

Note: Make sure Python β‰₯ 3.6 is installed.

🧠 Train the Model

Run the script to train and save the model:

python model.py

Trains on the MNIST dataset

Saves the model as mnist_model.h5

πŸ–ΌοΈ Predict with Drawing Interface

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!

πŸ“ File Structure

β”œβ”€β”€ 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

πŸ“Έ Demo

Watch the video

πŸ™Œ Acknowledgements

MNIST Dataset - Yann LeCun

TensorFlow/Keras

Tkinter GUI Library

πŸ“¬ Contact

Vaishnav Dounde 🌐 vaishnav.site

⭐ Star This Repository

If you found this project useful, feel free to ⭐ the repo and share it!

About

Handwritten digit recognition using a deep learning model trained on the MNIST dataset. Includes a Tkinter-based canvas where you can draw digits and get real-time predictions.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages