code: def mot_run(self, lanes_res, det_res, frame_shape):
      det = det_res["boxes"]
      directions = lanes_res["directions"]
      lanes = lanes_res["output"]
      if len(directions) > 0:
          direction = directions[0]
      else:
          return [], self.fence_line
  
      if len(det) == 0:
          return [], self.fence_line
  
      traj_lines = []
      pos_dir_traj = []
      neg_dir_traj = []
      for i in range(len(det)):
          class_id = int(det[i][1])
          mot_id = int(det[i][0])
          traj_i = self.center_traj_retrograde[class_id][mot_id]
          if len(traj_i) < 2:
              continue
  
          traj_line = {
              "index": i,
              "mot_id": mot_id,
              "traj_line": [
                  traj_i[0][0],
                  traj_i[0][1],
                  traj_i[-1][0],
                  traj_i[-1][1],
              ],
          }
  
          if not self.is_move(traj_line["traj_line"], frame_shape):
              continue
          angle, angle_deviation = self.get_angle(
              traj_line["traj_line"]
          )
          if direction is not None and self.filter_horizontal_flag:
              if abs(angle_deviation - direction) > self.deviation:
                  continue
  
          traj_line["angle"] = angle
          traj_lines.append(traj_line)
  
          if self.fence_line is None:
              if angle >= 0:
                  pos_dir_traj.append(traj_line)
              else:
                  neg_dir_traj.append(traj_line)
  
      if len(traj_lines) == 0:
          return [], self.fence_line
  
      if self.fence_line is None:
          if len(pos_dir_traj) < 1 or len(neg_dir_traj) < 1:
              return [], None
  
          self.fence_line = self.init_fence_line(
              lanes, pos_dir_traj, neg_dir_traj, frame_shape
          )
          return [], self.fence_line
  
      else:
          retrograde_list = []
          for traj_line in traj_lines:
              if self.judge_retrograde(traj_line) == False:
                  retrograde_list.append(det[traj_line["index"]][0])
  
          return retrograde_list, self.fence_line
  
file_path: PaddleDetection/deploy/pipeline/ppvehicle/vehicle_retrograde.py
imports: import numpy
  import math
label_desc: Use image node_id 10 for calling the VehicleRetrogradeRecognizer obj's underlying member method code with example usage: obj.mot_run(lanes_res, det_res, frame_shape) and returns: list,  self, list,  self, list,  self, list,  self, retrograde_list,  self, list,  None