File size: 1,898 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
47
48
import os, subprocess

SPLATATLAS = "/root/autodl-tmp/SplatAtlas"
BASE = "/root/autodl-tmp/SplatAtlas/outputs"
PYTHON = "python" # 默认先用 base 环境

targets = [
    ("vanilla_3dgs", "bonsai", "/root/autodl-tmp/dataset/360/bonsai", 2),
    ("analyticsplatting", "bonsai", "/root/autodl-tmp/dataset/360/bonsai", 2),
    ("analyticsplatting", "Lego", "/root/autodl-tmp/dataset/Synthetic_NeRF_Verified/Synthetic_NeRF/Lego", 1),
    ("erankgs", "bonsai", "/root/autodl-tmp/dataset/360/bonsai", 2),
    ("pgsr", "bonsai", "/root/autodl-tmp/dataset/360/bonsai", 2)
]
seeds = ["", "_seed1", "_seed2"]

for method, scene, src, res in targets:
    for suffix in seeds:
        m_dir = f"{BASE}/{method}{suffix}_{scene}"
        metrics_f = f"{m_dir}/metrics_test_iter30000.json"
        ply_f = f"{m_dir}/point_cloud/iteration_30000/point_cloud.ply"
        
        if os.path.exists(metrics_f):
            continue
            
        if not os.path.exists(ply_f):
            print(f"[-] SKIPPING {method}{suffix}_{scene}: PLY not found at {ply_f}")
            continue

        print(f"[*] FIXING: {method}{suffix}_{scene}")
        
        # 1. 渲染 (强制覆盖)
        render_cmd = f"{PYTHON} {SPLATATLAS}/scripts/main_render.py --method {method} --source_path {src} --model_path {m_dir} --iteration 30000 --resolution {res}"
        subprocess.run(render_cmd, shell=True)
        
        # 2. 评估
        renders = f"{m_dir}/renders_test_30000"
        gt = f"{m_dir}/gt_test_30000"
        depths = f"{m_dir}/depths_test_30000"
        
        eval_cmd = (
            f"{PYTHON} {SPLATATLAS}/ufd_evalkit/run_eval.py "
            f"--method {method} --scene {scene} --render_dir {renders} "
            f"--gt_dir {gt} --ply_path {ply_f} --output_json {metrics_f} "
            f"--colmap_dir {src} --depth_dir {depths}"
        )
        subprocess.run(eval_cmd, shell=True)