Skip to content

This is a simple handwritten digit classifier which uses Convolutional Neural Network to classify the input image and predict the digit present in the image.

License

Notifications You must be signed in to change notification settings

Fizzy-Brain/Handwritten-Digit-Classifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Handwritten-Digit-Classifier

This is a simple handwritten digit classifier which uses Convolutional Neural Network to classify the input image and predict the digit present in the image.


This project implements a simple Convolutional Neural Network (CNN) using TensorFlow and Keras to classify handwritten digits from the MNIST dataset. The trained model is saved as mark1.keras.

Features

  • Uses a CNN model for handwritten digit recognition.
  • Trained on the MNIST dataset with 10 epochs.
  • Model is saved as mark1.keras for inference.
  • Includes a script to classify a given handwritten digit image.

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/handwritten-digit-classification.git
    cd handwritten-digit-classification
  2. Install dependencies:

    pip install tensorflow numpy matplotlib pandas scikit-learn

Training the Model

To train the model, run:

python digit_classification.py

This will train the CNN on the MNIST dataset and save the model as mark1.keras.

Using the Model for Prediction

To classify a handwritten digit image, run:

python digit_class.py

Then enter the path to the image when prompted.

Model Architecture

  • 3 Convolutional Layers (with ReLU activation and max pooling)
  • Flatten Layer
  • Fully Connected Dense Layers
  • Softmax Output Layer (for 10-class classification)

Example Usage

If you have an image digit.png containing a handwritten digit, you can classify it as follows:

python digit_class.py

Then, enter:

path/to/digit.png

The script will output the predicted digit.

License

This project is licensed under the MIT License.


About

This is a simple handwritten digit classifier which uses Convolutional Neural Network to classify the input image and predict the digit present in the image.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages