code: def VisualDataset(datasetPath, phase="train", seqName="", frameId=1):
      trainPath = osp.join(datasetPath, "labels_with_ids", phase)
      seq1Paths = osp.join(trainPath, seqName)
      seq_img1_path = osp.join(seq1Paths, "img1")
      label_with_idPath = (
          osp.join(seq_img1_path, "%07d" % frameId) + ".txt"
      )
      image_path = label_with_idPath.replace(
          "labels_with_ids", "images"
      ).replace(".txt", ".jpg")
      seqInfoPath = str.join("/", image_path.split("/")[:-2])
      seqInfoPath = seqInfoPath + "/seqinfo.ini"
      seq_info = open(seqInfoPath).read()
      width = int(
          seq_info[
              seq_info.find("imWidth=")
              + 8 : seq_info.find("\nimHeight")
          ]
      )
      height = int(
          seq_info[
              seq_info.find("imHeight=") + 9 : seq_info.find("\nimExt")
          ]
      )
  
      with open(label_with_idPath, "r") as label:
          allLines = label.readlines()
          images = cv2.imread(image_path)
          for line in allLines:
              line = line.split(" ")
              line = list(map(lambda x: float(x), line))
              c1, c2, w, h = line[2:6]
              x1 = c1 - w / 2
              x2 = c2 - h / 2
              x3 = c1 + w / 2
              x4 = c2 + h / 2
              cv2.rectangle(
                  images,
                  (int(x1 * width), int(x2 * height)),
                  (int(x3 * width), int(x4 * height)),
                  (255, 0, 0),
                  thickness=2,
              )
          cv2.imwrite("test.jpg", images)
  
file_path: PaddleDetection/configs/mot/pedestrian/tools/visdrone/visdrone2mot.py
imports: import glob
  import os
  import os.path
  import cv2
  import argparse
  import numpy
  import random
label_desc: Use image node_id 9 for calling a global function with example usage: VisualDataset(datasetPath, phase, seqName, frameId) without return types