roboflow / supervision

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

[ByteTrack] - redesign `update_with_detections` to use IoU to match input `Detections` with `tracker_id` #754

Closed SkalskiP closed 7 months ago

SkalskiP commented 9 months ago

Description

All these issues can be resolved by changing the logic in update_with_detections. Instead of mapping values obtained from update_with_tensors to new Detections objects, we should use IoU to map the results of update_with_tensors to input Detections objects. This way, the input xyxy coordinates and the input state of the mask and data fields will be preserved.

For this purpose, we can utilize the already existing function box_iou_batch. The matching procedure has been demonstrated in one of our videos on YouTube.

Additional

rolson24 commented 7 months ago

Hi @SkalskiP! Can I work on this issue? I think I can implement this in the way you want without modifying update_with_tensors and in a pretty simple way.

SkalskiP commented 7 months ago

Hi @rolson24 👋🏻! Feel free to submit PR. You will make me very happy.

SkalskiP commented 7 months ago

The solution for this issue is implemented via https://github.com/roboflow/supervision/pull/1035. I am closing the issue. Thanks @rolson24 ! 🔥