Skip to content
Class Activation Map using Keras
Branch: master
Clone or download
Latest commit 58a5960 Feb 9, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
readme_images maltese Feb 9, 2018
.gitattributes Initial commit Feb 9, 2018
Class Activation Map(CAM).ipynb Init Feb 9, 2018
README.md Update README.md Feb 9, 2018

README.md

Keras Class Activation Map

This is one of many ways to visualize and get insights from a Convolutional Neural Network. What this basically does is that it creates a heatmap of "Class Activation" over the input image. A "class activation" heatmap is a 2D grid of scores associated with an specific output class, computed for every location in any input image, indicating how important each location is with respect to the class considered. Quite simply, it tells us which features the model is looking for. Keras will be the deep framing framework that is going to be utilized. I am starting to really love Keras, its just so easy to use and as an effect saves a lot of time coding. If tensorflow was used for this project it would have taken longer because tensorflow is not rich in helper functions. Everything that is needed for this are all in Keras.

Applying MAP to images of the same category (Greater Swiss Mountain Dog)

As we expected, the CNN is looking for specific features. In the example below, when it sees this kind of nose/mouth area of a dog the models predicts that it is a Greater Swiss Mountain Dog.

alt text alt text alt text alt text

Applying MAP to images of dogs (different breeds)

It is interesting what the model is looking for in order to identfy the breed of the dog. alt text alt text alt text alt text

You can’t perform that action at this time.