Spaces:
Running
on
Zero
Running
on
Zero
rolpotamias
commited on
Commit
•
c5949c3
1
Parent(s):
7c2e2ad
Update wilor/utils/geometry.py
Browse files- wilor/utils/geometry.py +1 -1
wilor/utils/geometry.py
CHANGED
@@ -58,7 +58,7 @@ def rot6d_to_rotmat(x: torch.Tensor) -> torch.Tensor:
|
|
58 |
a2 = x[:, :, 1]
|
59 |
b1 = F.normalize(a1)
|
60 |
b2 = F.normalize(a2 - torch.einsum('bi,bi->b', b1, a2).unsqueeze(-1) * b1)
|
61 |
-
b3 = torch.cross(b1, b2)
|
62 |
return torch.stack((b1, b2, b3), dim=-1)
|
63 |
|
64 |
def perspective_projection(points: torch.Tensor,
|
|
|
58 |
a2 = x[:, :, 1]
|
59 |
b1 = F.normalize(a1)
|
60 |
b2 = F.normalize(a2 - torch.einsum('bi,bi->b', b1, a2).unsqueeze(-1) * b1)
|
61 |
+
b3 = torch.linalg.cross(b1,b2) #torch.cross(b1, b2)
|
62 |
return torch.stack((b1, b2, b3), dim=-1)
|
63 |
|
64 |
def perspective_projection(points: torch.Tensor,
|