Skip to content

Commit

Permalink
Fixed different ids when running without annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
victorjoos committed May 17, 2024
1 parent dd67d92 commit 89cc511
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tracklab/wrappers/datasets/soccernet/soccernet_game_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def video_dir_to_dfs(args):
if os.path.isdir(video_folder_path):
if not (Path(video_folder_path) / "Labels-GameState.json").exists():
img_folder_path = os.path.join(video_folder_path, 'img1')
video_id = str(int(video_folder.split('-')[-1]))
video_id = str(video_folder.split('-')[-1])
video_metadata = {
'id': video_id,
'name': video_folder,
Expand All @@ -234,7 +234,7 @@ def video_dir_to_dfs(args):
images_data = gamestate_data['images']
annotations_data = gamestate_data['annotations']
categories_data = gamestate_data['categories']
video_id = info_data.get("id", str(int(video_folder.split('-')[-1])))
video_id = info_data.get("id", str(video_folder.split('-')[-1]))

detections_df, annotation_pitch_camera_df, video_level_categories = dict_to_df_detections(annotations_data, categories_data)
# detections_df['image_id'] = detections_df['image_id'] - 1 + image_counter
Expand Down

0 comments on commit 89cc511

Please sign in to comment.