From 8696fdc3f73b87b73d04d8ee396ddf1733cc04d3 Mon Sep 17 00:00:00 2001 From: saurabh1993 Date: Tue, 24 Dec 2019 23:46:09 +0530 Subject: [PATCH] changed new detections format --- multitracker/multitracker.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/multitracker/multitracker.py b/multitracker/multitracker.py index 0551995..9daf48b 100755 --- a/multitracker/multitracker.py +++ b/multitracker/multitracker.py @@ -64,7 +64,7 @@ def remove_trackers(self,obselete_trackers): def merge_trackers(self, img, detections): obselete_trackers = [] mapped_trackers = {} - new_detections = [] + new_detections = {} points = map(self.detection2bbox,detections) trackers = self.trackers @@ -91,8 +91,8 @@ def merge_trackers(self, img, detections): ##Add new tracker for new detections: for i in range(len(points)): if i not in covered_points: - new_detections.append(detections[i]) trackerid=self.add_tracker(img,detections[i]) + new_detections[trackerid] = {"index":i,"box":detections[i]} mapped_trackers[trackerid] = {"index":i,"box":detections[i]} ##Obselete_trackers: