From f401aca104a43a0e401c6629977270fcbb26013b Mon Sep 17 00:00:00 2001 From: amcgi Date: Wed, 4 Oct 2023 17:14:40 +0200 Subject: [PATCH] Avoid wrong path for windows user --- scene/dataset_readers.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scene/dataset_readers.py b/scene/dataset_readers.py index 2a6f904..84bb6a0 100644 --- a/scene/dataset_readers.py +++ b/scene/dataset_readers.py @@ -131,13 +131,13 @@ def storePly(path, xyz, rgb): def readColmapSceneInfo(path, images, eval, llffhold=8): try: - cameras_extrinsic_file = os.path.join(path, "sparse/0", "images.bin") - cameras_intrinsic_file = os.path.join(path, "sparse/0", "cameras.bin") + cameras_extrinsic_file = os.path.join(path, "sparse", "0", "images.bin") + cameras_intrinsic_file = os.path.join(path, "sparse", "0", "cameras.bin") cam_extrinsics = read_extrinsics_binary(cameras_extrinsic_file) cam_intrinsics = read_intrinsics_binary(cameras_intrinsic_file) except: - cameras_extrinsic_file = os.path.join(path, "sparse/0", "images.txt") - cameras_intrinsic_file = os.path.join(path, "sparse/0", "cameras.txt") + cameras_extrinsic_file = os.path.join(path, "sparse", "0", "images.txt") + cameras_intrinsic_file = os.path.join(path, "sparse", "0", "cameras.txt") cam_extrinsics = read_extrinsics_text(cameras_extrinsic_file) cam_intrinsics = read_intrinsics_text(cameras_intrinsic_file) @@ -154,9 +154,9 @@ def readColmapSceneInfo(path, images, eval, llffhold=8): nerf_normalization = getNerfppNorm(train_cam_infos) - ply_path = os.path.join(path, "sparse/0/points3D.ply") - bin_path = os.path.join(path, "sparse/0/points3D.bin") - txt_path = os.path.join(path, "sparse/0/points3D.txt") + ply_path = os.path.join(path, "sparse", "0", "points3D.ply") + bin_path = os.path.join(path, "sparse", "0", "points3D.bin") + txt_path = os.path.join(path, "sparse", "0", "points3D.txt") if not os.path.exists(ply_path): print("Converting point3d.bin to .ply, will happen only the first time you open the scene.") try: