From 90447ab2236946f2e22477b53001f17af1392d9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Darmon?= Date: Wed, 7 Dec 2022 18:40:53 +0100 Subject: [PATCH] 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. --- nerfstudio/cameras/camera_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nerfstudio/cameras/camera_utils.py b/nerfstudio/cameras/camera_utils.py index 30d755596..97599d239 100644 --- a/nerfstudio/cameras/camera_utils.py +++ b/nerfstudio/cameras/camera_utils.py @@ -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