This project is a Convolutional Neural Network (CNN) based model built to recognize handwritten digits (0–9) using the MNIST dataset. The model was trained and tested using Google Colab, and saved in .h5 format.
Handwritten_Digit_Recognizer.ipynb— Jupyter notebook containing all code (data loading, preprocessing, model training, evaluation).mnist_digit_recognizer.h5— Trained CNN model saved in HDF5 format.README.md— Description and overview of the project.
To build a machine learning model that accurately classifies handwritten digits from images using a CNN and the MNIST dataset.
- Python
- TensorFlow / Keras
- NumPy, Matplotlib
- Google Colab
- MNIST Dataset from TensorFlow datasets
- 60,000 training images and 10,000 test images of digits (0–9)
- Each image: 28x28 grayscale
- Input Layer: 28x28 grayscale image
- Conv2D Layer: 32 filters (3x3) + ReLU
- MaxPooling2D
- Conv2D Layer: 64 filters (3x3) + ReLU
- MaxPooling2D
- Flatten
- Dense Layer: 128 neurons + ReLU
- Dropout: 0.2
- Output Layer: 10 neurons (softmax)
- Epochs: 5
- Batch Size: 64
- Final Accuracy:
- Training Accuracy: ~99.4%
- Validation Accuracy: ~99.0%
- Clone the repo or download the notebook.
- Open the
.ipynbfile in Google Colab or Jupyter. - Run all cells to train or test the model.
- Or load the
.h5model for prediction.
from keras.models import load_model
model = load_model('mnist_digit_recognizer.h5')Vidit Kumar
Project completed as part of internship with Codec Technologies India.







