/Class-Activation-Map-CAM-and-Grad-CAM

Class Activation Map (CAM and Grad-CAM) Analysis of fine-tuned CNNs with transfer learning for Pokemon classification task to understand the features learned by deep CNN

Primary LanguagePython

Class-Activation-Map-CAM-and-Grad-CAM

Problem Definition

For many years, Convolutional Neural Networks were treated as black boxes with inputs and outputs, but we didn't know what the network was learning. Class Activation Map (CAM) aids in understanding what features the network is learning and which areas are prioritized in order to distinguish classes from one another.

In this work, I have used CAM and Grad-CAM in a pokemon classification problem setting to learn more about the internal workings of a deep CNN. This problem statement will allow to fine-tune pre-trained networks on a new classification task, followed by an analysis of the newly trained network to see what features it is learning.

Dataset

Dataset Link: https://www.kaggle.com/datasets/thedagger/pokemon-generation-one

The dataset consists of 151 pokemons, with 60 images each per pokemon. Out of these 151 pokemons, 7 classes were selected for analysis.

Project Paper:

Paper Link: https://github.com/shivaniNK8/Class-Activation-Map-CAM-and-Grad-CAM/blob/main/CAM_Final_Report.pdf

Result Images:

Combined Results of AlexNet, VGG 16 CAM and VGG19 Grad-CAM

Alexnet CAM Results

VGG16 CAM Results