elif error_type == 'cou': e = pose_error.cou(R_e, t_e, R_g, t_g, models[obj_id], dp['test_im_size'], K) elif error_type == 're': e = pose_error.re(R_e, R_g) elif error_type == 'te': e = pose_error.te(t_e, t_g) errs_gts[gt_id] = e errs.append({ 'im_id': im_id, 'obj_id': obj_id, 'est_id': est_id, 'score': est['score'], 'errors': errs_gts }) # print('Evaluation time: {}s'.format(time.time() - t)) print('Saving errors...') errors_path = errors_mpath.format(result_path=result_path, result_name=result_name, error_sign=error_sign, scene_id=scene_id) misc.ensure_dir(os.path.dirname(errors_path)) inout.save_errors(errors_path, errs) print('') print('Done.')