Article ID: 000056835 Content Type: Troubleshooting Last Reviewed: 11/09/2023

How to Generate a Heatmap Using OpenVINO™?

Environment

OpenVINO C++ PackageCNN

BUILT IN - ARTICLE INTRO SECOND COMPONENT
Summary

Provides a solution on how to calculate Class Activation Maps in OpenVINO™

Description

Can a heatmap generation technique like layer-wise relevance propagation or Grad-CAM be implemented using OpenVINO™?

Resolution

Activation maps can be used to visualize the decision-making.

In order to calculate Class Activation Maps in OpenVINO™, is necessary to:

  • Access the output feature maps of the last layer and the corresponding weights.
    NoteThis can be done through the CNNNetwork: addOutput() function call when initializing the network.

After running the inference, calculate the weighted sum of the weights with the feature maps and use this to generate the visualization.

Related Products

This article applies to 1 products