Bug correction auto_orient_and_center_poses (#1098)

When using auto_orient_and_center_poses with method="none" the returned pose if 4x4 (contrary to up and pca) which triggers an assertion error later. This modification solves it.
This commit is contained in:
François Darmon authored and GitHub committed 2022-12-07 09:40:53 -08:00
1 parent e605b3344a
commit 90447ab223
1 file changed
+2 -2
+2 -2
View File
@@ -457,7 +457,7 @@ def auto_orient_and_center_poses(
transform = torch.cat([rotation, rotation @ -translation[..., None]], dim=-1)
oriented_poses = transform @ poses
elif method == "none":
oriented_poses = poses
poses[:, :3, 3] -= translation
oriented_poses = poses[:, :3]
oriented_poses[..., 3] -= translation
return oriented_poses