TorchCAM: class activation explorer¶
TorchCAM provides a minimal yet flexible way to explore the spatial importance of features on your PyTorch model outputs. Check out the live demo on HuggingFace Spaces 🤗
This project is meant for:
⚡ exploration: easily assess the influence of spatial features on your model’s outputs
👩‍🔬 research: quickly implement your own ideas for new CAM methods
CAM zoo¶
Activation-based methods¶
CAM from “Learning Deep Features for Discriminative Localization”
Score-CAM from “Score-CAM: Score-Weighted Visual Explanations for Convolutional Neural Networks”
SS-CAM from “SS-CAM: Smoothed Score-CAM for Sharper Visual Feature Localization”
IS-CAM from “IS-CAM: Integrated Score-CAM for axiomatic-based explanations”
Gradient-based methods¶
Grad-CAM from “Grad-CAM: Visual Explanations from Deep Networks via Gradient-based Localization”
Grad-CAM++ from “Grad-CAM++: Improved Visual Explanations for Deep Convolutional Networks”
Smooth Grad-CAM++ from “Smooth Grad-CAM++: An Enhanced Inference Level Visualization Technique for Deep Convolutional Neural Network Models”
X-Grad-CAM from “Axiom-based Grad-CAM: Towards Accurate Visualization and Explanation of CNNs”
Layer-CAM from “LayerCAM: Exploring Hierarchical Class Activation Maps for Localization”