Download scripts/phase1_validation/sanity_check.py from KCBtheone/SplatAtlas: direct link, hf CLI and curl.
- Browser
- Download file 1.49 kB
-
https://huggingface.co/KCBtheone/SplatAtlas/resolve/main/scripts/phase1_validation/sanity_check.py
- Command line
-
hf download hf://KCBtheone/SplatAtlas/scripts/phase1_validation/sanity_check.py
-
curl -L -o sanity_check.py https://huggingface.co/KCBtheone/SplatAtlas/resolve/main/scripts/phase1_validation/sanity_check.py
1.49 kB
| import subprocess | |
| import os | |
| print("=== Phase 1: Minimal Sanity Check (2x1) ===") | |
| # 强制硬编码路径,物理隔离 360_sparse_ratio8 的干扰 | |
| 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 ===") | |