The re-implementation of RISE with pytorch. This repo also includes the code of CAM and Grad-CAM.
- python 3.x
- pytorch >= 0.4
- pillow
- numpy
- opencv
- matplotlib
You can use RISE as well as CAM, GradCAM as a model wrapper described in rise.py
and cam.py
.
Please see jupyter notebook files for the detail.
image | ||
---|---|---|
CAM | ||
Grad-CAM | ||
RISE |
- RISE: Randomized Input Sampling for Explanation of Black-box Models,
Vitali Petsiuk, Abir Das, Kate Saenko, In BMVC 2018 [paper] [official code] - Learning Deep Features for Discriminative Localization, Bolei Zhou, Aditya Khosla, Agata Lapedriza, Aude Oliva, Antonio Torralba, In CVPR2016 [paper]
- Grad-CAM: Visual explanations from deep networks via gradient-based localization, Ramprasaath R. Selvaraju, Michael Cogswell, Abhishek Das, Ramakrishna Vedantam, Devi Parikh, Dhruv Batra, [arXiv]