Vehicle-Detection-and-Tracking icon indicating copy to clipboard operation
Vehicle-Detection-and-Tracking copied to clipboard

Question on Deal with matched detections in main.py?

Open tringn opened this issue 5 years ago • 1 comments

Hi @kcg2015, Thanks for your great work. I have a question on function Deal with matched detections in main.py. Assume in the 1st frame, there is no matched detections, then we will jump to if len(unmatched_dets) > 0:. It does the tmp_trk.predict_only() by using current detection (x = np.array([[z[0], 0, z[1], 0, z[2], 0, z[3], 0]]).T; tmp_trk.x_state = x). In the 2nd frame, I assume that all objects in 1st frame are matched to detections in 2nd frame, then we jump to if matched.size > 0, and do predict. However, in tmp_trk.kalman_filter(z), I saw that the code does predict then update with current detection info. I am confused because we already did predict when processing detection in the 1st frame? Can you clarify my confusion? I suppose that we should do update and then predict. Thank you so much.

tringn avatar Jan 18 '19 10:01 tringn

Hi @tringn, I agree with what you supposed. In the matched detection and tracker, I also think it should be update first followed by predict. Hi @kcg2015, Thanks for sharing you work and could you please clarify this if we are wrong?

mzhian avatar Apr 06 '19 08:04 mzhian