ifzhang / ByteTrack

[ECCV 2022] ByteTrack: Multi-Object Tracking by Associating Every Detection Box
MIT License
4.69k stars 891 forks source link

Post processing sequence of lost list and remove list #259

Open YuNaruto opened 2 years ago

YuNaruto commented 2 years ago

https://github.com/ifzhang/ByteTrack/blob/72ca8b45d36caf5a39e949c6aa815d9abffd1ab5/yolox/tracker/byte_tracker.py#L283

For example, id = 7, state = lost, if the current frame does not match, it will be placed in removed stacks, the state is changed to state = remove. Meanwhile, in self.lost tracks, There are also id = 7 and state = lost.

after self.removed_tracks.extend (removed_strings), self.lost_stracks haive id = 7 and self.removed_stracks also have id = 7. If the next frame matches, the tracker(id=7) will be retraced. When another frame is lost, it will be directly removed.

Therefore, the correct order is: self.removed_stracks.extend(removed_stracks) self.lost_stracks = sub_stracks(self.lost_stracks, self.removed_stracks)

YuNaruto commented 2 years ago

@iFighting I wonder if my statement is clear?

Susan19900316 commented 1 year ago

I have the same question! I think you are right

licc0431 commented 1 year ago

我也发现了而这个问题,也可以不改变顺序,直接self.lost_stracks = sub_stracks(self.lost_stracks, removed_stracks)

另外self.removed_stracks有内存泄露