pooya-mohammadi / yolov5-gradcam

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

heatmap visualization of the whole picture #8

Closed zhaoxuyan closed 2 years ago

zhaoxuyan commented 2 years ago

Thanks for your brilliant work! How can I get a heatmap visualization of the whole picture? Please don't just visualize the box part?

gabrispada commented 2 years ago

Maybe just change this line https://github.com/pooya-mohammadi/yolov5-gradcam/blob/8ae1f5801b27e0ddcdc9f527cb308d7e4793cf2a/main.py#L31 in this way: n_heatmat = (heatmap / 255).astype(np.float32)