Brianlimsun/digit-recognition-app
0
๐ฏ Digit Recognition App
A web application that recognizes hand-drawn digits (0-9) using a Convolutional Neural Network trained on the MNIST dataset.
โจ Features
- Interactive Drawing Canvas: Draw digits using mouse or touch
- Real-time Prediction: Get instant predictions with confidence scores
- Probability Visualization: See confidence levels for all 10 digits
- Responsive Design: Works on desktop and mobile devices
- Modern UI: Clean, intuitive interface with smooth animations
๐ ๏ธ Tech Stack
- Frontend: HTML5, CSS3, JavaScript (Vanilla)
- Backend: Python Flask API
- Machine Learning: TensorFlow/Keras with CNN model
- Dataset: MNIST (Modified National Institute of Standards and Technology)
๐ How to Use
- Draw a digit: Use your mouse or finger to draw a digit (0-9) on the canvas
- Click Predict: Press the "๐ฎ Predict Digit" button
- View Results: See the predicted digit and confidence score
- Clear Canvas: Use "๐๏ธ Clear Canvas" to start over
๐ง Model Architecture
The CNN model consists of:
- Input Layer: 28x28x1 grayscale images
- Convolutional Layers: 3 Conv2D layers with ReLU activation
- Pooling Layers: MaxPooling2D for dimensionality reduction
- Dense Layers: Fully connected layers with dropout
- Output Layer: Softmax activation for 10 digit classes
๐ฎ Model Performance
- Training Accuracy: ~99% on MNIST test set
- Inference Time: <100ms per prediction
- Model Size: ~2MB
๐ฑ Mobile Support
The app is fully responsive and supports touch drawing on mobile devices.
๐ค Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
๐ License
This project is open source and available under the MIT License.
๐ Acknowledgments
- MNIST dataset by Yann LeCun
- TensorFlow/Keras for the ML framework
- Flask for the web framework
