Download tools/batch_render_missing.py from KCBtheone/SplatAtlas: direct link, hf CLI and curl.
- Browser
- Download file 1.68 kB
-
https://huggingface.co/KCBtheone/SplatAtlas/resolve/main/tools/batch_render_missing.py
- Command line
-
hf download hf://KCBtheone/SplatAtlas/tools/batch_render_missing.py
-
curl -L -o batch_render_missing.py https://huggingface.co/KCBtheone/SplatAtlas/resolve/main/tools/batch_render_missing.py
1.68 kB
| #!/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() | |