File size: 1,494 Bytes
97aa5af | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | import numpy as np
from tabulate import tabulate
def print_table(reports):
# Prepare data for the table
table = []
for method, report in reports.items():
row = [
method,
# report['mean_rmse'],
report['mean_rotation_error'],
report['mean_translation_error'],
report['mean_cd'],
# report['mean_error'],
report['mean_fitness'],
report['mean_inlier_rmse'],
report['mean_computation_time']
]
table.append(row)
# headers for the table
# NOTE: report['mean_fitness'] is used as registration recall (success rate).
# headers = ['Method', 'RMSE', 'RE', 'TE', 'Time', 'CD', 'Res. Err.', 'Reg. Recall', 'Inlier RMSE']
headers = ['Method', 'RRE', 'RTE', 'CD', 'Fitness', 'Inlier RMSE', 'Time']
print(tabulate(table, headers=headers, tablefmt='grid'))
def print_table_no_gt_info(reports):
# Prepare data for the table
table = []
for method, report in reports.items():
row = [
method,
report['mean_cd'],
report['mean_fitness'],
report['mean_inlier_rmse'],
report['mean_computation_time']
]
table.append(row)
# headers for the table
# NOTE: report['mean_fitness'] is used as registration recall (success rate).
headers = ['Method','CD', 'Fitness', 'Inlier RMSE', 'Time']
print(tabulate(table, headers=headers, tablefmt='grid')) |