[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 <mzr1996@163.com>

Co-authored-by: Ma Zerun <mzr1996@163.com>
pull/523/head
imyhxy 2021-11-05 11:57:49 +08:00 committed by GitHub
parent 29f512156c
commit dc35eb62b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -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()