Flask web app for handwritten digit recognition using a CNN trained on MNIST, supporting image uploads and displaying prediction probabilities.
Upload handwritten digit images (JPG, PNG, etc.)
Processes the image using PIL and NumPy
Predicts the digit using a .keras model trained on MNIST
Displays top-10 class probabilities
Lightweight Flask backend with HTML frontend
Saves uploaded images in a dedicated /uploads folder (outside /static)
• Works best with clear handwritten digits
• Currently supports single-digit recognition only (0–9)
• Accuracy may decrease for noisy or distorted images
• No multi-user or persistent storage support
• Large image uploads may increase processing time
• Model trained only on the MNIST dataset
• Multi-digit recognition support
• Real-time canvas drawing interface
• Higher-accuracy CNN architectures
• Mobile-friendly UI enhancements
• User history and prediction logs
• Cloud deployment with scalable inference
• Support for custom dataset training
• Explainable AI visualizations for predictions
User uploads handwritten digit image
Image resized to 28×28 grayscale
Pixel normalization using NumPy
CNN model processes image
Model predicts digit probabilities
Highest-confidence digit returned
Python 3.8+
Flask – Web framework
TensorFlow / Keras – Deep learning
Pillow (PIL) – Image preprocessing
NumPy – Array operations