class_docstr: ReID of SDE methods
  
  Args:
      pred_config (object): config of model, defined by `Config(model_dir)`
      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/NPU, default is CPU
      run_mode (str): mode of running(paddle/trt_fp32/trt_fp16)
      batch_size (int): size of per batch in inference, default 50 means at most
          50 sub images can be made a batch and send into ReID model
      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 open MKLDNN
class_docstr_tok: ["ReID","of","SDE","methods","Args",":","pred_config","(","object",")",":","config","of","model",",","defined","by","`","Config","(","model_dir",")","`","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\/NPU",",","default","is","CPU","run_mode","(","str",")",":","mode","of","running","(","paddle\/trt_fp32\/trt_fp16",")","batch_size","(","int",")",":","size","of","per","batch","in","inference",",","default","50","means","at","most","50","sub","images","can","be","made","a","batch","and","send","into","ReID","model","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","open","MKLDNN"]
code: def predict(self, crops, repeats=1, add_timer=True, seq_name=""):
      # preprocess
      if add_timer:
          self.det_times.preprocess_time_s.start()
      inputs = self.preprocess(crops)
      input_names = self.predictor.get_input_names()
      for i in range(len(input_names)):
          input_tensor = self.predictor.get_input_handle(input_names[i])
          input_tensor.copy_from_cpu(inputs[input_names[i]])
  
      if add_timer:
          self.det_times.preprocess_time_s.end()
          self.det_times.inference_time_s.start()
  
      # model prediction
      for i in range(repeats):
          self.predictor.run()
          output_names = self.predictor.get_output_names()
          feature_tensor = self.predictor.get_output_handle(
              output_names[0]
          )
          pred_embs = feature_tensor.copy_to_cpu()
      if add_timer:
          self.det_times.inference_time_s.end(repeats=repeats)
          self.det_times.postprocess_time_s.start()
  
      if add_timer:
          self.det_times.postprocess_time_s.end()
          self.det_times.img_num += 1
      return pred_embs
  
file_path: PaddleDetection/deploy/pipeline/pphuman/reid.py
imports: import os
  import sys
  import cv2
  import numpy
  from python.infer import PredictConfig
  from pptracking.python.det_infer import load_predictor
  from python.utils import Timer
label_desc: Use image node_id 8 for calling the ReID obj's underlying member method code with example usage: obj.predict(crops, repeats, add_timer, seq_name) and returns: pred_embs