This project focuses on classifying noisy, transformed images of handwritten digits from the MNIST dataset using Deep Learning techniques. The images have undergone transformations to make the task more challenging. The goal is to compare the performance of two different neural network architectures: a Fully Connected (Dense) Neural Network and a Convolutional Neural Network (CNN).
The dataset used in this project is the MNIST dataset, consisting of 70,000 images of handwritten digits (0 to 9). Each image is a 28x28 grayscale image. The dataset is split into:
- 60,000 training images
- 10,000 test images
The images have been transformed with random alterations such as:
- 🔄 Rotation
↕️ Translation- 🔍 Zoom
- ☀️ Varying brightness
These transformations were applied using the ImageDataGenerator class from Keras to make the task more challenging.
Two different neural network architectures were used for the classification task:
This model consists of:
- 3 Dense layers with ReLU activation
- Dropout layers for regularization
This model consists of:
- 2 Convolutional layers followed by Max Pooling layers
- 2 Dense layers with ReLU activation
- Dropout layers for regularization
The models were trained on the noisy MNIST dataset and evaluated on the test set. Here's a comparison of the two architectures based on accuracy:
- CNN achieved an accuracy of around 97% on the test set 🏆
- Fully Connected Neural Network achieved an accuracy of around 82%
Clearly, the CNN outperformed the fully connected model due to its ability to capture spatial features in images.
git clone https://github.com/Essmaw/noisy-mnist-classification.git
cd noisy-mnist-classificationInstall Conda.
conda env create -f environment.ymlconda activate mnist_envjupyter notebookOpen the noisy_mnist_classification.ipynb notebook to run the analyze by yourself.
You can also try running the notebook on Google Colab without needing to set up the environment locally. Click the badge below to get started: