code: def convert_mot_to_det(tlwhs, scores):
      results = {}
      num_mot = len(tlwhs)
      xyxys = copy.deepcopy(tlwhs)
      for xyxy in xyxys.copy():
          xyxy[2:] = xyxy[2:] + xyxy[:2]
      # support single class now
      results["boxes"] = np.vstack(
          [np.hstack([0, scores[i], xyxys[i]]) for i in range(num_mot)]
      )
      results["boxes_num"] = np.array([num_mot])
      return results
  
imports: import os
  import json
  import cv2
  import math
  import numpy
  import paddle
  import yaml
  import copy
  from collections import defaultdict
  from mot_keypoint_unite_utils import argsparser
  from preprocess import decode_image
  from infer import print_arguments, get_test_images, bench_log
  from mot_sde_infer import SDE_Detector
  from mot_jde_infer import JDE_Detector, MOT_JDE_SUPPORT_MODELS
  from keypoint_infer import KeyPointDetector, KEYPOINT_SUPPORT_MODELS
  from det_keypoint_unite_infer import predict_with_given_det
  from visualize import visualize_pose
  from benchmark_utils import PaddleInferBenchmark
  from utils import get_current_memory_mb
  from keypoint_postprocess import translate_to_ori_images
  import sys
  from pptracking.python.mot.visualize import plot_tracking, plot_tracking_dict
  from pptracking.python.mot.utils import MOTTimer
label_desc: Use image node_id 1 for calling a global function with example usage: convert_mot_to_det(tlwhs, scores) and returns: results