Handwritten Digit Recognition
Handwritten digit recognition with a drawing canvas, a CNN trained on MNIST (about 99 percent), folder recognition and a training screen. Python, TensorFlow, Tkinter.
- Price: ₹1,799
- Category: AI / ML
- Technology: Python, TensorFlow / Keras, CNN, MNIST, Tkinter, Pillow, SQLite
- Includes: Full source code
- Suitable for: BCA / B.Sc CS, MCA / M.Sc CS, B.E / B.Tech CSE & IT
Project overview
Reading handwritten digits is the classic first deep-learning project, and this application turns it into a finished product. Draw a digit with the mouse and the answer appears the moment you lift the pen, together with a probability chart and the 28 x 28 picture the network actually saw. A convolutional neural network (two convolution and pooling blocks, dropout, a dense layer) trained on the 60,000 MNIST pictures with random shifts, rotations and zooms reaches about 99 percent on the 10,000 test pictures. Pictures are prepared the way MNIST digits were made - cropped, scaled to a 20 x 20 box, centred by centre of mass - so mouse drawings and photographed digits work well, and dark ink on light paper is inverted automatically. The Upload screen reads picture files and includes 24 sample digits, the Batch screen recognises a whole folder and saves a CSV, the Train screen retrains the network with live curves, a confusion matrix and per-digit accuracy, and the History screen counts what was recognised. The trained model is included, so the project works the moment it is installed.
Modules
- Login: Admin login with a salted password hash; change the password from the side menu.
- Draw: Mouse drawing canvas; answer on pen lift; big digit, probability bars and the 28 x 28 picture the network saw.
- Upload: Open a picture file or one of 24 samples; dark-on-light pictures are inverted automatically.
- Batch: Recognise every picture in a folder and save the answers to CSV.
- Train: Retrain on MNIST (fast demo or full), live accuracy curve, confusion matrix, test accuracy and weakest digit.
- History: Every recognised digit with source and confidence; chart of digit counts; CSV export.
Requirements
- Python 3.11
- Internet once, to install the libraries (about 10 minutes, downloads about 500 MB)
- Windows 10 / 11
How to run this project
- Install Python 3.11 from python.org and tick "Add python.exe to PATH" during setup.
- Extract the zip and open the project folder (STUDENT_GUIDE.md explains every step in simple words).
- Double-click `1_INSTALL.bat` once and wait until it says [OK] (about 10 minutes, downloads about 500 MB; it downloads the libraries into a private .venv folder).
- Double-click `2_RUN.bat` to start the project. If it does not start, double-click `CHECK_SETUP.bat` and read what it says.
- Log in with admin / admin123.
- Open Batch, choose the 'samples' folder and click 'Recognise all and save CSV'. Open Train: show the accuracy, the confusion matrix and the weakest digit; set 1 epoch with 'Fast demo' to retrain (needs internet once for MNIST).