Skip to content

Commit 2f6b98f

Browse files
author
KevinXu02
committed
fix
1 parent 55001e4 commit 2f6b98f

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

nerfstudio/data/dataparsers/colmap_dataparser.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -255,15 +255,16 @@ def _generate_dataparser_outputs(self, split: str = "train", **kwargs):
255255
# Try detecting the colmap path automatically
256256
possible_colmap_paths = ["colmap/sparse/0", "sparse/0", "sparse"]
257257
for path in possible_colmap_paths:
258-
colmap_path = self.config.data / path
259-
if colmap_path.exists():
258+
potential_path = self.config.data / path
259+
if potential_path.exists():
260260
from rich.prompt import Confirm
261261

262-
if Confirm.ask(
263-
f"Detected colmap path {colmap_path}. Do you want to use this path?"
264-
):
262+
if Confirm.ask(f"Detected colmap path {potential_path}. Do you want to use this path?"):
265263
self.config.colmap_path = path
264+
colmap_path = potential_path
266265
break
266+
else:
267+
assert False, f"Colmap path {colmap_path} does not exist."
267268

268269
assert colmap_path.exists(), f"Colmap path {colmap_path} does not exist."
269270

0 commit comments

Comments
 (0)