Skip to content

khawajatalhahaseeb/Class-Activation-Map-Keras

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

Class-Activation-Map-Keras

Class Activation Map (CAM) is a powerful technique used in 'Computer Vision' to visualize and get insights from a Convolutional Neural Network (CNN). It is used by scientists to inspect the image to be categorized and it also helps to understand which parts of that image have contributed more to the final output of the model. It creates a heatmap of 'Class Activation' over the given input image. It tells which features the model is looking for.

In this example, I am using Keras to implement CAM because Keras is easy to use and it also saves a lot of time. I will be using a pre-trained CNN, VGG16 model, using weights deriving from its training on the Imagenet dataset.

Input Image:

sheep

Class Activation Map:

output_sheep

Reference