Incorrect usage of Kalman filtering, because there is no speed information inputed:
self.tracks[i].prediction = self.tracks[i].KF.correct( detections[assignment[i]], 1 )
You should create KF_X and KF_Y filters for X and Y dimensions respectively, and use position and speed as input parameters. For example:
self.tracks[i].state_X = self.tracks[i].KF_X.correct( np.array([[x_observation], [x_speed]]), 1)
self.tracks[i].state_Y = self.tracks[i].KF_Y.correct( np.array([[y_observation], [y_speed]]), 1)
Incorrect usage of Kalman filtering, because there is no speed information inputed:
self.tracks[i].prediction = self.tracks[i].KF.correct( detections[assignment[i]], 1 )You should create KF_X and KF_Y filters for X and Y dimensions respectively, and use position and speed as input parameters. For example: