From f6d2aacd31814dc7302deaea733bb0aad69f8c99 Mon Sep 17 00:00:00 2001 From: Tsahi Asher Date: Sun, 15 Jun 2025 12:25:42 +0300 Subject: [PATCH] Add default info dictionary to dataset so that when pycocotools copies the dataset to results it will not break --- references/detection/coco_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/references/detection/coco_utils.py b/references/detection/coco_utils.py index f40dcdff783..44b917a6ec6 100644 --- a/references/detection/coco_utils.py +++ b/references/detection/coco_utils.py @@ -123,7 +123,7 @@ def convert_to_coco_api(ds): coco_ds = COCO() # annotation IDs need to start at 1, not 0, see torchvision issue #1530 ann_id = 1 - dataset = {"images": [], "categories": [], "annotations": []} + dataset = {"images": [], "categories": [], "annotations": [], "info": {}} categories = set() for img_idx in range(len(ds)): # find better way to get target