class_docstr: InferenceEngine
  
  Inference engina class which contains preprocess, run, postprocess
class_docstr_tok: ["InferenceEngine","Inference","engina","class","which","contains","preprocess",",","run",",","postprocess"]
docstr: postprocess
  Postprocess to the inference engine output.
  Args:
      x: Inference engine output.
  Returns: Output data after argmax.
docstr_tok: ["postprocess","Postprocess","to","the","inference","engine","output",".","Args",":","x",":","Inference","engine","output",".","Returns",":","Output","data","after","argmax","."]
code: def postprocess(self, x, shape_info, is_output_polygon):
      """postprocess
      Postprocess to the inference engine output.
      Args:
          x: Inference engine output.
      Returns: Output data after argmax.
      """
      box_list, score_list = self.post_process(
          shape_info, x, is_output_polygon=is_output_polygon
      )
      box_list, score_list = box_list[0], score_list[0]
      if len(box_list) > 0:
          if is_output_polygon:
              idx = [x.sum() > 0 for x in box_list]
              box_list = [box_list[i] for i, v in enumerate(idx) if v]
              score_list = [
                  score_list[i] for i, v in enumerate(idx) if v
              ]
          else:
              idx = (
                  box_list.reshape(box_list.shape[0], -1).sum(axis=1)
                  > 0
              )  # 去掉全为0的框
              box_list, score_list = box_list[idx], score_list[idx]
      else:
          box_list, score_list = [], []
      return box_list, score_list
  
imports: import os
  import sys
  import pathlib
  import cv2
  import paddle
  from paddle import inference
  import numpy
  from PIL import Image
  from paddle.vision import transforms
  from tools.predict import resize_image
  from post_processing import get_post_processing
  from utils.util import draw_bbox, save_result
label_desc: Use image node_id 4 for calling the InferenceEngine obj's underlying member method code with example usage: obj.postprocess(x, shape_info, is_output_polygon) and returns: box_list,  score_list