File size: 1,683 Bytes
9affda1 | 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 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | #!/usr/bin/env python3
import argparse
import os
import subprocess
from pathlib import Path
ROOT = Path("/root/autodl-tmp/SplatAtlas")
# 31 个需要补 render 的 cell
MISSING_CELLS = [
("coadaptgs", s) for s in [
"Auditorium","Ballroom","Barn","Caterpillar","Courtroom","Lighthouse",
"Museum","Palace","Playground","Temple","Train","Truck",
"Bicycle","Bonsai","Counter","Flowers","Garden","Kitchen",
"Room","Stump","Treehill","DrJohnson","Playroom"
]
] + [
("lod_gs", s) for s in ["Chair","Drums","Ficus","Hotdog","Lego","Materials","Mic","Ship"]
]
def main():
parser = argparse.ArgumentParser()
parser.add_argument("--dry-run", action="store_true", help="只打印命令,不真正执行")
args = parser.parse_args()
for method, scene in MISSING_CELLS:
run_dir = ROOT / "outputs" / f"{method}_{scene}"
if not run_dir.exists():
print(f"SKIP {method}_{scene}: run dir 不存在")
continue
# 构造和原脚本一样的调用
cmd = [
"python", "-m", "tools.render_offline", # ← 这里改成你实际的 render 入口
"--method", method,
"--source_path", str(run_dir / "input"), # 大部分方法 source_path 在 input/ 里
"--model_path", str(run_dir),
"--iteration", "30000"
]
print(f"\n=== {method} × {scene} ===")
print(" ".join(cmd))
if not args.dry_run:
try:
subprocess.run(cmd, check=True)
except subprocess.CalledProcessError as e:
print(f"❌ 失败: {e}")
if __name__ == "__main__":
main()
|