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: Run Kalman filter prediction step.
  
  Args:
      mean (ndarray): The 8 dimensional mean vector of the object
          state at the previous time step.
  
      covariance (ndarray): The 8x8 dimensional covariance matrix
          of the object state at the previous time step.
  
  Returns:
      (ndarray, ndarray): Returns the mean vector and covariance
          matrix of the predicted state. Unobserved velocities are
          initialized to 0 mean.
docstr_tok: ["Run","Kalman","filter","prediction","step",".","Args",":","mean","(","ndarray",")",":","The","8","dimensional","mean","vector","of","the","object","state","at","the","previous","time","step",".","covariance","(","ndarray",")",":","The","8x8","dimensional","covariance","matrix","of","the","object","state","at","the","previous","time","step",".","Returns",":","(","ndarray",",","ndarray",")",":","Returns","the","mean","vector","and","covariance","matrix","of","the","predicted","state",".","Unobserved","velocities","are","initialized","to","0","mean","."]
code: def predict(
      self, mean: np.array, covariance: np.array
  ) -> Tuple[np.array, np.array]:
      """Run Kalman filter prediction step.
  
      Args:
          mean (ndarray): The 8 dimensional mean vector of the object
              state at the previous time step.
  
          covariance (ndarray): The 8x8 dimensional covariance matrix
              of the object state at the previous time step.
  
      Returns:
          (ndarray, ndarray): Returns the mean vector and covariance
              matrix of the predicted state. Unobserved velocities are
              initialized to 0 mean.
      """
      std_pos = [
          self._std_weight_position * mean[3],
          self._std_weight_position * mean[3],
          1e-2,
          self._std_weight_position * mean[3],
      ]
      std_vel = [
          self._std_weight_velocity * mean[3],
          self._std_weight_velocity * mean[3],
          1e-5,
          self._std_weight_velocity * mean[3],
      ]
      motion_cov = np.diag(np.square(np.r_[std_pos, std_vel]))
  
      mean = np.dot(self._motion_mat, mean)
      covariance = (
          np.linalg.multi_dot(
              (self._motion_mat, covariance, self._motion_mat.T)
          )
          + motion_cov
      )
  
      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 3 for calling the KalmanFilter obj's underlying member method code with example usage: obj.predict(mean, covariance) and returns: mean,  covariance