From de39ccfeb412f018739c891fd8403250e6600f38 Mon Sep 17 00:00:00 2001 From: drivkin <7518636+drivkin@users.noreply.github.com> Date: Thu, 8 Aug 2024 16:24:14 -0400 Subject: [PATCH] Initialize tracker In the current code, the tracker is not actually initialized if an optional_bbox is not passed in, or a reset is not called. This code changes that. --- pytracking/evaluation/tracker.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pytracking/evaluation/tracker.py b/pytracking/evaluation/tracker.py index 2292e3ff..98091d63 100644 --- a/pytracking/evaluation/tracker.py +++ b/pytracking/evaluation/tracker.py @@ -380,7 +380,12 @@ def get_bb(self): init_state = ui_control.get_bb() info['init_object_ids'] = [next_object_id, ] + info['object_ids'] = [next_object_id,] + info['sequence_object_ids'] = [next_object_id,] info['init_bbox'] = OrderedDict({next_object_id: init_state}) + out = tracker.initialize(frame, info) + prev_output = OrderedDict(out) + sequence_object_ids.append(next_object_id) if save_results: output_boxes[next_object_id] = [init_state, ]