pooya-mohammadi / yolov5-gradcam

Visualizing Yolov5's layers using GradCam

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No heatmap using a different model

CBarrelet opened this issue · comments

Hi, thank you for your great job!

I tried to use a custom model, and even though the object is detected, the heatmap is basically empty.

Do you know a workaround?

Thanks agin.

Hi @CBarrelet
Yolov5's model is modified every day. Maybe the model I have used is older and you are trying to test it with a newer model!
But still I can't say without testing the actual model

Hi, thanks for your answer.

I was actually using an old Yolov5 version, but I'm currently retraining a new model from the latest version.
I'll keep you in touch!

Hi @pooya-mohammadi
So I tried with the latest version of Yolov5 but it still doesn't show any heatmap.
Which version did you use?
Thanks again.

Hi, thank you for your great job!

I tried to use a custom model, and even though the object is detected, the heatmap is basically empty.

Do you know a workaround?

Thanks agin.

Hello, brother, have you solved this problem? I have the same problem. I would appreciate it if you could help me.

Looking forward to hearing from you.

Hi @chentingkai, I found a workaround by using Yolo's visualization option. I added every features layer from each module and then scaled them to the image size by interpolation. The result seems visually ok.
Hope it could help!

Hi @chentingkai, I found a workaround by using Yolo's visualization option. I added every features layer from each module and then scaled them to the image size by interpolation. The result seems visually ok. Hope it could help!

Thank you very much for your timely reply! I'm a novice in deep learning. Can you send me a copy of your executable code? My email address is tingkai1993@163.com . Thank you again for your selfless help.

Sorry, I don't have the time to make a clean version of my code, but fortunately, you don't have to do much.

python detection.py --visu

You could then see every feature map for each module in runs/detect/exp/.
All features maps are in NumPy format, so it's easy to play around.
Good luck!

so it's easy to play around

Thank you very much for your timely reply!