This project implements a deep learning-based solution for recognizing handwritten digits (0–9) using two different approaches: Convolutional Neural Networks (CNN) and Recurrent Neural Networks (RNN).
The main objective is to understand how different neural network architectures perform on image classification tasks. CNN is used to capture spatial features, while RNN processes the image as a sequence to explore an alternative approach.
The project covers the complete pipeline including data preprocessing, model building, training, and evaluation. A comparison between CNN and RNN is also performed to analyze performance differences.
Key highlights:
- Built CNN and RNN models from scratch
- Used MNIST dataset for training and testing
- Achieved high accuracy with CNN (~98–99%)
- Compared sequential vs spatial learning approaches
This project focuses on classifying handwritten digits (0–9) using deep learning models.
Dataset details:
- 60,000 training images
- 10,000 testing images
- Image size: 28×28 grayscale
Components:
- Convolution layers
- ReLU activation
- Max pooling
- Fully connected layers
- Softmax output
Components:
- Sequential input (row-wise image)
- Hidden state learning
- Dense output layer
- Python
- PyTorch / TensorFlow
- NumPy
- Matplotlib
- Load MNIST dataset
- Preprocess data
- Build CNN & RNN models
- Train models
- Evaluate performance
- Compare results
| Model | Accuracy |
|---|---|
| CNN | ~98–99% |
| RNN | ~90–92% |
CNN outperforms RNN due to better spatial feature extraction.
- Handwritten digit recognition
- OCR systems
- Bank cheque processing
- Postal code detection
- CNN vs RNN comparison
- Image vs sequential data handling
- Model optimization techniques
- End-to-end deep learning workflow

