| import subprocess |
| import os |
|
|
| print("=== Phase 1: Minimal Sanity Check (2x1) ===") |
|
|
| |
| TASKS = [ |
| { |
| "method": "vanilla_3dgs", |
| "scene": "bonsai", |
| "source": "/root/autodl-tmp/dataset/360/bonsai", |
| "model": "/root/autodl-tmp/SplatAtlas/outputs/vanilla_3dgs_bonsai", |
| "res": 2 |
| }, |
| { |
| "method": "pixelgs", |
| "scene": "bonsai", |
| "source": "/root/autodl-tmp/dataset/360/bonsai", |
| "model": "/root/autodl-tmp/SplatAtlas/outputs/pixelgs_bonsai", |
| "res": 2 |
| } |
| ] |
|
|
| for task in TASKS: |
| print(f"\n>> Testing {task['method']} on {task['scene']}...") |
| cmd = [ |
| "python", "scripts/phase1_validation/render_single.py", |
| "--ply_path", f"{task['model']}/point_cloud/iteration_30000/point_cloud.ply", |
| "--source_path", task["source"], |
| "--model_path", task["model"], |
| "--output_dir", f"/tmp/sanity_{task['method']}", |
| "--resolution", str(task["res"]), |
| "--bg_color", "0,0,0" |
| ] |
| res = subprocess.run(cmd, capture_output=True, text=True) |
| |
| |
| for line in res.stdout.split("\n"): |
| if "Mean PSNR" in line or "Delta" in line or "STATUS" in line: |
| print(f" {line}") |
| if res.returncode != 0: |
| print(f" [CRITICAL] Process crashed with code {res.returncode}") |
| print(f" STDERR: {res.stderr[-200:]}") |
|
|
| print("\n=== Sanity Check Completed ===") |
|
|