class_docstr: Tracker for OC-SORT.
  
  Args:
      motion (dict): Configuration of motion. Defaults to None.
      obj_score_thrs (float): Detection score threshold for matching objects.
          Defaults to 0.3.
      init_track_thr (float): Detection score threshold for initializing a
          new tracklet. Defaults to 0.7.
      weight_iou_with_det_scores (bool): Whether using detection scores to
          weight IOU which is used for matching. Defaults to True.
      match_iou_thr (float): IOU distance threshold for matching between two
          frames. Defaults to 0.3.
      num_tentatives (int, optional): Number of continuous frames to confirm
          a track. Defaults to 3.
      vel_consist_weight (float): Weight of the velocity consistency term in
          association (OCM term in the paper).
      vel_delta_t (int): The difference of time step for calculating of the
          velocity direction of tracklets.
      init_cfg (dict or list[dict], optional): Initialization config dict.
          Defaults to None.
docstr: Once a track is recovered from being lost, online smooth its
  parameters to fix the error accumulated during being lost.
  
  NOTE: you can use different virtual trajectory generation
  strategies, we adopt the naive linear interpolation as default
docstr_tok: ["Once","a","track","is","recovered","from","being","lost",",","online","smooth","its","parameters","to","fix","the","error","accumulated","during","being","lost",".","NOTE",":","you","can","use","different","virtual","trajectory","generation","strategies",",","we","adopt","the","naive","linear","interpolation","as","default"]
code: def online_smooth(self, track: Dict, obj: torch.Tensor):
      """Once a track is recovered from being lost, online smooth its
      parameters to fix the error accumulated during being lost.
  
      NOTE: you can use different virtual trajectory generation
      strategies, we adopt the naive linear interpolation as default
      """
      last_match_bbox = self.last_obs(track)
      new_match_bbox = obj
      unmatch_len = 0
      for bbox in track.obs[::-1]:
          if bbox is None:
              unmatch_len += 1
          else:
              break
      bbox_shift_per_step = (new_match_bbox - last_match_bbox) / (
          unmatch_len + 1
      )
      track.mean = track.saved_attr.mean
      track.covariance = track.saved_attr.covariance
      for i in range(unmatch_len):
          virtual_bbox = last_match_bbox + (i + 1) * bbox_shift_per_step
          virtual_bbox = bbox_xyxy_to_cxcyah(virtual_bbox[None, :])
          virtual_bbox = virtual_bbox.squeeze(0).cpu().numpy()
          track.mean, track.covariance = self.kf.update(
              track.mean, track.covariance, virtual_bbox
          )
  
imports: from typing import List, Optional, Tuple
  import numpy
  import torch
  from addict import Dict
  from mmengine.structures import InstanceData
  from mmdet.registry import MODELS
  from mmdet.structures import DetDataSample
  from mmdet.structures.bbox import bbox_cxcyah_to_xyxy, bbox_overlaps, bbox_xyxy_to_cxcyah
  from .sort_tracker import SORTTracker
label_desc: Use image node_id 11 for calling the OCSORTTracker obj's underlying member method code with example usage: obj.online_smooth(track, obj) without return types