code: def postprocess(
      confidence_out,
      org_im,
      org_im_path,
      detected_faces,
      output_dir,
      visualization,
  ):
      """
      Postprocess output of network. one element at a time.
  
      Args:
          confidence_out (numpy.ndarray): confidences of each label.
          org_im (numpy.ndarray): original image.
          org_im_path (list): path of original image.
          detected_faces (list): faces detected in a picture.
          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]): 6 keys, where
                  'label' is `MASK` or `NO MASK`,
                  'left', 'top', 'right', 'bottom' are the coordinate of detection bounding box,
                  'confidence' is the confidence of mask detection.
              path (str): The path of original image.
      """
      output = dict()
      output["data"] = list()
      output["path"] = org_im_path
  
      for index, face in enumerate(detected_faces):
          label_idx = np.argmax(confidence_out[index])
          label_confidence = confidence_out[index][label_idx]
          bbox = dict()
          bbox["label"] = label_list[label_idx]
          bbox["confidence"] = label_confidence
          bbox["top"] = detected_faces[index]["top"]
          bbox["bottom"] = detected_faces[index]["bottom"]
          bbox["left"] = detected_faces[index]["left"]
          bbox["right"] = detected_faces[index]["right"]
          output["data"].append(bbox)
  
      if visualization:
          check_dir(output_dir)
          save_im_path = get_save_image_name(
              org_im, org_im_path, output_dir
          )
          cv2.imwrite(save_im_path, org_im)
          draw_bounding_box_on_image(save_im_path, output["data"])
  
      return output
  
file_path: PaddleHub/modules/image/face_detection/pyramidbox_lite_mobile_mask/processor.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import base64
  import os
  import time
  import cv2
  import numpy
  from PIL import Image
  from PIL import ImageDraw
label_desc: Use image node_id 5 for calling a global function with example usage: postprocess(confidence_out, org_im, org_im_path, detected_faces, output_dir, visualization) and returns: output