class_docstr: DeepSORT tracker
  
  Args:
      input_size (list): input feature map size to reid model, [h, w] format,
          [64, 192] as default.
      min_box_area (int): min box area to filter out low quality boxes
      vertical_ratio (float): w/h, the vertical ratio of the bbox to filter
          bad results, set 1.6 default for pedestrian tracking. If set <=0
          means no need to filter bboxes.
      budget (int): If not None, fix samples per class to at most this number.
          Removes the oldest samples when the budget is reached.
      max_age (int): maximum number of missed misses before a track is deleted
      n_init (float): Number of frames that a track remains in initialization
          phase. Number of consecutive detections before the track is confirmed. 
          The track state is set to `Deleted` if a miss occurs within the first 
          `n_init` frames.
      metric_type (str): either "euclidean" or "cosine", the distance metric 
          used for measurement to track association.
      matching_threshold (float): samples with larger distance are 
          considered an invalid match.
      max_iou_distance (float): max iou distance threshold
      motion (object): KalmanFilter instance
class_docstr_tok: ["DeepSORT","tracker","Args",":","input_size","(","list",")",":","input","feature","map","size","to","reid","model",",","[","h",",","w","]","format",",","[","64",",","192","]","as","default",".","min_box_area","(","int",")",":","min","box","area","to","filter","out","low","quality","boxes","vertical_ratio","(","float",")",":","w\/h",",","the","vertical","ratio","of","the","bbox","to","filter","bad","results",",","set","1.6","default","for","pedestrian","tracking",".","If","set","<","=0","means","no","need","to","filter","bboxes",".","budget","(","int",")",":","If","not","None",",","fix","samples","per","class","to","at","most","this","number",".","Removes","the","oldest","samples","when","the","budget","is","reached",".","max_age","(","int",")",":","maximum","number","of","missed","misses","before","a","track","is","deleted","n_init","(","float",")",":","Number","of","frames","that","a","track","remains","in","initialization","phase",".","Number","of","consecutive","detections","before","the","track","is","confirmed",".","The","track","state","is","set","to","`","Deleted","`","if","a","miss","occurs","within","the","first","`","n_init","`","frames",".","metric_type","(","str",")",":","either","``","euclidean","''","or","``","cosine","''",",","the","distance","metric","used","for","measurement","to","track","association",".","matching_threshold","(","float",")",":","samples","with","larger","distance","are","considered","an","invalid","match",".","max_iou_distance","(","float",")",":","max","iou","distance","threshold","motion","(","object",")",":","KalmanFilter","instance"]
docstr: Perform measurement update and track management.
  Args:
      pred_dets (np.array): Detection results of the image, the shape is
          [N, 6], means 'cls_id, score, x0, y0, x1, y1'.
      pred_embs (np.array): Embedding results of the image, the shape is
          [N, 128], usually pred_embs.shape[1] is a multiple of 128.
docstr_tok: ["Perform","measurement","update","and","track","management",".","Args",":","pred_dets","(","np.array",")",":","Detection","results","of","the","image",",","the","shape","is","[","N",",","6","]",",","means","'cls_id",",","score",",","x0",",","y0",",","x1",",","y1","'",".","pred_embs","(","np.array",")",":","Embedding","results","of","the","image",",","the","shape","is","[","N",",","128","]",",","usually","pred_embs.shape","[","1","]","is","a","multiple","of","128","."]
code: def update(self, pred_dets, pred_embs):
      """
      Perform measurement update and track management.
      Args:
          pred_dets (np.array): Detection results of the image, the shape is
              [N, 6], means 'cls_id, score, x0, y0, x1, y1'.
          pred_embs (np.array): Embedding results of the image, the shape is
              [N, 128], usually pred_embs.shape[1] is a multiple of 128.
      """
      pred_cls_ids = pred_dets[:, 0:1]
      pred_scores = pred_dets[:, 1:2]
      pred_xyxys = pred_dets[:, 2:6]
      pred_tlwhs = np.concatenate(
          (
              pred_xyxys[:, 0:2],
              pred_xyxys[:, 2:4] - pred_xyxys[:, 0:2] + 1,
          ),
          axis=1,
      )
  
      detections = [
          Detection(tlwh, score, feat, cls_id)
          for tlwh, score, feat, cls_id in zip(
              pred_tlwhs, pred_scores, pred_embs, pred_cls_ids
          )
      ]
  
      # Run matching cascade.
      matches, unmatched_tracks, unmatched_detections = self._match(
          detections
      )
  
      # Update track set.
      for track_idx, detection_idx in matches:
          self.tracks[track_idx].update(
              self.motion, detections[detection_idx]
          )
      for track_idx in unmatched_tracks:
          self.tracks[track_idx].mark_missed()
      for detection_idx in unmatched_detections:
          self._initiate_track(detections[detection_idx])
      self.tracks = [t for t in self.tracks if not t.is_deleted()]
  
      # Update distance metric.
      active_targets = [
          t.track_id for t in self.tracks if t.is_confirmed()
      ]
      features, targets = [], []
      for track in self.tracks:
          if not track.is_confirmed():
              continue
          features += track.features
          targets += [track.track_id for _ in track.features]
          track.features = []
      self.metric.partial_fit(
          np.asarray(features), np.asarray(targets), active_targets
      )
      output_stracks = self.tracks
      return output_stracks
  
file_path: PaddleDetection/deploy/pptracking/python/mot/tracker/deepsort_tracker.py
imports: import numpy
  from ..motion import KalmanFilter
  from ..matching.deepsort_matching import NearestNeighborDistanceMetric
  from ..matching.deepsort_matching import iou_cost, min_cost_matching, matching_cascade, gate_cost_matrix
  from .base_sde_tracker import Track
  from ..utils import Detection
label_desc: Use image node_id 3 for calling the DeepSORTTracker obj's underlying member method code with example usage: obj.update(pred_dets, pred_embs) and returns: output_stracks