This repository contains implementations of various deep learning architectures for classifying images from the popular MNIST dataset 🖼️. The MNIST dataset consists of 70,000 grayscale images of handwritten digits (0-9), each of size 28x28 pixels. This project explores the performance of different models for image classification, including:
- 🌐 CNN (Convolutional Neural Network)
- 🖥️ MLP (Multilayer Perceptron)
- 🔍 VGG-like CNN
- 🌀 ResNet-like CNN
- 🔄 Autoencoder for Feature Learning
The goal is to classify handwritten digits using multiple deep learning models and evaluate them based on common metrics such as accuracy, precision, recall, F1 score, and ROC-AUC. The project includes:
- Data Preprocessing: Reshaping, normalizing, and splitting the dataset.
- Model Architectures:
- CNN: A simple convolutional neural network.
- MLP: A fully connected network for baseline performance.
- VGG-like CNN: A deeper CNN model inspired by VGGNet.
- ResNet-like CNN: A residual network with skip connections.
- Autoencoder: For unsupervised feature learning.
- Training & Evaluation: Models are trained for 10 epochs and evaluated on the test set.
- Visualization:
- Confusion Matrix 📊
- ROC Curve 📈
The models are evaluated using the following metrics:
- Accuracy: Overall correctness of the model's predictions.
- Precision: Proportion of correctly predicted positive observations to the total predicted positives.
- Recall: Proportion of correctly predicted positive observations to all observations in the actual class.
- F1 Score: Harmonic mean of precision and recall.
- ROC-AUC Score: The Area Under the ROC Curve to evaluate model performance across all classification thresholds.
- Clone the repository:
git clone https://github.com/yourusername/mnist-classification.git
- Install the required libraries:
pip install -r requirements.txt
- Run the training and evaluation script:
python train_and_evaluate.py
numpy
for numerical operationsmatplotlib
&seaborn
for visualizationstensorflow/keras
for deep learning modelsscikit-learn
for evaluation metrics
This project provides insights into how different neural network architectures perform on the MNIST dataset. Explore the results to see which model works best for your image classification tasks! 😊