class_docstr: A simple Kalman filter for tracking bounding boxes in image space.
  
  The 8-dimensional state space
  
      x, y, a, h, vx, vy, va, vh
  
  contains the bounding box center position (x, y), aspect ratio a, height h,
  and their respective velocities.
  
  Object motion follows a constant velocity model. The bounding box location
  (x, y, a, h) is taken as direct observation of the state space (linear
  observation model).
class_docstr_tok: ["A","simple","Kalman","filter","for","tracking","bounding","boxes","in","image","space",".","The","8-dimensional","state","space","x",",","y",",","a",",","h",",","vx",",","vy",",","va",",","vh","contains","the","bounding","box","center","position","(","x",",","y",")",",","aspect","ratio","a",",","height","h",",","and","their","respective","velocities",".","Object","motion","follows","a","constant","velocity","model",".","The","bounding","box","location","(","x",",","y",",","a",",","h",")","is","taken","as","direct","observation","of","the","state","space","(","linear","observation","model",")","."]
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:
      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",":","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):
      """
      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:
          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: PaddleHub/modules/video/multiple_object_tracking/fairmot_dla34/modeling/mot/motion/kalman_filter.py
imports: import numpy
  import scipy.linalg
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