mikel-brostrom/boxmot

Add "reset()" method to all the trackers

Joilence opened this issue · 3 comments

Thanks for your work in the first place!

Search before asking

  • I have searched the Yolov8 Tracking issues and found no similar enhancement requests.

Description

Add a reset() method to all the trackers (BYTETracker, BoTSORT, etc) to initialize the state again to be ready to perform tracking on a new sequence of detections.

Use case

Use a single tracker instance to perform tracking on multiple independent sequence without initiate a new instance, which would help keep code clean sometimes.

tracker = BYTETracker()

for seq_dets in seq_dets_list:
    tracker.reset()
    # tracker.update() for dets of each frame

Right now my workaround is to write a function for each tracker I want to use.

def get_byte_tracker():
    return BYTETracker()

for seq_dets in seq_dets_list:
    tracker = get_byte_tracker()
    # tracker.update() for dets of each frame

Are you willing to submit a PR?

  • Yes I'd like to help by submitting a PR!

Just want to confirm if it's something wanted in general; if so, I could submit a PR.

This would be awesome @Joilence . Looking forward to the PR 🔥

👋 Hello, this issue has been automatically marked as stale because it has not had recent activity. Please note it will be closed if no further activity occurs.
Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed!

👋 Hello, this issue has been automatically marked as stale because it has not had recent activity. Please note it will be closed if no further activity occurs.
Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed!