资源算法grad-cam

grad-cam

2019-09-12 | |  52 |   0 |   0

|

Grad-CAM implementation in Pytorch

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

dog.jpg cat.jpg

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


This uses VGG19 from torchvision. It will be downloaded when used for the first time.

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

上一篇:Realtime_Multi-Person_Pose_Estimation

下一篇:yusuketomoto/chainer-fast-neuralstyle

用户评价
全部评价

热门资源

  • Keras-ResNeXt

    Keras ResNeXt Implementation of ResNeXt models...

  • seetafaceJNI

    项目介绍 基于中科院seetaface2进行封装的JAVA...

  • spark-corenlp

    This package wraps Stanford CoreNLP annotators ...

  • capsnet-with-caps...

    CapsNet with capsule-wise convolution Project ...

  • inferno-boilerplate

    This is a very basic boilerplate example for pe...