Image classification for Caltech101 | Airplanes, Motorbikes & Schooners dastaset

Challange:

    Multiclass image classification for Caltech101 | Airplanes, Motorbikes & Schooners dastaset using CNN and tensorflow 2.0.

Dataset Description:

   Dataset contains following 3 classes of non-uniform 2D images with different resolutions:
  1. Airplanes : 800 images
  2. Motorbikes : 798 images
  3. Schooner : 63 images

This blog post covers the following aspects of multiclass image classification using 2D CNN

  1. Building a 2D CNN based image classifier for multi class labels using Tensorflow 2.0
  2. Experiment: Effect of depth on model performance
  3. Experiment: Effect of drop out fraction on model performance
  4. Building model with optimal number of layers and drop out fraction

Contributions

  Implemeneted a 2D CNN model for multi class image classification of Caltech101 dataset containing images of airplanes, motorbikes and schooners. Created a custom function to build CNN models using tensorflow 2.0 with keras functional API with varying number of layers and amount of dropout in the penultimate layer. Conducted a preliminary model exploration with varying depth of CNN model and varying amount of dropout in the penultimate layer. Created a classification report to evaluate the performance of multiclass classification using 'sklearn.metrics.classificationreport'. Used metrics like balanced accuracy, precision, recall and their weighted averages for unbiased performance evaluation of the model and obtained class wise performances.Created barplots for visualizing the effect on training and validation performance when varying number of layers and amount of dropout. Built an optimal model by selecting depth of the model(Number of layers) and amount of dropout based on their effect on performance. Using any amount of dropout has resulted in decreased performance when compared to the baseline model. Best performance was observed at a model depth of 3 (2 conv2D layers and 1 Dense layer). Model overfitting was observed at depths greater than 3.

Jupyter Notebook

     

GitHub Code:

    Click here

References

  1. Tensorflow Tutorial
  2. Setting random seed in ML
  3. Building a keras model using functional API
  4. Creating a grouped barplot with labels