code: def get_det_res(
      self,
      bboxes,
      bbox_nums,
      image_id,
      label_to_cat_id_map,
      catid2name,
      imid2path,
      bias=0,
      score_thresh=0.0,
  ):
      det_res = []
      k = 0
      for i in range(len(bbox_nums)):
          cur_image_id = int(image_id[i][0])
          cur_image_path = imid2path[cur_image_id]
          det_nums = bbox_nums[i]
          for j in range(det_nums):
              dt = bboxes[k]
              k = k + 1
              num_id, score, xmin, ymin, xmax, ymax = dt.tolist()
              if int(num_id) < 0:
                  continue
              if score < score_thresh:
                  continue
              category_id = label_to_cat_id_map[int(num_id)]
              w = xmax - xmin + bias
              h = ymax - ymin + bias
              bbox = [xmin, ymin, w, h]
              dt_res = {
                  "image_id": cur_image_id,
                  "image_path": cur_image_path,
                  "category_id": category_id,
                  "category_name": catid2name[category_id],
                  "bbox": bbox,
                  "score": score,
                  "isNG": 1,
              }
              det_res.append(dt_res)
      return det_res
  
file_path: PaddleSeg/contrib/QualityInspector/qinspector/det/engine/predictor.py
imports: import typing
  from tqdm import tqdm
  from ppdet.core.workspace import create
  from ppdet.data.source.category import get_categories
  from ppdet.engine import Trainer
  from qinspector.utils.logger import setup_logger
label_desc: Use image node_id 2 for calling the Predictor obj's underlying member method code with example usage: obj.get_det_res(bboxes, bbox_nums, image_id, label_to_cat_id_map, catid2name, imid2path, bias, score_thresh) and returns: det_res