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: Estimate the direction vector given two batches of boxes.
docstr_tok: ["Estimate","the","direction","vector","given","two","batches","of","boxes","."]
code: def vel_direction_batch(
      self, bboxes1: torch.Tensor, bboxes2: torch.Tensor
  ):
      """Estimate the direction vector given two batches of boxes."""
      cx1, cy1 = (bboxes1[:, 0] + bboxes1[:, 2]) / 2.0, (
          bboxes1[:, 1] + bboxes1[:, 3]
      ) / 2.0
      cx2, cy2 = (bboxes2[:, 0] + bboxes2[:, 2]) / 2.0, (
          bboxes2[:, 1] + bboxes2[:, 3]
      ) / 2.0
      speed_diff_y = cy2[None, :] - cy1[:, None]
      speed_diff_x = cx2[None, :] - cx1[:, None]
      speed = torch.cat(
          (speed_diff_y[..., None], speed_diff_x[..., None]), dim=-1
      )
      norm = (
          torch.sqrt((speed[:, :, 0]) ** 2 + (speed[:, :, 1]) ** 2)
          + 1e-6
      )
      speed[:, :, 0] /= norm
      speed[:, :, 1] /= norm
      return speed
  
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 6 for calling the OCSORTTracker obj's underlying member method code with example usage: obj.vel_direction_batch(bboxes1, bboxes2) and returns: speed