Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grad-CAM for Faster-RCNN with config file faster_rcnn_X_101_32x8d_FPN_3x.yaml #43

Open
hanikh opened this issue May 1, 2021 · 4 comments

Comments

@hanikh
Copy link

hanikh commented May 1, 2021

hi, @yizt thanks for great work. I am trying to apply grad-cam for faster-rcnn with config file faster_rcnn_X_101_32x8d_FPN_3x.yaml. I am using the "roi_heads.box_pooler" as the last layer to calculate grad-cam and I have applied some changes to detectron2/modeling/roi_heads/fast_rcnn.py and the function fast_rcnn_inference_single_image the same as the changes that you menthioned in readme. when I run the result code, all the elements of the cam (before Relu) are negative.
would you please help me to figure out what the problem is?

@yizt
Copy link
Owner

yizt commented May 7, 2021

@hanikh 感谢您的反馈,对于某些图像确实存在ReLU之前全为负值的情况(对于另一些图像不是);这个情况怎么处理,是一个开放问题;如果全部为负,先减去均值,在ReLU?但是这么做代表的含义也不清晰

@hanikh
Copy link
Author

hanikh commented May 8, 2021

@yizt thanks for your kind reply.

@Fly-dream12
Copy link

What changes have you made when you applied it on the FPN model? @hanikh

@RuoyuChen10
Copy link

What changes have you made when you applied it on the FPN model? @hanikh

As she mentioned, you can't use the layer name judged by function get_last_conv_name, you need to specify the last layer name, such as 'roi_heads.box_pooler'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants