From b730bbd6ea565d7689964661c53a6074654b5d3b Mon Sep 17 00:00:00 2001 From: natanielruiz <nataniel777@hotmail.com> Date: 星期一, 30 十月 2017 05:30:52 +0800 Subject: [PATCH] next --- code/test_preangles.py | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/code/test_preangles.py b/code/test_preangles.py index b742195..cfee8d1 100644 --- a/code/test_preangles.py +++ b/code/test_preangles.py @@ -140,8 +140,9 @@ cv2_img = cv2.imread(os.path.join(args.data_dir, name + '.jpg')) if args.batch_size == 1: error_string = 'y %.2f, p %.2f, r %.2f' % (torch.sum(torch.abs(yaw_predicted - label_yaw)), torch.sum(torch.abs(pitch_predicted - label_pitch)), torch.sum(torch.abs(roll_predicted - label_roll))) - cv2.putText(cv2_img, error_string, (30, cv2_img.shape[0]- 30), fontFace=1, fontScale=1, color=(0,0,255), thickness=1) - utils.plot_pose_cube(cv2_img, yaw_predicted[0], pitch_predicted[0], roll_predicted[0]) + cv2.putText(cv2_img, error_string, (30, cv2_img.shape[0]- 30), fontFace=1, fontScale=1, color=(0,0,255), thickness=2) + # utils.plot_pose_cube(cv2_img, yaw_predicted[0], pitch_predicted[0], roll_predicted[0], size=100) + utils.draw_axis(cv2_img, yaw_predicted[0], pitch_predicted[0], roll_predicted[0], tdx = 200, tdy= 200, size=100) cv2.imwrite(os.path.join('output/images', name + '.jpg'), cv2_img) print('Test error in degrees of the model on the ' + str(total) + -- Gitblit v1.8.0