This project is focused on exploring the interpretability of deep learning models for computer vision tasks. It includes techniques such as saliency maps, Grad-CAM (with and without Captum), and class model visualization to better understand how models make predictions. Additionally, experiments were performed involving fooling images and style transfer to examine model robustness and creativity. This repository aims to provide insights into the inner workings of convolutional neural networks (CNNs) and improve their transparency.
-
This technique is used to visualize which pixels of an image most strongly influence a model’s prediction. By computing the gradients of the output with respect to the input image, the saliency map highlights important areas that contribute to the classification. We also examine the reliability of saliency maps using sanity checks.
-
Grad-CAM:
Grad-CAM is used to provide a deeper understanding of where the model “looks” when making predictions. By utilizing class-specific gradient information flowing into the last convolutional layer, Grad-CAM generates coarse localization maps. This helps identify which parts of an image are most important for a particular class prediction. -
Class Model Visualization:
Perform gradient ascent on an input image to find a visual representation that maximizes the score for a specific class. This method offers insights into what features or patterns the model associates with a particular class label. -
Fooling Images:
This part of the project generates images that are perceived by the model to strongly belong to a particular class, despite being meaningless to the human eye. The goal is to demonstrate potential vulnerabilities and limitations in how models learn visual features. -
Use neural style transfer to generate new images by combining the content of one image with the artistic style of another. Different parameter settings are experimented with to assess how content and style interact and which parameters yield the best visual outputs.
Some of the visualizations were generated using Captum, an open-source tool from Facebook that helps with model interpretability. Captum was particularly useful in generating Grad-CAM and saliency maps in a structured and modular way, making it easier to visualize and compare results.
This project aims to enhance model interpretability and understandability by applying and comparing these visualization techniques, helping to bridge the gap between model outputs and human intuition.



