-
Notifications
You must be signed in to change notification settings - Fork 44
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
Interfacing with GradCAM? #9
Comments
You can find the related code at pytorch-cnn-visualizations. Due to a channel group is belonging to a certain class in our method , we can directly visualize the channels without Gradient-weighted. (e.g., as the 1-3 channels belonging to the first class, we can directly visualize those channels without Gradient-weighted). Just revise the related code for you need. |
So the activation maps from MCLoss are essentially the same as what we get from GradCAM? |
No, there has a typo. We don't use vanilla GradCAM to visualize the channels (fig 5 & 7), we directly visualuze the channels beonging to a certain class. Sorry for this. |
E.g., for the first class, we known that the first channel group (1-3 channels) belonging to it. So, we don't need to use the grad to weighted all channels (GradCAM). |
Sorry, I am a little confused so just to confirm I will summarize what I have understood and please correct me if it is wrong. The MCLoss code gives us a feature map of all class activations. For eg: there are 50 classes and 3 channels, the feature map will total have 150 activation maps, and if we know that the correct class is class 1, then channels 1 - 3 will tell us what are the discriminant parts for that class. So the MCLoss code already gives us these activation maps and we can directly use this to visualize the channels and gradCAM Is not required. If this is the case then do we super-impose the activation maps on the input image by upsampling the activation maps to 224 x 224? |
There is no problem with your understanding for visualization. Yes, just revise the code of gradCAM, remove the channel weighted, and then chose one channel to visualizaiton.
some details are omitted here |
I was curious if you tried guided gradcam along with gradcam in your experiments? |
No. the attention map attained by the guided gradcam, maybe can used to guidance the MC-Loss. |
Thank you |
Is it possible to update the documentation or provide some instructions on how we can reproduce GradCAM like visualizations with the code that is provided?
The text was updated successfully, but these errors were encountered: