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