Skip to content

Instantly share code, notes, and snippets.

@Niranjankumar-c
Created October 11, 2019 17:36
Show Gist options
  • Save Niranjankumar-c/020431431ab147e1e9eb2a6bdf05a41d to your computer and use it in GitHub Desktop.
Save Niranjankumar-c/020431431ab147e1e9eb2a6bdf05a41d to your computer and use it in GitHub Desktop.
display occlusion heatmap
#compute occlusion heatmap
heatmap = occlusion(model, images, pred[0].item(), 32, 14)
#displaying the image using seaborn heatmap and also setting the maximum value of gradient to probability
imgplot = sns.heatmap(heatmap, xticklabels=False, yticklabels=False, vmax=prob_no_occ)
figure = imgplot.get_figure()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment