File size: 1,492 Bytes
23e73f9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
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 ===")