code: def postprocess(
      data_out,
      org_im,
      org_im_path,
      org_im_width,
      org_im_height,
      output_dir,
      visualization,
      score_thresh,
  ):
      """
      Postprocess output of network. one image at a time.
  
      Args:
          data_out (numpy.ndarray): output of network.
          org_im: (PIL.Image object): original image.
          org_im_path (str): path of original image.
          org_im_width (int): width of original image.
          org_im_height (int): height of original image.
          output_dir (str): output directory to store image.
          visualization (bool): whether to save image or not.
  
      Returns:
          output (dict): keys are 'data' and 'path', the correspoding values are:
              data (list[dict]): 5 keys, where
                  'left', 'top', 'right', 'bottom' are the coordinate of detection bounding box,
                  'confidence' is the confidence this bbox.
              path (str): The path of original image.
      """
      output = dict()
      output["data"] = list()
      output["path"] = org_im_path
  
      if data_out.shape[0] == 0:
          print("No face detected in {}".format(org_im_path))
      else:
          det_conf = data_out[:, 1]
          det_xmin = org_im_width * data_out[:, 2]
          det_ymin = org_im_height * data_out[:, 3]
          det_xmax = org_im_width * data_out[:, 4]
          det_ymax = org_im_height * data_out[:, 5]
          dets = np.column_stack(
              (det_xmin, det_ymin, det_xmax, det_ymax, det_conf)
          )
          keep_index = np.where(dets[:, 4] >= score_thresh)[0]
          dets = dets[keep_index, :]
  
          if dets.shape[0] == 0:
              print("No face detected in {}".format(org_im_path))
          else:
              for detect_face in dets:
                  dt_i = dict()
                  dt_i["left"] = float(detect_face[0])
                  dt_i["top"] = float(detect_face[1])
                  dt_i["right"] = float(detect_face[2])
                  dt_i["bottom"] = float(detect_face[3])
                  dt_i["confidence"] = float(detect_face[4])
                  output["data"].append(dt_i)
  
          if visualization:
              check_dir(output_dir)
              draw_bboxes(org_im, dets[:, 0:4], org_im_path, output_dir)
      return output
  
file_path: PaddleHub/modules/image/face_detection/pyramidbox_face_detection/processor.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import time
  import base64
  import cv2
  import numpy
  from PIL import ImageDraw
label_desc: Use image node_id 5 for calling a global function with example usage: postprocess(data_out, org_im, org_im_path, org_im_width, org_im_height, output_dir, visualization, score_thresh) and returns: output