(gt_6d, pred_6d)
| 52 | return torch.acos(theta) |
| 53 | |
| 54 | def get_6d_rot_loss(gt_6d, pred_6d): |
| 55 | #input pred_6d , gt_6d : batch * 2 * 3 |
| 56 | pred_Rs = bgs(pred_6d.reshape(-1, 2, 3).permute(0, 2, 1)) |
| 57 | gt_Rs = bgs(gt_6d.reshape(-1, 2, 3).permute(0, 2, 1)) |
| 58 | theta = bgdR(gt_Rs, pred_Rs) |
| 59 | theta_degree = theta * 180 / np.pi |
| 60 | # print("\033[33m the theta is", theta,"\033[0m") |
| 61 | return theta_degree |
| 62 | |
| 63 | def get_6d_rot_loss_symmetry_new(batch_data, pred_data, device): |
| 64 |