mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-13 03:14:00 +08:00
fixes indices split for nerfactory dataparser (#540)
fixes eval split for nerfactory
This commit is contained in:
1 parent
383a6075cc
commit
840bac9fc7
1 file changed
+4
-3
@@ -103,9 +103,6 @@ class Nerfactory(DataParser):
|
||||
else:
|
||||
raise ValueError(f"Unknown dataparser split {split}")
|
||||
|
||||
image_filenames = [image_filenames[i] for i in indices]
|
||||
poses = [poses[i] for i in indices]
|
||||
|
||||
poses = torch.from_numpy(np.array(poses).astype(np.float32))
|
||||
poses = camera_utils.auto_orient_poses(poses, method=self.config.orientation_method)
|
||||
|
||||
@@ -113,6 +110,10 @@ class Nerfactory(DataParser):
|
||||
scale_factor = 1.0 / torch.max(torch.abs(poses[:, :3, 3]))
|
||||
poses[:, :3, 3] *= scale_factor * self.config.scale_factor
|
||||
|
||||
# Choose image_filenames and poses based on split, but after auto orient and scaling the poses.
|
||||
image_filenames = [image_filenames[i] for i in indices]
|
||||
poses = poses[indices]
|
||||
|
||||
# in x,y,z order
|
||||
# assumes that the scene is centered at the origin
|
||||
aabb_scale = self.config.scene_scale
|
||||
|
||||
Reference in new issue
Block a user