docstr: the highest heatvalue location with a quarter offset in the
  direction from the highest response to the second highest response.
  
  Args:
      heatmaps (numpy.ndarray): The predicted heatmaps
      center (numpy.ndarray): The boxes center
      scale (numpy.ndarray): The scale factor
  
  Returns:
      preds: numpy.ndarray([batch_size, num_joints, 2]), keypoints coords
      maxvals: numpy.ndarray([batch_size, num_joints, 1]), the maximum confidence of the keypoints
docstr_tok: ["the","highest","heatvalue","location","with","a","quarter","offset","in","the","direction","from","the","highest","response","to","the","second","highest","response",".","Args",":","heatmaps","(","numpy.ndarray",")",":","The","predicted","heatmaps","center","(","numpy.ndarray",")",":","The","boxes","center","scale","(","numpy.ndarray",")",":","The","scale","factor","Returns",":","preds",":","numpy.ndarray","(","[","batch_size",",","num_joints",",","2","]",")",",","keypoints","coords","maxvals",":","numpy.ndarray","(","[","batch_size",",","num_joints",",","1","]",")",",","the","maximum","confidence","of","the","keypoints"]
code: def get_final_preds(self, heatmaps, center, scale, kernelsize=3):
      """the highest heatvalue location with a quarter offset in the
      direction from the highest response to the second highest response.
  
      Args:
          heatmaps (numpy.ndarray): The predicted heatmaps
          center (numpy.ndarray): The boxes center
          scale (numpy.ndarray): The scale factor
  
      Returns:
          preds: numpy.ndarray([batch_size, num_joints, 2]), keypoints coords
          maxvals: numpy.ndarray([batch_size, num_joints, 1]), the maximum confidence of the keypoints
      """
  
      coords, maxvals = self.get_max_preds(heatmaps)
  
      heatmap_height = heatmaps.shape[2]
      heatmap_width = heatmaps.shape[3]
  
      if self.use_dark:
          coords = self.dark_postprocess(heatmaps, coords, kernelsize)
      else:
          for n in range(coords.shape[0]):
              for p in range(coords.shape[1]):
                  hm = heatmaps[n][p]
                  px = int(math.floor(coords[n][p][0] + 0.5))
                  py = int(math.floor(coords[n][p][1] + 0.5))
                  if (
                      1 < px < heatmap_width - 1
                      and 1 < py < heatmap_height - 1
                  ):
                      diff = np.array(
                          [
                              hm[py][px + 1] - hm[py][px - 1],
                              hm[py + 1][px] - hm[py - 1][px],
                          ]
                      )
                      coords[n][p] += np.sign(diff) * 0.25
      preds = coords.copy()
  
      # Transform back
      for i in range(coords.shape[0]):
          preds[i] = transform_preds(
              coords[i],
              center[i],
              scale[i],
              [heatmap_width, heatmap_height],
          )
  
      return preds, maxvals
  
file_path: PaddleHub/modules/image/keypoint_detection/pp-tinypose/keypoint_postprocess.py
imports: import math
  import cv2
  import numpy
  from .keypoint_preprocess import get_affine_transform
label_desc: Use image node_id 7 for calling the HRNetPostProcess obj's underlying member method code with example usage: obj.get_final_preds(heatmaps, center, scale, kernelsize) and returns: preds,  maxvals