frgfm/torch-cam
Class activation maps for your PyTorch models (CAM, Grad-CAM, Grad-CAM++, Smooth Grad-CAM++, Score-CAM, SS-CAM, IS-CAM, XGrad-CAM, Layer-CAM, Finer-CAM, LeGrad, RefineCAM) observed · 2026-08-28
Health v2 · maintenance only
72/100
- Activity 99
- Release rhythm 22
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 2354
- days_rel: 310
- days_push: 7
- n_releases_24m: 1
Adoption not part of the score
2304 stars · 227 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
TorchCAM is a Python library that extracts class activation maps (CAMs) from PyTorch CNN classifiers, supporting many CAM variants such as Grad-CAM, Score-CAM, Layer-CAM, and more. It offers a minimal hook-based API for visualizing which spatial features influence a model's classification outputs.
Use cases
- visualize which image regions a CNN classifier focuses on
- debug surprising model predictions with saliency maps
- compare Grad-CAM, Score-CAM, and other CAM methods on a PyTorch model
- explain classification outputs for a pretrained ResNet
- research and prototype new class activation map techniques
- generate activation map overlays for model interpretability reports
When to avoid
- you need interpretability for transformers or non-CNN architectures
- you work in TensorFlow, JAX, or another non-PyTorch framework
- you need production-grade model explanation pipelines rather than exploratory visualization
Facets
library · maturity active
machine-learning deep-learning image-processing data-visualization deep-learning computer-vision machine-learning python pytorch grad-cam class-activation-map saliency-map explainability cnn interpretability
2 sources
- readme: https://github.com/frgfm/torch-cam · fetched 2026-08-28 · 38cffcf2c41f
- homepage: https://frgfm.github.io/torch-cam/ · fetched 2026-08-29 · cdc38b08ad40
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| frgfm/torch-cam | main | 72 |
For agents
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem