From dc35eb62b61ab17decedb93c4d83ec6da5f93eff Mon Sep 17 00:00:00 2001 From: imyhxy Date: Fri, 5 Nov 2021 11:57:49 +0800 Subject: [PATCH] [Fix] Fix an error on indexing scalar metrics in `analyze_result.py` (#518) * [Fix] Error on indexing scalar metrics * [Fix] Error on indexing scalar metrics Co-authored-by: Ma Zerun Co-authored-by: Ma Zerun --- tools/analysis_tools/analyze_results.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/analysis_tools/analyze_results.py b/tools/analysis_tools/analyze_results.py index 9f63439e9..2136ece8b 100644 --- a/tools/analysis_tools/analyze_results.py +++ b/tools/analysis_tools/analyze_results.py @@ -97,6 +97,11 @@ def main(): outputs['gt_label'] = gt_labels outputs['gt_class'] = gt_classes + need_keys = [ + 'filename', 'gt_label', 'gt_class', 'pred_score', 'pred_label', + 'pred_class' + ] + outputs = {k: v for k, v in outputs.items() if k in need_keys} outputs_list = list() for i in range(len(gt_labels)): output = dict()