code: def read_data(opt):
      """
      Pre-process data
      --------------------
  
      Next we need a video or video frame
      if you want to test video frame, you can change opt.video_loader to False
      and opt.data-dir is your video frame path.
      meanwhile you need first frame object coordinates in opt.gt-bbox
      gt_bbox is first frame object coordinates, and it is bbox(center_x,center_y,weight,height)
      """
      video_frames = []
      if opt.video_loader:
          im_video = utils.download(opt.video_path)
          cap = cv2.VideoCapture(im_video)
          while True:
              ret, img = cap.read()
              if not ret:
                  break
              video_frames.append(img)
      else:
          for data in sorted(os.listdir(opt.data_dir)):
              video_frames.append(
                  cv2.imread(os.path.join(opt.data_dir, data))
              )
      return video_frames
  
file_path: gluon-cv/scripts/tracking/siamrpn/demo.py
imports: import os
  import argparse
  import matplotlib.pyplot
  import numpy
  import mxnet
  from gluoncv import model_zoo, utils
  from gluoncv.model_zoo.siamrpn.siamrpn_tracker import SiamRPNTracker
  from gluoncv.model_zoo.siamrpn.siamrpn_tracker import get_axis_aligned_bbox
  from gluoncv.utils.filesystem import try_import_cv2
label_desc: Use image node_id 2 for calling a global function with example usage: read_data(opt) and returns: video_frames