Skip to main content

📦 Flexible visualization package for generatinglayer-wise explanations for CNNs.

Project description

Explainable CNNs

Torch Version Torchvision Version All Contributors Price Maintained

Its a common notion that a Deep Learning model is considered as a black box. Working towards this problem, this project focusses on making the internal working of the Neural layers more transparent. In order to do so, Explainable CNNs is a plug n play component that visualizes the layers based on on their gradients and builds different representations including Saliency Map, GuidedBackPropagation, GradCam and GuidedgradCam.

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 different 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

explainable_cnn-0.0.4.tar.gz (11.3 kB view hashes)

Uploaded Source

Built Distribution

explainable_cnn-0.0.4-py3-none-any.whl (11.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page