Skip to content

Commit 26eb8a6

Browse files
committed
Update draw function call
Signed-off-by: Miguel A. Cabrera Minagorri <[email protected]>
1 parent 998b088 commit 26eb8a6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: examples/object-tracking/process.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
# make stateful
22

3-
from norfair import Detection, draw_tracked_objects
3+
from norfair import Detection, draw_points
44
import numpy as np
55

66
def hook(frame_data, context):
77
tracker = context['tracker']
88
frame = frame_data['modified']
99
bboxes, scores, labels = frame_data['user_data'].values()
10-
norfair_detections = yolo_to_norfair(bboxes, scores, labels)
10+
norfair_detections = yolo_to_norfair(bboxes, scores)
1111
tracked_objects = tracker.update(detections=norfair_detections)
12-
draw_tracked_objects(frame, tracked_objects)
12+
draw_points(frame, drawables=tracked_objects)
1313
frame_data['modified'] = frame
1414

15-
def yolo_to_norfair(bboxes, scores, labels):
15+
def yolo_to_norfair(bboxes, scores):
1616
norfair_detections = []
1717
for i, bbox in enumerate(bboxes):
1818
box_corners = [[bbox[0], bbox[1]], [bbox[2], bbox[3]]]

0 commit comments

Comments
 (0)