From 35f10063a39ab46617792c421013fe64506f2a0c Mon Sep 17 00:00:00 2001 From: "koki.murasawa" Date: Fri, 15 Dec 2023 15:41:13 +0900 Subject: [PATCH] Adjusted to prioritize 'name' from COCO format as FastLabel value --- fastlabel/converters.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fastlabel/converters.py b/fastlabel/converters.py index 1afec63..4b3f8df 100644 --- a/fastlabel/converters.py +++ b/fastlabel/converters.py @@ -844,8 +844,8 @@ def execute_coco_to_fastlabel(coco: dict, annotation_type: str) -> dict: coco_categories = {} coco_categories_keypoints = {} for c in coco["categories"]: - coco_categories[c["id"]] = c["supercategory"] - coco_categories_keypoints[c["id"]] = c["keypoints"] + coco_categories[c["id"]] = c["name"] if c.get("name") else c["supercategory"] + coco_categories_keypoints[c["id"]] = c["keypoints"] if c.get("keypoints") else [] coco_annotations = coco["annotations"]