This project focuses on classifying images from the CIFAR-100 dataset using a custom Convolutional Neural Network (CNN). The project includes detailed analysis, model development, and performance tuning, resulting in achieving a Top 20 position (out of 200) on the Kaggle competition leaderboard.
- Dataset: CIFAR-100
- Images: 60,000 color images of 32x32 pixels
- Classes: 100 distinct categories grouped into 20 superclasses
The goal was to classify images into their respective categories with high accuracy using deep learning techniques.
- Normalization: Standardized pixel values using channel-wise means and standard deviations.
- Data Augmentation:
- Random horizontal flips
- Random cropping with padding of 4 pixels
- Architecture:
- Three convolutional layers (32, 64, and 128 channels)
- Max-pooling after every two convolutional layers
- Dropout (50%) for regularization
- Two fully connected layers
- Output: 100 categories
- Optimizer: Stochastic Gradient Descent (SGD)
- Loss Function: Categorical Cross-Entropy
- Learning Rate: 0.05
- Train Accuracy: 66.81%
- Test Accuracy: 56.03%
- Kaggle Leaderboard Score: 0.3184
- Top 20 Leaderboard Position: Reached the top 20 in the Kaggle competition by balancing model simplicity and computational efficiency.
- Key Strategies for Success:
- Leveraging data augmentation to improve generalization.
- Employing dropout to reduce overfitting.
- Optimizing training with an efficient CNN architecture.
This document provides a detailed explanation of the model design, preprocessing methods, and performance analysis.
This Jupyter Notebook contains the implementation of the CNN model, including:
- Data preprocessing
- Model architecture and training
- Performance evaluation and visualization
- Clone the repository:
git clone <repository-url>
- Open the Jupyter Notebook:
jupyter notebook kaggle.ipynb
- Follow the cells to understand the data preprocessing, model training, and evaluation process.
- The importance of balancing model complexity and computational efficiency.
- Regularization techniques, such as dropout, are essential for reducing overfitting.
- Leveraging data augmentation can significantly improve model robustness and generalization.
- Experiment with more complex architectures like ResNet or DenseNet.
- Explore advanced regularization techniques (e.g., weight decay, mixup).
- Implement learning rate schedulers to optimize convergence.
This project was completed as part of COMPSCI 4ML3: Introduction to Machine Learning at McMaster University under the guidance of the course instructors.
Waleed Malik
- Kaggle: waleedmalik7
- Email: waleedmalik027@gmail.com
