mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-11 02:24:38 +08:00
fix for scannet dataset camera pose loading (#2056)
* fix scannet dataparser pose issue * camera pose corrected
This commit is contained in:
parent
e2e5637d05
commit
f2fdd10d9b
@ -89,10 +89,10 @@ class ScanNet(DataParser):
|
||||
K = np.loadtxt(self.config.data / "intrinsic" / "intrinsic_color.txt")
|
||||
for img, depth, pose in zip(img_dir_sorted, depth_dir_sorted, pose_dir_sorted):
|
||||
pose = np.loadtxt(pose)
|
||||
pose[0:3, 1:3] *= -1
|
||||
pose = pose[np.array([1, 0, 2, 3]), :]
|
||||
pose[2, :] *= -1
|
||||
|
||||
pose = np.array(pose).reshape(4, 4)
|
||||
pose[:3, 1] *= -1
|
||||
pose[:3, 2] *= -1
|
||||
pose = torch.from_numpy(pose).float()
|
||||
# We cannot accept files directly, as some of the poses are invalid
|
||||
if np.isinf(pose).any():
|
||||
continue
|
||||
|
||||
Loading…
Reference in New Issue
Block a user