未验证 提交 3adb1063 编写于 作者: F Feng Ni 提交者: GitHub

fix kitti metric deploy (#4227)

上级 93934304
...@@ -90,16 +90,19 @@ def get_categories(metric_type, anno_file=None, arch=None): ...@@ -90,16 +90,19 @@ def get_categories(metric_type, anno_file=None, arch=None):
elif metric_type.lower() in ['mot', 'motdet', 'reid']: elif metric_type.lower() in ['mot', 'motdet', 'reid']:
return _mot_category() return _mot_category()
elif metric_type.lower() in ['kitti', 'bdd100k']:
return _mot_category(category='car')
else: else:
raise ValueError("unknown metric type {}".format(metric_type)) raise ValueError("unknown metric type {}".format(metric_type))
def _mot_category(): def _mot_category(category='person'):
""" """
Get class id to category id map and category id Get class id to category id map and category id
to category name map of mot dataset to category name map of mot dataset
""" """
label_map = {'person': 0} label_map = {category: 0}
label_map = sorted(label_map.items(), key=lambda x: x[1]) label_map = sorted(label_map.items(), key=lambda x: x[1])
cats = [l[0] for l in label_map] cats = [l[0] for l in label_map]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册