Skip to content

Commit

Permalink
reset index when loading from ground truth
Browse files Browse the repository at this point in the history
otherwise the index is a string and this breaks during the batching for the track module
  • Loading branch information
bstandaert authored and victorjoos committed Jul 15, 2024
1 parent 4ed65e5 commit e61969e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tracklab/datastruct/tracker_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit e61969e

Please sign in to comment.