Open xyu11 opened 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.
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?
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.
Thank you very much for your advice. I would like to express my sincere apologies for my misunderstanding.Wish you a happy life!
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.