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 correction step.
  
  Args:
      mean (ndarray): The predicted state's mean vector (8 dimensional).
      covariance (ndarray): The state's covariance matrix (8x8
          dimensional).
      measurement (ndarray): The 4 dimensional measurement vector
          (x, y, a, h), where (x, y) is the center position, a the
          aspect ratio, and h the height of the bounding box.
      bbox_score (float): The confidence score of the bbox.
          Defaults to 0.
  
  Returns:
       (ndarray, ndarray): Returns the measurement-corrected state
       distribution.
docstr_tok: ["Run","Kalman","filter","correction","step",".","Args",":","mean","(","ndarray",")",":","The","predicted","state","'s","mean","vector","(","8","dimensional",")",".","covariance","(","ndarray",")",":","The","state","'s","covariance","matrix","(","8x8","dimensional",")",".","measurement","(","ndarray",")",":","The","4","dimensional","measurement","vector","(","x",",","y",",","a",",","h",")",",","where","(","x",",","y",")","is","the","center","position",",","a","the","aspect","ratio",",","and","h","the","height","of","the","bounding","box",".","bbox_score","(","float",")",":","The","confidence","score","of","the","bbox",".","Defaults","to","0",".","Returns",":","(","ndarray",",","ndarray",")",":","Returns","the","measurement-corrected","state","distribution","."]
code: def update(
      self,
      mean: np.array,
      covariance: np.array,
      measurement: np.array,
      bbox_score: float = 0.0,
  ) -> Tuple[np.array, np.array]:
      """Run Kalman filter correction step.
  
      Args:
          mean (ndarray): The predicted state's mean vector (8 dimensional).
          covariance (ndarray): The state's covariance matrix (8x8
              dimensional).
          measurement (ndarray): The 4 dimensional measurement vector
              (x, y, a, h), where (x, y) is the center position, a the
              aspect ratio, and h the height of the bounding box.
          bbox_score (float): The confidence score of the bbox.
              Defaults to 0.
  
      Returns:
           (ndarray, ndarray): Returns the measurement-corrected state
           distribution.
      """
      projected_mean, projected_cov = self.project(
          mean, covariance, bbox_score
      )
  
      chol_factor, lower = scipy.linalg.cho_factor(
          projected_cov, lower=True, check_finite=False
      )
      kalman_gain = scipy.linalg.cho_solve(
          (chol_factor, lower),
          np.dot(covariance, self._update_mat.T).T,
          check_finite=False,
      ).T
      innovation = measurement - projected_mean
  
      new_mean = mean + np.dot(innovation, kalman_gain.T)
      new_covariance = covariance - np.linalg.multi_dot(
          (kalman_gain, projected_cov, kalman_gain.T)
      )
      return new_mean, new_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 5 for calling the KalmanFilter obj's underlying member method code with example usage: obj.update(mean, covariance, measurement, bbox_score) and returns: new_mean,  new_covariance