You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the Supervision issues and found no similar bug report.
Bug
Hi folks. Amazing project, but I'm getting a peculiar behaviour in ByteTracker.
My assumption for the minimum_matching_threshold parameter of ByteTracker is that it acts similar to an IoU threshold. A smaller threshold should make boxes match more easily, and a larger threshold should make boxes match only if they have a really good match score (ex: really high IoU). However, I observe the inverse behaviour. Not sure if this is expected, but thought I'll highlight it here
Environment
Supervision: 0.25.0
Ubuntu: 22.04
Python: 3.10
Minimal Reproducible Example
Code block to reproduce:
importsupervisionassvimportnumpyasnpdetections= [sv.Detections(xyxy=np.array([[10, 10, 20, 20]]),class_id=np.array([1]),confidence=np.array([1]))]*2detections+= [sv.Detections(xyxy=np.array([[11, 11, 21, 21]]), class_id=np.array([1]), confidence=np.array([1]))]*2# 90% overlapbyte_tracker_low_threshold=sv.ByteTrack(minimum_matching_threshold=0.1)
tracked_detections= [byte_tracker_low_threshold.update_with_detections(d) fordindetections]
print("Track IDs associated with detections in 10\% overlap: ", list(t_det.tracker_idfort_detintracked_detections))
print("Internally tracked states in 10\% overlap: ", byte_tracker_low_threshold.tracked_tracks)
print()
print()
byte_tracker_high_threshold=sv.ByteTrack(minimum_matching_threshold=0.9)
tracked_detections= [byte_tracker_high_threshold.update_with_detections(d) fordindetections]
print("Track IDs associated with detections in 90\% overlap: ", list(t_det.tracker_idfort_detintracked_detections))
print("Internally tracked states in 90\% overlap: ", byte_tracker_high_threshold.tracked_tracks)
Gives the output:
Track IDs associated with detections in 10\% overlap: [array([1]), array([1]), array([], dtype=int64), array([2])]
Internally tracked states in 10\% overlap: [OT_1_(3-4)]
Track IDs associated with detections in 90\% overlap: [array([1]), array([1]), array([1]), array([1])]
Internally tracked states in 90\% overlap: [OT_0_(1-4)]
I would expect the opposite to be true, i.e. when we set a low minimum_matching_threshold, it should assign the same track ID to detections more easily (with less IoU overlap). However, that doesn't seem to be the case.
Additional
No response
Are you willing to submit a PR?
Yes I'd like to help by submitting a PR!
The text was updated successfully, but these errors were encountered:
Search before asking
Bug
Hi folks. Amazing project, but I'm getting a peculiar behaviour in ByteTracker.
My assumption for the
minimum_matching_threshold
parameter of ByteTracker is that it acts similar to an IoU threshold. A smaller threshold should make boxes match more easily, and a larger threshold should make boxes match only if they have a really good match score (ex: really high IoU). However, I observe the inverse behaviour. Not sure if this is expected, but thought I'll highlight it hereEnvironment
Minimal Reproducible Example
Code block to reproduce:
Gives the output:
I would expect the opposite to be true, i.e. when we set a low
minimum_matching_threshold
, it should assign the same track ID to detections more easily (with less IoU overlap). However, that doesn't seem to be the case.Additional
No response
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: