Skip to content

resh20manickam/DL-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

DL-project# Handwritten Digit Classification using CNN (MNIST)

📌 Project Overview

This project builds a Convolutional Neural Network (CNN) model to classify handwritten digits using the MNIST dataset. The model learns patterns from grayscale images of digits (0–9) and predicts the correct digit.

The dataset consists of 70,000 images of handwritten digits:

  • 60,000 training images
  • 10,000 testing images

Each image is 28 × 28 pixels.


🧠 Technologies Used

  • Python
  • Keras
  • TensorFlow (Backend)
  • NumPy
  • Matplotlib

📂 Dataset

The dataset used is MNIST, a widely used dataset in machine learning for image classification tasks.

Features:

  • 28 × 28 grayscale images
  • Digits from 0 to 9
  • Pre-divided into training and testing sets

Dataset Source: Keras Built-in Dataset


⚙️ Project Workflow

  1. Import required libraries
  2. Load the MNIST dataset
  3. Preprocess the data
  4. Build the CNN model
  5. Train the model
  6. Evaluate model performance
  7. Predict handwritten digits

🧩 Model Architecture

The CNN model consists of the following layers:

  1. Conv2D Layer

    • Extracts image features
  2. MaxPooling Layer

    • Reduces image dimensions
  3. Dropout Layer

    • Prevents overfitting
  4. Flatten Layer

    • Converts matrix to vector
  5. Dense Layer

    • Fully connected neural network
  6. Output Layer

    • Softmax activation for digit classification (0–9)

🚀 Installation

Install required libraries:

pip install tensorflow keras numpy matplotlib

▶️ How to Run

  1. Clone the repository
git clone https://github.com/your-username/mnist-cnn-project.git
  1. Navigate to the project folder
cd mnist-cnn-project
  1. Run the Python script
python mnist_cnn.py

📊 Expected Output

Example dataset shape:

(60000, 28, 28) (60000,)

Model accuracy after training can reach ~98% – 99%.


🎯 Applications

  • Digit recognition systems
  • Bank cheque processing
  • Postal code recognition
  • OCR systems
  • AI handwriting analysis

📚 Learning Outcomes

From this project you will learn:

  • Basics of Convolutional Neural Networks
  • Image preprocessing
  • Training deep learning models using Keras
  • Evaluating model accuracy

👨‍💻 Author

Reshma M


📜 License

This project is for educational purposes.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors