class_docstr: Args:
      model_dir (str): root path of model.pdiparams, model.pdmodel and infer_cfg.yml
      device (str): Choose the device you want to run, it can be: CPU/GPU/XPU, default is CPU
      run_mode (str): mode of running(paddle/trt_fp32/trt_fp16)
      batch_size (int): size of pre batch in inference
      trt_min_shape (int): min shape for dynamic shape in trt
      trt_max_shape (int): max shape for dynamic shape in trt
      trt_opt_shape (int): opt shape for dynamic shape in trt
      trt_calib_mode (bool): If the model is produced by TRT offline quantitative
          calibration, trt_calib_mode need to set True
      cpu_threads (int): cpu threads
      enable_mkldnn (bool): whether to turn on MKLDNN
      enable_mkldnn_bfloat16 (bool): whether to turn on MKLDNN_BFLOAT16
docstr: Args:
      repeats (int): repeat number for prediction
  Returns:
      result (dict): include 'boxes': np.ndarray: shape:[N,6], N: number of box,
                      matix element:[class, score, x_min, y_min, x_max, y_max]
docstr_tok: ["Args",":","repeats","(","int",")",":","repeat","number","for","prediction","Returns",":","result","(","dict",")",":","include","'boxes","'",":","np.ndarray",":","shape",":","[","N,6","]",",","N",":","number","of","box",",","matix","element",":","[","class",",","score",",","x_min",",","y_min",",","x_max",",","y_max","]"]
code: def predict(self, repeats=1, run_benchmark=False):
      """
      Args:
          repeats (int): repeat number for prediction
      Returns:
          result (dict): include 'boxes': np.ndarray: shape:[N,6], N: number of box,
                          matix element:[class, score, x_min, y_min, x_max, y_max]
      """
      lanes_list = []
  
      if run_benchmark:
          for i in range(repeats):
              self.predictor.run()
              paddle.device.cuda.synchronize()
          result = dict(lanes=lanes_list)
          return result
  
      for i in range(repeats):
          # TODO: check the output of predictor
          self.predictor.run()
          lanes_list.clear()
          output_names = self.predictor.get_output_names()
          num_outs = int(len(output_names) / 2)
          if num_outs == 0:
              lanes_list.append([])
          for out_idx in range(num_outs):
              lanes_list.append(
                  self.predictor.get_output_handle(
                      output_names[out_idx]
                  ).copy_to_cpu()
              )
      result = dict(lanes=lanes_list)
      return result
  
imports: import os
  import yaml
  import glob
  import json
  from pathlib import Path
  from functools import reduce
  import cv2
  import numpy
  import math
  import paddle
  from paddle.inference import Config
  from paddle.inference import create_predictor
  import sys
  from benchmark_utils import PaddleInferBenchmark
  from picodet_postprocess import PicoDetPostProcess
  from preprocess import preprocess, Resize, NormalizeImage, Permute, PadStride, LetterBoxResize, WarpAffine, Pad, decode_image, CULaneResize
  from keypoint_preprocess import EvalAffine, TopDownEvalAffine, expand_crop
  from clrnet_postprocess import CLRNetPostProcess
  from visualize import visualize_box_mask, imshow_lanes
  from utils import argsparser, Timer, get_current_memory_mb, multiclass_nms, coco_clsid2catid
label_desc: Use image node_id 3 for calling the DetectorCLRNet obj's underlying member method code with example usage: obj.predict(repeats, run_benchmark) and returns: result, result