Skip to content

yaleCat/Grad-CAM-pytorch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Unofficial implementation for Grad-CAM in Pytorch with Multi Network Structures

What makes the network think the image label is 'dog' and 'cat':

Dog

Combining Grad-CAM with Guided Backpropagation for the 'dog' class:

Gb_dog

Gradient class activation maps are a visualization technique for deep learning networks.

See the paper: https://arxiv.org/pdf/1610.02391v1.pdf


In this Repo

Grad-CAM, Guided-Backpropagation with Grad-CAM

VGG19


Grad_cam_dog36GB_dog36

VGG 19 Layer1, Layer20 and Layer36


vgg4vgg20vgg36

EfficientNet-b0


Grad_cam_dog15GB_dog15

EfficientNet-b0 Layer1, Layer10 and Layer15


eff1eff10eff15


What exactly is the difference among this repository and the others?

A: For example, these two are the most popular efficientdet-pytorch,

  • Add EfficientNet for Visualization (Can use for both torchvision.models and EfficientNet from lukemelas/EfficientNet-PyTorch)
  • Add multi-layer visualization for comparison
  • Switch GuidedBackPropagationReLU to GuidedBackPropagationSwish for EfficientNet

Usage: python grad-cam.py --image-path <path_to_image>

To use with CUDA: python grad-cam.py --image-path <path_to_image> --use-cuda

Reference: Appreciate the great work from the following repositories:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published