What is the Grad CAM method? – DataScientest

Grad CAM consists in finding out which parts of the image have led a convolutional neural network to its final decision. This method consists of producing heat maps representing the activation classes on the images received as input. Each activation class is associated with a specific output class.

These classes are used to indicate the importance of each pixel in relation to the class in question by increasing or decreasing the intensity of the pixel.

For example, if an image is used in a convolutional network of dogs and cats, the Grad-CAM visualisation can generate a heatmap for the cat class, indicating the extent to which the different parts of the image correspond to a cat, and also a heatmap for the dog class, indicating the extent to which the parts of the image correspond to a dog.

For example, lets consider a CNN of dogs and cats. The Grad-CAM method will generate a heatmap for the cat object class to indicate the extent to which each part of an image corresponds to a cat, and also a heatmap for the dog object class in the same way.

The class activation map assigns importance to each position (x, y) in the last convolutional layer by calculating the linear combination of activations, weighted by the corresponding output weights for the observed class (Australian terrier in the example below). The resulting class activation map is then resampled to the size of the input image. This is illustrated by the heatmap below.

See more here:
What is the Grad CAM method? - DataScientest

Related Posts

Comments are closed.