forked from nerfstudio-project/nerfstudio
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinspect_tetranerf_cli.py
More file actions
36 lines (29 loc) · 872 Bytes
/
Copy pathinspect_tetranerf_cli.py
File metadata and controls
36 lines (29 loc) · 872 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
from __future__ import annotations
from tetranerf.nerfstudio.registration import tetranerf
def try_get(obj, path: str) -> None:
cur = obj
ok = True
for chunk in path.split("."):
if not hasattr(cur, chunk):
ok = False
break
cur = getattr(cur, chunk)
if ok:
print(f"[OK] {path} = {cur!r}")
else:
print(f"[NO] {path}")
if __name__ == "__main__":
cfg = tetranerf.config
candidates = [
"data",
"output_dir",
"pipeline",
"pipeline.datamanager",
"pipeline.datamanager.data",
"pipeline.datamanager.dataparser",
"pipeline.datamanager.dataparser.data",
"pipeline.datamanager.dataparser.colmap_path",
"pipeline.datamanager.dataparser.colmap-path",
]
for c in candidates:
try_get(cfg, c.replace("-", "_"))