From e61969e008eedfab12727ef089efd17b6206ee7d Mon Sep 17 00:00:00 2001 From: bstandaert Date: Fri, 28 Jun 2024 16:14:45 +0200 Subject: [PATCH] reset index when loading from ground truth otherwise the index is a string and this breaks during the batching for the track module --- tracklab/datastruct/tracker_state.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tracklab/datastruct/tracker_state.py b/tracklab/datastruct/tracker_state.py index de53947d..4a46a199 100644 --- a/tracklab/datastruct/tracker_state.py +++ b/tracklab/datastruct/tracker_state.py @@ -134,6 +134,8 @@ def load_groundtruth(self, load_columns): self.image_pred_gt = merge_dataframes( self.image_metadatas.copy(), self.image_gt.copy() )[list(set(load_columns["image"]) | {"video_id", "file_path", "frame"})] + self.detections_pred_gt = self.detections_pred_gt.reset_index(drop=True) + self.detections_pred_gt['id'] = self.detections_pred_gt.index def load_public_dets(self, load_columns):