From 5b949596ea7603cd79e3fc9067766bbc79a3e93d Mon Sep 17 00:00:00 2001 From: Feng Ni Date: Thu, 23 Sep 2021 19:33:55 +0800 Subject: [PATCH] [cherry-pick][MOT] Fix kitti deploy (#4228) * fix operators typo * fix kitti metric deploy --- ppdet/data/source/category.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ppdet/data/source/category.py b/ppdet/data/source/category.py index 56ca0f64d..4f85f5260 100644 --- a/ppdet/data/source/category.py +++ b/ppdet/data/source/category.py @@ -90,16 +90,19 @@ def get_categories(metric_type, anno_file=None, arch=None): elif metric_type.lower() in ['mot', 'motdet', 'reid']: return _mot_category() + elif metric_type.lower() in ['kitti', 'bdd100k']: + return _mot_category(category='car') + else: 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 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]) cats = [l[0] for l in label_map] -- GitLab