A complete end-to-end system for classifying handwritten digits using deep learning, featuring a web-based interface and REST API.
This project implements a convolutional neural network (CNN) trained on the MNIST dataset to recognize handwritten digits (0-9). The system includes:
- A Keras/TensorFlow deep learning model
- Flask-based REST API
- Interactive web interface
- Model training/evaluation scripts
- Preprocessing pipeline
Achieves 97.5%+ accuracy on test data while maintaining real-time prediction capabilities.
- Model Training Pipeline
- Data Preprocessing Utilities
- REST API Endpoints
- Web Interface with Canvas Drawing
- Error Handling and Input Validation
- Real-time digit prediction
- Interactive drawing canvas
- Mobile-responsive design
- Clear/reset functionality
- Prediction confidence display
- Drag-and-drop image support
- Python 3.8+
- pip package manager
git clone https://github.com/zain-ul-abideen-5036/handwritten-digit-classifier.git
cd handwritten-digit-classifierpip install -r requirements.txt
- Run the Jupyter notebook:
jupyter notebook notebooks/HandwrittenDigitClassification.ipnyb
- Execute all cells to:
- Load and visualize data.
- Train the model.
- Generate plots.
python app.pyAccess the web interface at http://localhost:5000
handwritten-digit-classifier/
├── app.py - Flask application entry point
├── HandwrittenDigitClassification.ipnyb - Model training script
├── mnist_model.h5 - Pretrained model weights
├── requirements.txt - Dependency list
├── README.md - Project documentation
│
└── templates/ - Frontend templates
└── index.html - Main interface
For questions or feedback, contact: abideen5036@gmail.com