[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
parent
29f512156c
commit
dc35eb62b6
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue