File size: 523 Bytes
5f1587b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
import supervision as sv
class ByteTrack:
def __init__(self):
self.tracker = sv.ByteTrack()
self.smoother = sv.DetectionsSmoother()
def __call__(self, detections):
"""Process detections using ByteTrack."""
# supervision_detections = self._convert_pytorch_to_supervision(detections)
tracked_detections = self.tracker.update_with_detections(detections)
smoothed_detections = self.smoother.update_with_detections(tracked_detections)
return smoothed_detections |