Skip to content

Commit

Permalink
Merge pull request #1609 from mikel-brostrom/max-age-arg
Browse files Browse the repository at this point in the history
added max_age arg to imprassoc and botsort
  • Loading branch information
mikel-brostrom authored Sep 5, 2024
2 parents d2b84de + 1fbb626 commit b1c9f29
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion boxmot/trackers/botsort/bot_sort.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ def __init__(
self.match_thresh = match_thresh

self.buffer_size = int(frame_rate / 30.0 * track_buffer)
self.max_time_lost = self.buffer_size
self.kalman_filter = KalmanFilterXYWH()

# ReID module
Expand Down Expand Up @@ -387,7 +388,7 @@ def update(self, dets: np.ndarray, img: np.ndarray, embs: np.ndarray = None) ->

""" Step 5: Update state"""
for track in self.lost_stracks:
if self.frame_count - track.end_frame > self.max_age:
if self.frame_count - track.end_frame > self.max_time_lost:
track.mark_removed()
removed_stracks.append(track)

Expand Down
3 changes: 2 additions & 1 deletion boxmot/trackers/imprassoc/impr_assoc_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ def __init__(
self.lambda_ = lambda_

self.buffer_size = int(frame_rate / 30.0 * track_buffer)
self.max_time_lost = self.buffer_size
self.kalman_filter = KalmanFilterXYWH()

# ReID module
Expand Down Expand Up @@ -423,7 +424,7 @@ def update(self, dets: np.ndarray, img: np.ndarray, embs: np.ndarray = None) ->

""" Step 6: Update state"""
for track in self.lost_stracks:
if self.frame_count - track.end_frame > self.max_age:
if self.frame_count - track.end_frame > self.max_time_lost:
track.mark_removed()
removed_stracks.append(track)

Expand Down

0 comments on commit b1c9f29

Please sign in to comment.