class_docstr: A simple Kalman filter for tracking bounding boxes in image space.
  
  The implementation is referred to https://github.com/nwojke/deep_sort.
  
  Args:
      center_only (bool): If True, distance computation is done with
          respect to the bounding box center position only.
          Defaults to False.
      use_nsa (bool): Whether to use the NSA (Noise Scale Adaptive) Kalman
          Filter, which adaptively modulates the noise scale according to
          the quality of detections. More details in
          https://arxiv.org/abs/2202.11983. Defaults to False.
class_docstr_tok: ["A","simple","Kalman","filter","for","tracking","bounding","boxes","in","image","space",".","The","implementation","is","referred","to","https",":","\/\/github.com\/nwojke\/deep_sort",".","Args",":","center_only","(","bool",")",":","If","True",",","distance","computation","is","done","with","respect","to","the","bounding","box","center","position","only",".","Defaults","to","False",".","use_nsa","(","bool",")",":","Whether","to","use","the","NSA","(","Noise","Scale","Adaptive",")","Kalman","Filter",",","which","adaptively","modulates","the","noise","scale","according","to","the","quality","of","detections",".","More","details","in","https",":","\/\/arxiv.org\/abs\/2202.11983",".","Defaults","to","False","."]
docstr: Create track from unassociated measurement.
  
  Args:
      measurement (ndarray):  Bounding box coordinates (x, y, a, h) with
      center position (x, y), aspect ratio a, and height h.
  
  Returns:
       (ndarray, ndarray): Returns the mean vector (8 dimensional) and
          covariance matrix (8x8 dimensional) of the new track.
          Unobserved velocities are initialized to 0 mean.
docstr_tok: ["Create","track","from","unassociated","measurement",".","Args",":","measurement","(","ndarray",")",":","Bounding","box","coordinates","(","x",",","y",",","a",",","h",")","with","center","position","(","x",",","y",")",",","aspect","ratio","a",",","and","height","h.","Returns",":","(","ndarray",",","ndarray",")",":","Returns","the","mean","vector","(","8","dimensional",")","and","covariance","matrix","(","8x8","dimensional",")","of","the","new","track",".","Unobserved","velocities","are","initialized","to","0","mean","."]
code: def initiate(
      self, measurement: np.array
  ) -> Tuple[np.array, np.array]:
      """Create track from unassociated measurement.
  
      Args:
          measurement (ndarray):  Bounding box coordinates (x, y, a, h) with
          center position (x, y), aspect ratio a, and height h.
  
      Returns:
           (ndarray, ndarray): Returns the mean vector (8 dimensional) and
              covariance matrix (8x8 dimensional) of the new track.
              Unobserved velocities are initialized to 0 mean.
      """
      mean_pos = measurement
      mean_vel = np.zeros_like(mean_pos)
      mean = np.r_[mean_pos, mean_vel]
  
      std = [
          2 * self._std_weight_position * measurement[3],
          2 * self._std_weight_position * measurement[3],
          1e-2,
          2 * self._std_weight_position * measurement[3],
          10 * self._std_weight_velocity * measurement[3],
          10 * self._std_weight_velocity * measurement[3],
          1e-5,
          10 * self._std_weight_velocity * measurement[3],
      ]
      covariance = np.diag(np.square(std))
      return mean, covariance
  
file_path: mmdetection/mmdet/models/task_modules/tracking/kalman_filter.py
imports: from typing import Tuple
  import numpy
  import torch
  from mmdet.registry import TASK_UTILS
label_desc: Use image node_id 2 for calling the KalmanFilter obj's underlying member method code with example usage: obj.initiate(measurement) and returns: mean,  covariance