jacobgil/pytorch-grad-cam

Advanced AI Explainability for computer vision. Support for CNNs, Vision Transformers, Classification, Object detection, Segmentation, Image similarity and...

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 5 minutes ago
Added to GitGenius on September 4th, 2026
Created on May 31st, 2017
Open Issues & Pull Requests: 160 (+0)
GitHub issues: Enabled
Number of forks: 1,709
Total Stargazers: 12,966 (+0)
Total Subscribers: 47 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 10.3 days
Mean response time: 80.6 days
90th percentile: 252.0 days
Tracked items: 50

How this project is maintained

100% of open issues come from outside the core team, so the backlog reflects real-world use rather than internal planning. Three people close 71% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 48
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 738 days
Stale 30+ days: 48
Stale 90+ days: 48

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

No label distribution available yet.

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

pytorch-grad-cam is a Python package for generating visual explanations of computer vision model predictions through gradient-based attribution methods.

The tool addresses the challenge of understanding why deep learning models make specific predictions on images. It implements multiple pixel attribution techniques—including Grad-CAM and Score-CAM variants—that highlight which regions of an input image most influence a model's output. These methods work by computing gradients or other attribution scores that map model decisions back to input pixels, producing heatmaps that reveal which image features the model relied upon.

The package suits researchers and practitioners who need to diagnose model behavior during development or in production systems. It handles diverse computer vision tasks including image classification, object detection, semantic segmentation, and embedding similarity, and works with both convolutional neural networks and Vision Transformers. The tool includes smoothing techniques to improve visualization quality and supports batch processing for efficiency. It also provides metrics to validate whether explanations are trustworthy and to tune attribution methods for optimal performance. The README positions the package as both a practical diagnostic tool and a research benchmark for developing new explainability algorithms.

The project maintains active engagement with its user base through detailed documentation and advanced tutorials. Development shows consistent refinement of existing methods rather than rapid feature expansion, with careful attention to supporting established architectures and use cases. The codebase demonstrates thorough testing across multiple common network architectures and transformer variants, indicating a focus on reliability across diverse model types.