code: def parse_dets(dets):
      outputs = defaultdict(list)
      for det in dets:
          det = det.strip().split(",")
          frame_id, ins_id = map(int, det[:2])
          assert ins_id == -1
          bbox = list(map(float, det[2:7]))
          # [x1, y1, x2, y2] to be consistent with mmdet
          bbox = [
              bbox[0],
              bbox[1],
              bbox[0] + bbox[2],
              bbox[1] + bbox[3],
              bbox[4],
          ]
          outputs[frame_id].append(bbox)
  
      return outputs
  
file_path: mmdetection/tools/dataset_converters/mot2coco.py
imports: import argparse
  import os
  import os.path
  from collections import defaultdict
  import mmengine
  import numpy
  from tqdm import tqdm
label_desc: Use image node_id 3 for calling a global function with example usage: parse_dets(dets) and returns: outputs