diff --git a/ppdet/utils/coco_eval.py b/ppdet/utils/coco_eval.py index b54be135c76a33dcb5471b16f0697a734e050259..e0186a0de654f498783ae22b17d6b89dbc1ef9b8 100644 --- a/ppdet/utils/coco_eval.py +++ b/ppdet/utils/coco_eval.py @@ -427,8 +427,8 @@ def get_category_info_from_anno(anno_file, with_background=True): } catid2name = {cat['id']: cat['name'] for cat in cats} if with_background: - clsid2catid.update({0: 0}) - catid2name.update({0: 'background'}) + clsid2catid.update({0: -1}) + catid2name.update({-1: 'background'}) return clsid2catid, catid2name