code: def plot_detections(
      image, tlbrs, scores=None, color=(255, 0, 0), ids=None
  ):
      im = np.copy(image)
      text_scale = max(1, image.shape[1] / 800.0)
      thickness = 2 if text_scale > 1.3 else 1
      for i, det in enumerate(tlbrs):
          x1, y1, x2, y2 = np.asarray(det[:4], dtype=np.int)
          if len(det) >= 7:
              label = "det" if det[5] > 0 else "trk"
              if ids is not None:
                  text = "{}# {:.2f}: {:d}".format(
                      label, det[6], ids[i]
                  )
                  cv2.putText(
                      im,
                      text,
                      (x1, y1 + 30),
                      cv2.FONT_HERSHEY_PLAIN,
                      text_scale,
                      (0, 255, 255),
                      thickness=thickness,
                  )
              else:
                  text = "{}# {:.2f}".format(label, det[6])
  
          if scores is not None:
              text = "{:.2f}".format(scores[i])
              cv2.putText(
                  im,
                  text,
                  (x1, y1 + 30),
                  cv2.FONT_HERSHEY_PLAIN,
                  text_scale,
                  (0, 255, 255),
                  thickness=thickness,
              )
  
          cv2.rectangle(im, (x1, y1), (x2, y2), color, 2)
      return im
  
file_path: PaddleHub/modules/video/multiple_object_tracking/jde_darknet53/modeling/mot/visualization.py
imports: import cv2
  import numpy
label_desc: Use image node_id 6 for calling a global function with example usage: plot_detections(image, tlbrs, scores, color, ids) and returns: im