4
0
mirror of https://github.com/nerfstudio-project/nerfstudio.git synced 2026-11-10 18:17:31 +08:00
This commit is contained in:
J.Y. 2024-09-24 21:01:43 -04:00 committed by GitHub
parent e6941aca47
commit 01d3f73e2c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -577,7 +577,8 @@ def auto_orient_and_center_poses(
oriented_poses = transform @ poses
if oriented_poses.mean(dim=0)[2, 1] < 0:
oriented_poses[:, 1:3] = -1 * oriented_poses[:, 1:3]
oriented_poses[1:3, :] = -1 * oriented_poses[1:3, :]
transform[1:3, :] = -1 * transform[1:3, :]
elif method in ("up", "vertical"):
up = torch.mean(poses[:, :3, 1], dim=0)
up = up / torch.linalg.norm(up)