https://github.com/tasninanika/convolutional_neural_network-cnn
A deep learning project to classify handwritten digits (0–9) using a Convolutional Neural Network (CNN). This project builds a CNN model with TensorFlow/Keras to classify digits with high accuracy.
https://github.com/tasninanika/convolutional_neural_network-cnn
keras tensorflow
Last synced: 2 months ago
JSON representation
A deep learning project to classify handwritten digits (0–9) using a Convolutional Neural Network (CNN). This project builds a CNN model with TensorFlow/Keras to classify digits with high accuracy.
- Host: GitHub
- URL: https://github.com/tasninanika/convolutional_neural_network-cnn
- Owner: tasninanika
- Created: 2025-08-26T03:36:48.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-08-26T03:53:41.000Z (11 months ago)
- Last Synced: 2025-08-26T05:36:54.363Z (10 months ago)
- Topics: keras, tensorflow
- Language: Jupyter Notebook
- Homepage:
- Size: 141 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 🔢 MNIST Digit Classification using CNN
A deep learning project to classify **handwritten digits (0–9)** using a **Convolutional Neural Network (CNN)**. The model is trained on the **MNIST dataset**.
---
## 📌 Project Overview
The **MNIST dataset** is a benchmark dataset in machine learning and computer vision. It consists of grayscale images of handwritten digits.
This project builds a **CNN model with TensorFlow/Keras** to classify digits with high accuracy.
---
## 📂 Dataset
* **Source:** [MNIST Dataset](http://yann.lecun.com/exdb/mnist/) (also available via `keras.datasets.mnist`)
* **Training Samples:** 60,000
* **Test Samples:** 10,000
* **Image Size:** 28 × 28 pixels (grayscale)
* **Classes:** 10 (digits 0–9)
---
## ⚙️ Tech Stack





---
## 🛠️ Project Workflow
### 🔹 Data Preprocessing
* Loaded MNIST dataset from `keras.datasets`
* Normalized pixel values (0–255 → 0–1)
* Reshaped data for CNN input (`28x28x1`)
* One-hot encoded target labels
### 🔹 CNN Architecture
* **Conv2D + ReLU + MaxPooling** layers
* **Flatten** layer
* **Dense (Fully Connected)** layers
* **Output layer** with Softmax activation
### 🔹 Model Training
* **Optimizer:** Adam
* **Loss Function:** Categorical Crossentropy
* **Metrics:** Accuracy
* Trained for multiple epochs with batch size tuning
### 🔹 Evaluation
* Achieved **\~99% training accuracy**
* Achieved **\~98% test accuracy**
* Visualized predictions with sample test images
---
## 📊 Results
✔️ High accuracy (>98%) on test data
✔️ Robust CNN architecture with minimal overfitting
✔️ Correctly classifies handwritten digits