Skip to content
Snippets Groups Projects
Commit f01f65e4 authored by André Anjos's avatar André Anjos :speech_balloon: Committed by Daniel CARRON
Browse files

[engine.saliency.viewer] Fix use of heatmap from matplotlib

parent cef1ef38
No related branches found
No related tags found
1 merge request!12Adds grad-cam support on classifiers
......@@ -102,7 +102,7 @@ def _overlay_saliency_map(
result = numpy.where(
saliencies[..., numpy.newaxis] == 0,
image_array,
(image_weight * image_array) + ((1 - image_weight) * heatmap),
(image_weight * image_array) + ((1 - image_weight) * heatmap[:, :, :3]),
)
return PIL.Image.fromarray((result * 255).astype(numpy.uint8), "RGB")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment