Arpit Aggarwal
In this project, different CNN Architectures like DRN-34, DRN-50, ResNet-34 and ResNet-50 were used for the task of Dog-Cat image classification. The input to the CNN networks was a (224 x 224 x 3) image and the number of classes were 2, where '0' was for a cat and '1' was for a dog. The CNN architectures were implemented in PyTorch and the loss function was Cross Entropy Loss. The hyperparameters to be tuned were: Number of epochs(e), Learning Rate(lr), momentum(m), weight decay(wd) and batch size(bs).
The data for the task of Dog-Cat image classification can be downloaded from: https://drive.google.com/drive/folders/1EdVqRCT1NSYT6Ge-SvAIu7R5i9Og2tiO?usp=sharing. The dataset has been divided into three sets: Training data, Validation data and Testing data. The analysis of different CNN architectures for Dog-Cat image classification was done on comparing the Training Accuracy and Validation Accuracy values.
The results after using different CNN architectures are given below:
- ResNet-50(pre-trained on ImageNet dataset)
Training Accuracy = 99.43% and Validation Accuracy = 98.43% (e = 50, lr = 0.005, m = 0.9, bs = 32, wd = 5e-4)
- DRN-50
Training Accuracy = 96.91% and Validation Accuracy = 94.53% (e = 100, lr = 0.005, m = 0.9, bs = 32, wd = 5e-4)
- DRN-34
Training Accuracy = 98.23% and Validation Accuracy = 96.68% (e = 100, lr = 0.005, m = 0.9, bs = 32, wd = 5e-4)
To run the jupyter notebooks, use Python 3. Standard libraries like Numpy and PyTorch are used.
The following links were helpful for this project: