ashutosh1919/explainable-cnn
์๊ฐ
๐ฆ PyTorch based visualization package for generating layer-wise explanations for CNNs.
AI ๋ฐ ๋จธ์ ๋ฌ๋์ธก์ ๋ ์คํ ์ฆ๊ฐ
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- ๊ธฐ๋ก ์์ง ์ค
์๋ก ๊ฒน์น๋ ๊ธฐ๊ฐ์ ์์ฆ๊ฐ๋์ด๋ฉฐ ์ผ๋ณ ํฉ๊ณ๊ฐ ์๋๋๋ค. ์ธก์ ๊ฐ์ด ์์ผ๋ฉด ๋น์ ๋ก๋๋ค. ์คํ๋ ๊ด์ฌ๋๋ฅผ ๋ํ๋ด๋ฉฐ ํ์ง์ ๋ณด์ฅํ์ง ์์ต๋๋ค.
README.md
OriginalExplainable CNNs
๐ฆ Flexible visualization package for generating layer-wise explanations for CNNs.
It is a common notion that a Deep Learning model is considered as a black box. Working towards this problem, this project provides flexible and easy to use pip package explainable-cnn that will help you to create visualization for any torch based CNN model. Note that it uses one of the data centric approach. This project focusses on making the internal working of the Neural layers more transparent. In order to do so, explainable-cnn is a plug & play component that visualizes the layers based on on their gradients and builds different representations including Saliency Map, Guided BackPropagation, Grad CAM and Guided Grad CAM.
Architechture
Usage
Install the package
pip install explainable-cnn
To create visualizations, create an instance of CNNExplainer.
from explainable_cnn import CNNExplainer
x_cnn = CNNExplainer(...)
The following method calls returns numpy arrays corresponding to image for different types of visualizations.
saliency_map = x_cnn.get_saliency_map(...)
grad_cam = x_cnn.get_grad_cam(...)
guided_grad_cam = x_cnn.get_guided_grad_cam(...)
To see full list of arguments and their usage for all methods, please refer to this file
You may want to look at example usage in the example notebook.
Output
Below is a comparison of the visualization generated between GradCam and GuidedGradCam
Contributors โจ
Thanks goes to these wonderful people (emoji key):
Ashutosh Hathidara ๐ป ๐จ ๐ฌ ๐ง โ โ ๏ธ |
Lalit Pandey ๐ฌ ๐ |
This project follows the all-contributors specification. Contributions of any kind welcome!
References
๊ด๋ จ ํ๋ก์ ํธ ์ดํด๋ณด๊ธฐ
๋ถ๋ฌ์ค๋ ์คโฆ