Skip to content

Convolutional Neural Network (CNN) implementation using TensorFlow and Keras to classify handwritten digits from the MNIST dataset

Notifications You must be signed in to change notification settings

GithmiHashara/mnist-digit-recognition-tf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 

Repository files navigation

mnist-digit-recognition-tf

๐Ÿง  MNIST Digit Classifier with CNN

A complete end-to-end Convolutional Neural Network (CNN) project using TensorFlow and Keras to classify handwritten digits from the MNIST dataset. This project is beginner-friendly and ideal for learning image classification fundamentals with deep learning.


๐Ÿ“ฆ Dataset: MNIST

  • 70,000 grayscale images of handwritten digits (0โ€“9)
  • Image size: 28ร—28 pixels
  • Split: 60,000 for training and 10,000 for testing
  • Built-in dataset in TensorFlow

๐Ÿš€ Project Highlights

  • โœ… Data loading and exploration
  • ๐Ÿ–ผ๏ธ Sample visualization and digit distribution
  • ๐Ÿ”ง Preprocessing with normalization and reshaping
  • ๐Ÿ—๏ธ CNN model building using Keras Sequential API
  • ๐Ÿ“ˆ Training and validation tracking
  • ๐Ÿ”ฎ Model evaluation and predictions
  • ๐Ÿ“Š Confusion matrix and per-class analysis
  • ๐ŸŽฏ Random test predictions
  • ๐Ÿ’พ Ready for further fine-tuning or saving the model

๐Ÿ“Š Model Performance

  • Final Test Accuracy: ~99%
  • Uses dropout regularization to prevent overfitting
  • Visualizes training/validation accuracy and loss

๐Ÿงช Requirements

  • Python โ‰ฅ 3.7
  • TensorFlow โ‰ฅ 2.x
  • NumPy, Matplotlib, Seaborn, scikit-learn

๐Ÿ“ธ Sample Results

image

Install dependencies:

pip install tensorflow numpy matplotlib seaborn scikit-learn

๐Ÿง  Learnings Understanding CNN architecture

  • Visualizing model performance
  • Working with real image data
  • Evaluating classification models

About

Convolutional Neural Network (CNN) implementation using TensorFlow and Keras to classify handwritten digits from the MNIST dataset

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published