roboflow / supervision

We write your reusable computer vision tools. 💜
https://supervision.roboflow.com
MIT License
24.3k stars 1.81k forks source link

Fix regression where all uninitialized tracks are connected #1642

Closed LinasKo closed 3 weeks ago

LinasKo commented 3 weeks ago

Description

Apparently, external track ID must start with 1 and not 0. I introduced the regression when refactoring how IDs are stored and generated inside ByteTrack, somewhere around Commit #4a7d9cea.

If this is not true, when minimum_consecutive_frames > 1, all objects where no traces are established get assigned an ID of 0, and are connected with a single trace. A bit odd. Not sure where this coupling comes from.

Type of change

Please delete options that are not relevant.

How has this change been tested, please provide a testcase or example of how you tested the change?

Colab

Any specific deployment considerations

None

Docs

LinasKo commented 3 weeks ago

Regression:

https://github.com/user-attachments/assets/a9d291c7-5154-4726-a30c-2e8fb351ee2f

Fixed:

https://github.com/user-attachments/assets/d2d81571-28ac-48fc-af2d-ce6449db3c72

Edit: if this doesn't load, you can generate the same videos in the Colab.