pooya-mohammadi / yolov5-gradcam

Visualizing Yolov5's layers using GradCam
MIT License
281 stars 47 forks source link

No matter how many bbox, #11

Closed xiaoma-ux closed 2 years ago

xiaoma-ux commented 2 years ago

No matter how many bbox, the thermal map should be the same. Why is the thermal map of the whole image different for different objects?

pooya-mohammadi commented 2 years ago

Hi @xiaoma-ux, this is due to the gradient that is taken from the classification part of each object. Unlike classification networks, object detection models have classification nodes for each object alongside the bounding box and objectness probability notes. That's why the thermal map differs for each object.

xiaoma-ux commented 2 years ago

hi@pooya-mohammadi,I mean the thermal map of the whole picture should be the same。There may be multiple BBoxes on a particular layer, but the thermal map of the entire image should be the same

pooya-mohammadi commented 2 years ago

@xiaoma-ux The code does not return or even compute the thermal map of the whole image. The thermal is computed for each bbox then combined together

xiaoma-ux commented 2 years ago

So how do you calculate the thermal map of the whole picture? Can you tell me about it?

pooya-mohammadi commented 2 years ago

@xiaoma-ux I'm afraid there is no way because yolo model has no classification section for the whole image