File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
1
# make stateful
2
2
3
- from norfair import Detection , draw_tracked_objects
3
+ from norfair import Detection , draw_points
4
4
import numpy as np
5
5
6
6
def hook (frame_data , context ):
7
7
tracker = context ['tracker' ]
8
8
frame = frame_data ['modified' ]
9
9
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 )
11
11
tracked_objects = tracker .update (detections = norfair_detections )
12
- draw_tracked_objects (frame , tracked_objects )
12
+ draw_points (frame , drawables = tracked_objects )
13
13
frame_data ['modified' ] = frame
14
14
15
- def yolo_to_norfair (bboxes , scores , labels ):
15
+ def yolo_to_norfair (bboxes , scores ):
16
16
norfair_detections = []
17
17
for i , bbox in enumerate (bboxes ):
18
18
box_corners = [[bbox [0 ], bbox [1 ]], [bbox [2 ], bbox [3 ]]]
You can’t perform that action at this time.
0 commit comments