CoolFace
Apppublic

Brianlimsun/digit-recognition-app

sourceHugging Facemitupdated 1y agoView on Hugging Face
0likes
App README

๐ŸŽฏ 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

  1. 1.Draw a digit: Use your mouse or finger to draw a digit (0-9) on the canvas
  2. 2.Click Predict: Press the "๐Ÿ”ฎ Predict Digit" button
  3. 3.View Results: See the predicted digit and confidence score
  4. 4.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

  1. 1.Fork the repository
  2. 2.Create a feature branch
  3. 3.Make your changes
  4. 4.Test thoroughly
  5. 5.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