code: def resize_cam(explanation, resize_shape) -> np.ndarray:
      """
  
      Args:
          explanation: (width, height)
          resize_shape: (width, height)
  
      Returns:
  
      """
      assert len(explanation.shape) == 2, (
          f"{explanation.shape}. "
          f"Currently support 2D explanation results for visualization. "
          "Reduce higher dimensions to 2D for visualization."
      )
  
      explanation = (explanation - explanation.min()) / (
          explanation.max() - explanation.min()
      )
  
      explanation = cv2.resize(explanation, resize_shape)
      explanation = np.uint8(255 * explanation)
      explanation = cv2.applyColorMap(explanation, cv2.COLORMAP_JET)
      explanation = cv2.cvtColor(explanation, cv2.COLOR_BGR2RGB)
  
      return explanation
  
file_path: PaddleDetection/ppdet/utils/cam_utils.py
imports: import numpy
  import cv2
  import os
  import sys
  import glob
  from ppdet.utils.logger import setup_logger
  import copy
  import paddle
  from ppdet.engine import Trainer
label_desc: Use image node_id 4 for calling a global function with example usage: resize_cam(explanation, resize_shape) and returns: explanation