pooya-mohammadi / yolov5-gradcam

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

No heatmap using a different model #9

Closed CBarrelet closed 2 years ago

CBarrelet commented 2 years ago

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.

pooya-mohammadi commented 2 years ago

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

CBarrelet commented 2 years ago

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!

CBarrelet commented 2 years ago

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.

chentingkai commented 2 years ago

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.

CBarrelet commented 2 years ago

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!

chentingkai commented 2 years ago

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.

CBarrelet commented 2 years ago

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!

chentingkai commented 2 years ago

so it's easy to play around

Thank you very much for your timely reply!