Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to predict over multiple frames when detections are missing #55

Open
ChrGri opened this issue Nov 28, 2018 · 1 comment
Open

How to predict over multiple frames when detections are missing #55

ChrGri opened this issue Nov 28, 2018 · 1 comment

Comments

@ChrGri
Copy link

ChrGri commented Nov 28, 2018

First let me thank the programmer for this code. This helped me a lot getting my application to work. Howerver, I noticed an immediate track killing after a single missed detection. As can be seen in the issue tracker, it was mentioned by some people before.

To investigate the problem, I noticed the code snipped in the prediction routine which is follows:
if(self.time_since_update>0):
self.hit_streak = 0

To my eyes, it is in conflict with the following if statement in the update routine:
if((trk.time_since_update < 1) and (trk.hit_streak >= self.min_hits or self.frame_count <= self.min_hits)):
ret.append(np.concatenate((d,[trk.id+1])).reshape(1,-1)) # +1 as MOT benchmark requires positive
i -= 1
#remove dead tracklet
if(trk.time_since_update > self.max_age):
self.trackers.pop(i)

So I commented the "hit_streak = 0" part out and now the tracker is able to predict over self.max_age frames as I would expect it to work.

Regards,
Christopher

@cygerts
Copy link

cygerts commented Mar 9, 2019

Change
if((trk.time_since_update < 1) and (trk.hit_streak >= self.min_hits or self.frame_count <= self.min_hits)):
to
if ((trk.time_since_update <= self.max_age) and (trk.hits >= self.min_hits or self.frame_count <= self.min_hits)):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants