CNN for Image Classification

Custom and Pre-Trained models for MNIST Digit Classification

CNN for Image Classification
2024-12-07
View on GitHub
Pattern RecognitionImage ClassificationDeep Learning

The project includes collaborative efforts in applying pattern recognition and image classification techniques. The primary focus is on the MNIST dataset, with attempts that explore digit classification and neural network optimizations.

My Contribution

I was the project lead in this Pattern Recognition project. My work included model training and building, hyperparameter optimization, and performance evaluation in both the custom Convolutional Neural Network and DenseNet architecture, achieving significant improvements in accuracy and model convergence.

Project Overview

Part 1: Custom CNN for Image Classification

This project involves the design and implementation of a custom Convolutional Neural Network (CNN) to classify handwritten digits from the MNIST dataset.

Repository: Custom CNN Implementation

Key Features:

Class Distribution of the Dataset
Class Distribution of the Dataset.
PCA on MNIST Dataset
PCA on MNIST Dataset.
  • Custom CNN architecture built using PyTorch.
  • Dataset split into training, validation, and testing sets.
  • Comprehensive evaluation using metrics like accuracy, confusion matrix, precision, and recall.

Training and Validation loss curves:

Training and Validation Loss Curves

Part 2: State-of-the-Art CNN Implementations

Each team member implemented and fine-tuned a pre-trained CNN architecture to compare its performance with the custom model:

DenseNet: Fine-tuned for accuracy improvements and faster convergence.

DenseNet Architecture
DenseNet Architecture
DenseNet Training Curve
Training Curve.

ResNet: Utilized residual connections for handling deeper layers.

ResNet Architecture
ResNet Architecture.
ResNet Training Curve
Training Curve.

GoogLeNet: Fine-tuned for complex image classification tasks.

GoogLeNet Architecture
GoogLeNet Architecture
GoogLeNet Training Curve
Training Curve.

VGG: Optimized for feature extraction.

Results

Custom CNN 99.14%
DenseNet 99.28%
ResNet 99.56%
GoogLeNet 99.04%
VGG 99.15%

Repositories

Pending update on overall results.

This project provides a comprehensive foundation in CNN-based image classification, demonstrating both theoretical understanding and practical implementation skills in deep learning and computer vision.

For more details and to explore the implementation, visit the GitHub Organization.