class_docstr: Tracker for StrongSORT.
  
  Args:
      obj_score_thr (float, optional): Threshold to filter the objects.
          Defaults to 0.6.
      motion (dict): Configuration of motion. Defaults to None.
      reid (dict, optional): Configuration for the ReID model.
          - num_samples (int, optional): Number of samples to calculate the
              feature embeddings of a track. Default to None.
          - image_scale (tuple, optional): Input scale of the ReID model.
              Default to (256, 128).
          - img_norm_cfg (dict, optional): Configuration to normalize the
              input. Default to None.
          - match_score_thr (float, optional): Similarity threshold for the
              matching process. Default to 0.3.
          - motion_weight (float, optional): the weight of the motion cost.
              Defaults to 0.02.
      match_iou_thr (float, optional): Threshold of the IoU matching process.
          Defaults to 0.7.
      num_tentatives (int, optional): Number of continuous frames to confirm
          a track. Defaults to 2.
class_docstr_tok: ["Tracker","for","StrongSORT",".","Args",":","obj_score_thr","(","float",",","optional",")",":","Threshold","to","filter","the","objects",".","Defaults","to","0.6.","motion","(","dict",")",":","Configuration","of","motion",".","Defaults","to","None",".","reid","(","dict",",","optional",")",":","Configuration","for","the","ReID","model",".","-","num_samples","(","int",",","optional",")",":","Number","of","samples","to","calculate","the","feature","embeddings","of","a","track",".","Default","to","None",".","-","image_scale","(","tuple",",","optional",")",":","Input","scale","of","the","ReID","model",".","Default","to","(","256",",","128",")",".","-","img_norm_cfg","(","dict",",","optional",")",":","Configuration","to","normalize","the","input",".","Default","to","None",".","-","match_score_thr","(","float",",","optional",")",":","Similarity","threshold","for","the","matching","process",".","Default","to","0.3",".","-","motion_weight","(","float",",","optional",")",":","the","weight","of","the","motion","cost",".","Defaults","to","0.02.","match_iou_thr","(","float",",","optional",")",":","Threshold","of","the","IoU","matching","process",".","Defaults","to","0.7.","num_tentatives","(","int",",","optional",")",":","Number","of","continuous","frames","to","confirm","a","track",".","Defaults","to","2","."]
docstr: Update a track.
docstr_tok: ["Update","a","track","."]
code: def update_track(self, id: int, obj: Tuple[Tensor]) -> None:
      """Update a track."""
      for k, v in zip(self.memo_items, obj):
          v = v[None]
          if self.momentums is not None and k in self.momentums:
              m = self.momentums[k]
              self.tracks[id][k] = (1 - m) * self.tracks[id][k] + m * v
          else:
              self.tracks[id][k].append(v)
  
      if self.tracks[id].tentative:
          if len(self.tracks[id]["bboxes"]) >= self.num_tentatives:
              self.tracks[id].tentative = False
      bbox = bbox_xyxy_to_cxcyah(
          self.tracks[id].bboxes[-1]
      )  # size = (1, 4)
      assert bbox.ndim == 2 and bbox.shape[0] == 1
      bbox = bbox.squeeze(0).cpu().numpy()
      score = float(self.tracks[id].scores[-1].cpu())
      self.tracks[id].mean, self.tracks[id].covariance = self.kf.update(
          self.tracks[id].mean, self.tracks[id].covariance, bbox, score
      )
  
file_path: mmdetection/mmdet/models/trackers/strongsort_tracker.py
imports: from typing import Optional, Tuple
  import numpy
  import torch
  from mmengine.structures import InstanceData
  from torch import Tensor
  from mmdet.models.utils import imrenormalize
  from mmdet.registry import MODELS
  from mmdet.structures import TrackDataSample
  from mmdet.structures.bbox import bbox_overlaps, bbox_xyxy_to_cxcyah
  from mmdet.utils import OptConfigType
  from .sort_tracker import SORTTracker
label_desc: Use image node_id 2 for calling the StrongSORTTracker obj's underlying member method code with example usage: obj.update_track(id, obj) without return types