code: def get_gt_pred_pairs(
      gt_dir,
      pred_dir,
      gt_prefix="gt_",
      pred_prefix="pred_",
      iou_thresh=0.5,
  ):
      gt_files = os.listdir(gt_dir)
      pred_files = os.listdir(pred_dir)
  
      gt_name_dict = {
          x[len(gt_prefix) :]: x
          for x in gt_files
          if x.startswith(gt_prefix)
      }
      pred_name_dict = {
          x[len(pred_prefix) :]: x
          for x in pred_files
          if x.startswith(pred_prefix)
      }
  
      pairs = [
          (
              x,
              os.path.join(gt_dir, gt_name_dict[x]),
              os.path.join(pred_dir, pred_name_dict[x]),
              iou_thresh,
          )
          for x in gt_name_dict
          if x in pred_name_dict
      ]
      return pairs
  
file_path: gluon-cv/scripts/tracking/smot/helper.py
imports: import motmetrics
  import numpy
  import os
  import sys
label_desc: Use image node_id 1 for calling a global function with example usage: get_gt_pred_pairs(gt_dir, pred_dir, gt_prefix, pred_prefix, iou_thresh) and returns: pairs