Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
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)
| Date | Stars |
|---|---|
| 2026-07-24 | 2303 |
| 2026-07-25 | 2304 |
| 2026-07-28 | 2304 |
| 2026-07-30 | 2304 |
| 2026-08-06 | 2304 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
<h1 align="center">
TorchCAM: class activation explorer
</h1>
<p align="center">
<a href="https://github.com/frgfm/torch-cam/actions/workflows/package.yml">
<img alt="CI Status" src="https://img.shields.io/github/actions/workflow/status/frgfm/torch-cam/package.yml?branch=main&label=CI&logo=github&style=flat-square">
</a>
<a href="https://github.com/astral-sh/ruff">
<img src="https://img.shields.io/badge/Linter-Ruff-FCC21B?style=flat-square&logo=ruff&logoColor=white" alt="ruff">
</a>
<a href="https://github.com/astral-sh/ty">
<img src="https://img.shields.io/badge/Typecheck-Ty-261230?style=flat-square&logo=astral&logoColor=white" alt="ty">
</a>
<a href="https://www.codacy.com/gh/frgfm/torch-cam/dashboard?utm_source=github.com&utm_medium=referral&utm_content=frgfm/torch-cam&utm_campaign=Badge_Grade"><img src="https://app.codacy.com/project/badge/Grade/87eaeec3e15442188f96c36bace5faf4"/></a>
<a href="https://codecov.io/gh/frgfm/torch-cam">
<img src="https://img.shields.io/codecov/c/github/frgfm/torch-cam.svg?logo=codecov&style=flat-square&label=Coverage" alt="Test coverage percentage">
</a>
</p>
<p align="center">
<a href="https://pypi.org/project/torchcam/">
<img src="https://img.shields.io/pypi/v/torchcam.svg?logo=PyPI&logoColor=fff&style=flat-square&label=PyPI" alt="PyPi Version">
</a>
<img alt="GitHub release (latest by date)" src="https://img.shields.io/github/v/release/frgfm/torch-cam?label=Release&logo=github">
<img src="https://img.shields.io/pypi/pyversions/torchcam.svg?logo=Python&label=Python&logoColor=fff&style=flat-square" alt="pyversions">
<a href="https://github.com/frgfm/torch-cam/blob/main/LICENSE">
<img src="https://img.shields.io/github/license/frgfm/torch-cam.svg?label=License&logoColor=fff&style=flat-square" alt="License">
</a>
</p>
<p align="center">
<a href="https://huggingface.co/spaces/frgfm/torch-cam">
<img src="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue" alt="Huggingface Spaces">
</a>
<a href="https://colab.research.google.com/github/frgfm/notebooks/blob/main/torch-cam/quicktour.ipynb">
<img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open in Colab">
</a>
</p>
<p align="center">
<a href="https://frgfm.github.io/torch-cam">
<img src="https://img.shields.io/github/actions/workflow/status/frgfm/torch-cam/page-build.yml?branch=main&label=Documentation&logo=read-the-docs&logoColor=white&style=flat-square" alt="Documentation Status">
</a>
</p>
Simple way to leverage the class-specific activation of convolutional layers in PyTorch.
<p align="center">
<a alt="cam_examples">
<img src="https://github.com/frgfm/torch-cam/releases/download/v0.3.1/example.png" /></a>
</p>
<p align="center">
<em>Source: image from <a href="https://www.woopets.fr/assets/races/000/066/big-portrait/border-collie.jpg">woopets</a> (activation maps created with a pretrained <a href="https://pytorch.org/vision/stable/models.html#torchvision.models.resnet18">Resnet-18</a>)</em>
</p>
## Quick Tour
### Setting your CAM
TorchCAM leverages [PyTorch hooking mechanisms](https://pytorch.org/tutorials/beginner/former_torchies/nnft_tutorial.html#forward-and-backward-function-hooks) to seamlessly retrieve all required information to produce the class activation without additional efforts from the user. Each CAM object acts as a wrapper around your model.
You can find the exhaustive list of supported CAM methods in the [documentation](https://frgfm.github.io/torch-cam/methods.html), then use it as follows:
```python
from torchvision.models import get_model, get_model_weights
from torchcam.methods import LayerCAM
# Define your model
model = get_model("resnet18", weights=get_model_weights("resnet18").DEFAULT).eval()
# Set your CAM extractor
cam_extractor = LayerCAM(model)
```
*Please note that by default, the layer at which the CAM is retrieved is set to the last non-reduced convolutionExcerpt of 17,438 characters
Read on GitHubF-G Fernandez · @rimward_ai @pyronear · France
178
51
1
1
1
Would you bet a product on this? Bounded 0–100 and slow moving.
matched fp:f92707b6740ca625, topic:deep-learning, topic:pytorch
matched fp:f92707b6740ca625, topic:interpretability