- Introduction
- Dataset
- Model Architecture
- Training Pipeline
- Results and Performance Metrics
- Model Inference
-
This project implements a multi-class image classifier using a Convolutional Neural Network (CNN). The goal was to classify images of pandas, cats, and dogs. The dataset consists of 3000 images (1000 per class) and was split into an 80:20 ratio for training and validation. The final trained model achieved an accuracy of 91.33%.
-
The project had the following purpose:
- Building and Training a Neural Network from Scratch
The project involves designing a CNN architecture, training it on real-world data, and analyzing its results. - Reinforcing a Complete Training Pipeline
The project follows a robust training pipeline, addressing common errors such as:- Input/output shape mismatches.
- Loss function and optimizer compatibility.
- Image transformation issues.
- Misaligned plotting curves.
The dataset, obtained from Kaggle, consists of:
- 3000 images (1000 per class: Panda, Cat, Dog).
- Images resized to 224x224 for consistency.
- Data split into 80% training and 20% validation.
- Some data samples are visualized below
To enhance generalization, the following augmentations were applied:
- Random rotation.
- Horizontal flipping.
- Random affine transfromation.
- Image Normalization
For a detailed breakdown of the architecture, refer to Training_from_scratch.ipynb.
- Input:
(Batch Size, 3, 224, 224)
- Output:
3-class
scores (Panda, Cat, Dog). - Activation Functions:
ReLU
for hidden layers,Softmax
for output. - Regularization: Dropout and batch normalization.
The training process involved:
- Experimentation with:
- Number of layers and filters.
- Optimizers and learning rate schedulers.
- Regularization techniques like data augmentation, dropout, and batch normalization.
- Number of epochs.
- Validation accuracy monitored to ensure the model generalizes well.
Explore the training pipeline in the following notebooks:
The final validation accuracy achieved was 91.33%.
The confusion matrix of the classification model is given below.
Here are some predictions made by the model: