/ForgottenPlutonium

TinyImageNet Classifier using ResNet18(MMDA)

Primary LanguageJupyter NotebookMIT LicenseMIT

ForgottenPlutonium

*Why this name? Because I think TinyImageNet Dataset is underrated and I wanted to make it cool and radioactive :sunglasses:

Notebook: TinyImageNet Classifier

Model Features:

  1. Used GPU as Device.

  2. CNN Type: ResNet18

  3. Total Params: 11,271,432

  4. Implemented MMDA, used Albumentations since it's easy to integrate with PyTorch.

  5. Also Trained the model a bit harder by adding Image Augmentation Techniques like RandomCrop, Flip & Cutout.

  6. Max Learning Rate: 0.01

  7. Used NLLLoss() to calculate loss value.

  8. Ran the model for 50 Epochs

     * Highest Validation Accuracy: 51.20%
    
  9. GradCam for 25 Misclassified Images.

Library Documentation:

1.AlbTransforms.py : Applies required image transformation to both Train & Test dataset using Albumentations library.

2.DataPrep.py: Consists of Custom DataSet Class and some helper functions to apply transformations, extract classID etc.

3.resNet.py: Consists of main ResNet model

4.execute.py: Scripts to Test & Train the model.

5.DataLoaders.py: Scripts to load the datasets.

6.displayData.py: Consists of helper functions to plot images from dataset & misclassified images.

7.Gradcam.py: Consists of Gradcam class & other related functions.

8.LR Finder.py: LR finder using FastAI Approach.

9.cyclicLR.py: Consists helper functions related to CycliclR.

Plots & Curves

LR Finder

Model Performance

Accuracy Plot

Loss Plot

Misclassified Images

Misclassified

GradCam for Misclassified Images

GradCam

Model Logs

  • Model Logs