Skip to content

lewis-shearer/MNIST_Digit_Classification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ–οΈ Handwritten Digit Classifier

A TensorFlow-based Convolutional Neural Network (CNN) model that achieves 99% accuracy in handwritten digit classification. This project also includes interactive applications to test predictions using custom handwritten inputs or webcam data.

πŸš€ Features

CNN Architecture:

  • Convolutional layer with ReLU activation
  • MaxPooling layer
  • Convolutional layer with ReLU activation
  • MaxPooling layer
  • Flattening layer
  • 2 Fully-connected Dense layers

Interactive Tools:
- 'app.py': Opens a window for users to handwrite their own digits and see predictions in real-time.
- 'webcam.py': Uses the webcam to capture handwritten digits for prediction. (Currently under improvement)

πŸ› οΈ Technologies


- TensorFlow: For building and training the CNN model.
- OpenCV: For webcam data capture and image processing.

πŸ“˜ Usage

1. Get the CNN Model
Run the training notebook recreate the model:
- 'mnist.ipynb'
Or use the pre trained one:
- 'mnist.h5'

2. Handwriting Interface
Launch the handwriting window: python app.py Draw a digit in the window to see the model's prediction.

3. Webcam Digit Capture (Under Development)
Test the webcam interface: python webcam.py

  • The script will capture frames from your webcam and attempt to predict handwritten digits.
  • Note: Prediction accuracy needs further enhancement in this module.

🌟 Example Results

App Interface Example:
  • User writes the digit '5'.
  • Model predicts: '5'.

Training Performance:

  • Achieved 99% accuracy on the MNIST dataset.

πŸ“ Future Improvements

  • πŸ› οΈ Improve the accuracy of the 'webcam.py' predictions.
  • 🌟 Add support for multi-digit recognition.
  • 🎨 Enhance the UI for better usability.

Enjoy exploring the world of digit recognition! ✨

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published