ultralytics / yolov5

YOLOv5 🚀 in PyTorch > ONNX > CoreML > TFLite
https://docs.ultralytics.com
GNU Affero General Public License v3.0
48.98k stars 15.99k forks source link

Class Activation Map #1341

Closed rvijgen closed 3 years ago

rvijgen commented 3 years ago

I would like to generate class activation maps from custom trained weights. I haven't been able to find any pointers as to how to implement this with YOLOv5.

Any help would be appreciated.

github-actions[bot] commented 3 years ago

Hello @rvijgen, thank you for your interest in our work! Please visit our Custom Training Tutorial to get started, and see our Jupyter Notebook Open In Colab, Docker Image, and Google Cloud Quickstart Guide for example environments.

If this is a bug report, please provide screenshots and minimum viable code to reproduce your issue, otherwise we can not help you.

If this is a custom model or data training question, please note Ultralytics does not provide free personal support. As a leader in vision ML and AI, we do offer professional consulting, from simple expert advice up to delivery of fully customized, end-to-end production solutions for our clients, such as:

For more information please visit https://www.ultralytics.com.

glenn-jocher commented 3 years ago

@rvijgen I have no idea what that is. You may want to include significantly more information when you post questions, such as references, links, examples etc.

rvijgen commented 3 years ago

I am looking to visualise the class activations as in this example https://github.com/utkuozbulak/pytorch-cnn-visualizations#gradient-visualization or as in this image

cat_dog_ScoreCAM_On_Image

Hope this clarifies my question

glenn-jocher commented 3 years ago

@rvijgen I think your question pertains to classification rather than object detection. YOLOv5 does object detection in it's default configuration.

glenn-jocher commented 3 years ago

For reference:

Screenshot 2020-11-11 at 12 05 15

rvijgen commented 3 years ago

I was (perhaps incorrectly) assuming that a trained object detection model would activate and could be visualized similar to a classification model. Are you saying that Class Activation Mapping cannot be done on an object detection model such as YOLOv5?

glenn-jocher commented 3 years ago

I have no idea. I'm just pointing out your reference applies the technique to classification models, which are very different than object detection models.

You may want to raise your issue at the source you mentioned.

github-actions[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.