MCPcopy Create free account
hub / github.com/ModelTC/LightX2V / resolve_output_dir

Function resolve_output_dir

scripts/worldmirror/compare_to_reference.py:42–54  ·  view source on GitHub ↗

Find a dir that contains camera_params.json / depth/ / normal/ / *.ply.

(path: Path)

Source from the content-addressed store, hash-verified

40
41
42def resolve_output_dir(path: Path) -> Path:
43 """Find a dir that contains camera_params.json / depth/ / normal/ / *.ply."""
44 if (path / "camera_params.json").exists() or (path / "points.ply").exists():
45 return path
46 # Walk down one or two levels to find the real output dir.
47 for lvl in range(3):
48 latest = pick_latest_subdir(path)
49 if latest == path:
50 break
51 path = latest
52 if (path / "camera_params.json").exists() or (path / "points.ply").exists():
53 return path
54 return path
55
56
57def read_ply_xyz(path: Path) -> Optional[np.ndarray]:

Callers 1

mainFunction · 0.85

Calls 1

pick_latest_subdirFunction · 0.85

Tested by

no test coverage detected