Skip to content

Commit

Permalink
Print per class metrics after evaluation (nutonomy#159)
Browse files Browse the repository at this point in the history
  • Loading branch information
holger-motional authored May 20, 2019
1 parent 57de64c commit 89af92b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions python-sdk/nuscenes/eval/detection/evaluate.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,21 @@ def main(self,
print('NDS: %.4f' % (metrics_summary['nd_score']))
print('Eval time: %.1fs' % metrics_summary['eval_time'])

# Print per-class metrics.
print()
print('Per-class results:')
print('Object Class\tAP\tATE\tASE\tAOE\tAVE\tAAE')
class_aps = metrics_summary['mean_dist_aps']
class_tps = metrics_summary['label_tp_errors']
for class_name in class_aps.keys():
print('%s\t%.3f\t%.3f\t%.3f\t%.3f\t%.3f\t%.3f'
% (class_name, class_aps[class_name],
class_tps[class_name]['trans_err'],
class_tps[class_name]['scale_err'],
class_tps[class_name]['orient_err'],
class_tps[class_name]['vel_err'],
class_tps[class_name]['attr_err']))

return metrics_summary


Expand Down

0 comments on commit 89af92b

Please sign in to comment.