yolov5-gradcam  by pooya-mohammadi

YOLOv5 layer visualization using GradCAM

Created 3 years ago
298 stars

Top 89.2% on SourcePulse

GitHubView on GitHub
Project Summary

This project provides a Grad-CAM visualization tool for YOLOv5 object detection models, enabling users to understand which parts of an image the model focuses on when detecting objects. It is targeted at researchers and developers working with YOLOv5 who need to interpret model behavior.

How It Works

The implementation integrates Grad-CAM, a technique for visualizing the decision-making process of convolutional neural networks, with the YOLOv5 architecture. It leverages the YOLOv5 codebase for model loading and the gradcam_plus_plus-pytorch repository for Grad-CAM computation, allowing for heatmaps to be overlaid on input images, highlighting areas of interest for object detection.

Quick Start & Requirements

  • Install: pip install -r requirements.txt
  • Prerequisites: YOLOv5 weights (auto-downloaded if not present), Python.
  • Usage: python main.py --model-path yolov5s.pt --img-path images/cat-dog.jpg --output-dir outputs
  • More info: python main.py -h

Highlighted Details

  • Visualizes attention areas of YOLOv5 models.
  • Compatible with YOLOv5-v6.1.
  • Supports custom model weights and class names.

Maintenance & Community

  • The project is maintained by pooya-mohammadi.
  • References include gradcam_plus_plus-pytorch and ultralytics/yolov5.
  • A citation is provided for research use.

Licensing & Compatibility

  • The repository does not explicitly state a license in the provided README.

Limitations & Caveats

  • The README notes an issue where truck heatmaps sometimes show nothing, which was reportedly solved in version 6.1.
  • Future enhancements like GradCam++ and ScoreCam are listed as "To Do."
Health Check
Last Commit

1 year ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
0 stars in the last 30 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems") and Kevin Hou Kevin Hou(Head of Product Engineering at Windsurf).

ImageAI by OlafenwaMoses

0.0%
9k
Python library for computer vision tasks
Created 7 years ago
Updated 1 year ago
Feedback? Help us improve.