Skip to content

Commit

Permalink
small fix video demo
Browse files Browse the repository at this point in the history
  • Loading branch information
MasterBin-IIAU committed Apr 2, 2021
1 parent a9fe2ee commit 1378479
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/test/evaluation/tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,7 @@ def run_video(self, videofilepath, optional_box=None, debug=None, visdom_info=No
cv.imshow(display_name, frame)

def _build_init_info(box):
return {'init_bbox': OrderedDict({1: box}), 'init_object_ids': [1, ], 'object_ids': [1, ],
'sequence_object_ids': [1, ]}
return {'init_bbox': box}

if success is not True:
print("Read frame from {} failed.".format(videofilepath))
Expand Down Expand Up @@ -224,7 +223,7 @@ def _build_init_info(box):

# Draw box
out = tracker.track(frame)
state = [int(s) for s in out['target_bbox'][1]]
state = [int(s) for s in out['target_bbox']]
output_boxes.append(state)

cv.rectangle(frame_disp, (state[0], state[1]), (state[2] + state[0], state[3] + state[1]),
Expand Down

0 comments on commit 1378479

Please sign in to comment.