Skip to content

ShuaiLYU/pytorch-grad-cam_batch

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Grad-CAM implementation in Pytorch [Fork]##

Original Repo:

What makes the network think the image label is 'pug, pug-dog' and 'tabby, tabby cat':

Dog Cat

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

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

The paper authors torch implementation: https://github.com/ramprs/grad-cam

My Keras implementation: https://github.com/jacobgil/keras-grad-cam


The code can be modified to work with any model. However the VGG models in torchvision have features/classifier methods for the convolutional part of the network, and the fully connected part. This code assumes that the model passed supports these two methods.


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

About

PyTorch implementation of Grad-CAM

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%