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

Opacity in heatmap_display causing improper display of gradCAM for small images(Ex:- CIFAR10) #103

Closed
ksasi opened this issue Dec 7, 2019 · 2 comments

Comments

@ksasi
Copy link

ksasi commented Dec 7, 2019

Hi,

It appears the opacity parameter settings in heatmap_display are causing gradCAM to not properly superimpose on original images. This is specifically being seen when using CIFAR10 and small size data sets.

I think the following line needs a review in display.py file for heatmap_display function.

output = cv2.addWeighted(cv2.cvtColor(image, cv2.COLOR_RGB2BGR), 0.7, heatmap, 1, 0)

Thanks and Regards,
Sasikanth

@RaphaelMeudec
Copy link
Collaborator

Okay, will look into it and probably make it tuneable. Thanks for raising this!

@RaphaelMeudec
Copy link
Collaborator

The argument image_weight has been added to GradCAM so users can set their own superposition value.

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

2 participants