hulianyuyy / CorrNet

Continuous Sign Language Recognition with Correlation Network (CVPR 2023)
84 stars 14 forks source link

Grad-CAM:run generate_cam.py error #57

Open xyu11 opened 3 weeks ago

xyu11 commented 3 weeks ago

Hello, I have a question for you. Does generate_cam.py's './weight_map.pth' in line 122 refer to the.pt model trained by myself or other models? I can't find any detail information about './weight_map.pth' in generate_cam.py. I would be most grateful if you could help me.

hulianyuyy commented 3 weeks ago

As shown in the readme.md, for Grad-CAM visualization, you can replace the resnet.py under "./modules" with the resnet.py under "./weight_map_generation", and then run python generate_cam.py with your own hyperparameters.

xyu11 commented 3 weeks ago

Yes, that's exactly what I did. I tried to use your model to generate a heat map, but when I replaced the path of line 122 with a specific model, I found the following error, so I began to wonder whether I imported the wrong pt model? QQ20240605-105752

hulianyuyy commented 3 weeks ago

You don't need to change line 122. The model weights you want to load should be placed in line 15 in generate_cam.py.

xyu11 commented 3 weeks ago

Thank you very much for your advice. I would like to express my sincere apologies for my misunderstanding.Wish you a happy life!