| import os, subprocess |
|
|
| SPLATATLAS = "/root/autodl-tmp/SplatAtlas" |
| BASE = "/root/autodl-tmp/SplatAtlas/outputs" |
| PYTHON = "python" |
|
|
| 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}") |
| |
| |
| 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) |
| |
| |
| 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) |
|
|
|
|