MCPcopy Create free account
hub / github.com/TEA-Lab/TwoByTwo / get_6d_rot_loss

Function get_6d_rot_loss

src/shape_assembly/utils.py:54–61  ·  view source on GitHub ↗
(gt_6d, pred_6d)

Source from the content-addressed store, hash-verified

52 return torch.acos(theta)
53
54def 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
63def get_6d_rot_loss_symmetry_new(batch_data, pred_data, device):
64

Callers

nothing calls this directly

Calls 2

bgdRFunction · 0.85
bgsFunction · 0.70

Tested by

no test coverage detected