Skip to content

Commit

Permalink
fix(visualize_heatmap): corrected get_cmap to new version
Browse files Browse the repository at this point in the history
  • Loading branch information
ottkat authored Jun 18, 2024
1 parent 9ea7471 commit 3df4069
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aucmedi/utils/visualizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# External libraries
import numpy as np
from PIL import Image
import matplotlib.cm as cm
import matplotlib as mpl

#-----------------------------------------------------#
# Image Visualizer #
Expand Down Expand Up @@ -70,7 +70,7 @@ def visualize_heatmap(image, heatmap, out_path=None, alpha=0.4):
# Rescale heatmap to grayscale range
heatmap = np.uint8(heatmap * 255)
# Use jet colormap to colorize heatmap
jet = cm.get_cmap("jet")
jet = mpl.colormaps["jet"]
# Use RGB values of the colormap
jet_colors = jet(np.arange(256))[:,:3]
jet_heatmap = jet_colors[heatmap] * 255
Expand Down

0 comments on commit 3df4069

Please sign in to comment.