sort icon indicating copy to clipboard operation
sort copied to clipboard

How to predict over multiple frames when detections are missing

Open ChrGri opened this issue 7 years ago • 1 comments

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

ChrGri avatar Nov 28 '18 06:11 ChrGri

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)):

cygerts avatar Mar 09 '19 12:03 cygerts