资源算法pytorch-smoothgrad

pytorch-smoothgrad

2019-09-18 | |  551 |   0 |   0

SmoothGrad implementation in PyTorch

PyTorch implementation of SmoothGrad: removing noise by adding noise.

|Vanilla Gradients|SmoothGrad|Guided backpropagation|Guided SmoothGrad| |:-:|:-:|:-:|:-:| |||||

And other techniques such as the following are implemented.

Download

git clone https://github.com/pkdn/pytorch-smoothgrad

Usage

Save the saliency maps using VanillaGradGuidedBackpropGradSmoothGradGuidedBackpropSmoothGrad.

python saliency.py --img <image-path>

Save the Grad-CAM image.

python grad_cam.py --img <image-path>

If you do not specify an image path, read the raccoon's data (scipy.misc.face()).

Requirements

  • PyTorch

  • torch-vision

  • numpy

  • scipy

  • OpenCV

Environment under Python 3.5.2 is tested.

Acknowledgments

This code is insipired by pytorch-grad-cam.


上一篇:rl-multishot-reid

下一篇:nmn-pytorch

用户评价
全部评价

热门资源

  • allennlp-server

    allennlp-server Serve allennlp services as sep...

  • ubuntu-allennlp

    ubuntu-allennlp AllenAI AllenNLP image based o...

  • allennlp_extras

    allennlp_extras Some utilities build on top of...

  • allennlp-dureader

    An Apache 2.0 NLP research library, built on Py...

  • seetafaceJNI

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