code: def postprocess(
      out_heatmaps,
      org_im,
      org_im_shape,
      org_im_path,
      output_dir,
      visualization,
  ):
      """
      Postprocess output of network. one image at a time.
  
      Args:
          out_heatmaps (numpy.ndarray): output of network.
          org_im (numpy.ndarray): original image.
          org_im_shape (list): shape pf original image.
          org_im_path (list): path of riginal image.
          output_dir (str): output directory to store image.
          visualization (bool): whether to save image or not.
  
      Returns:
          res (dict): Output of postprocess. keys contains 'path', 'data', the corresponding valus are:
              path (str): the path of original image.
              data (OrderedDict): The key points of human pose.
      """
      res = dict()
      res["path"] = org_im_path
      res["data"] = OrderedDict()
      preds, num_joints = predict_results(out_heatmaps)
      scale_horizon = org_im_shape[1] * 1.0 / 384
      scale_vertical = org_im_shape[0] * 1.0 / 384
      preds = np.multiply(
          preds, (scale_horizon, scale_vertical)
      ).astype(int)
      if visualization:
          icolor = (255, 137, 0)
          ocolor = (138, 255, 0)
          rendered_im = org_im.copy()
          for j in range(num_joints):
              x, y = preds[j]
              cv2.circle(rendered_im, (x, y), 3, icolor, -1, 16)
              cv2.circle(rendered_im, (x, y), 6, ocolor, 1, 16)
          check_dir(output_dir)
          save_im_name = get_save_image_name(
              org_im, org_im_path, output_dir
          )
          cv2.imwrite(save_im_name, rendered_im)
          print("image saved in {}".format(save_im_name))
  
      # articulation
      preds = list(map(lambda pred: [int(_) for _ in pred], preds))
      res["data"]["left_ankle"] = list(preds[0])
      res["data"]["left_knee"] = list(preds[1])
      res["data"]["left_hip"] = list(preds[2])
      res["data"]["right_hip"] = list(preds[3])
      res["data"]["right_knee"] = list(preds[4])
      res["data"]["right_ankle"] = list(preds[5])
      res["data"]["pelvis"] = list(preds[6])
      res["data"]["thorax"] = list(preds[7])
      res["data"]["upper_neck"] = list(preds[8])
      res["data"]["head_top"] = list(preds[9])
      res["data"]["right_wrist"] = list(preds[10])
      res["data"]["right_elbow"] = list(preds[11])
      res["data"]["right_shoulder"] = list(preds[12])
      res["data"]["left_shoulder"] = list(preds[13])
      res["data"]["left_elbow"] = list(preds[14])
      res["data"]["left_wrist"] = list(preds[15])
  
      return res
  
file_path: PaddleHub/modules/image/keypoint_detection/human_pose_estimation_resnet50_mpii/processor.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import base64
  import os
  import time
  from collections import OrderedDict
  import cv2
  import numpy
label_desc: Use image node_id 4 for calling a global function with example usage: postprocess(out_heatmaps, org_im, org_im_shape, org_im_path, output_dir, visualization) and returns: res