File size: 2,008 Bytes
4c3d957
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import os
R = "/lp-dev/jonghoon/mv-mesh"
F = f"{R}/.debug/forgebench_eval/fb150"
def exp(nv): return f"{F}/exp_{nv}v"


def cmd_for(method, nv, out, shard, nsh, fill=False, expdir=None):
    E = expdir or exp(nv); SEL = f"{E}/selection.json"; INP = f"{E}/inputs"; REN = f"{E}/renders"
    sh = ["--shard", str(shard), "--nshards", str(nsh)]
    if method == "rvg":
        return [f"{R}/envs/reconviagen/bin/python", "metrics/batch_reconviagen.py", "--selection", SEL,
                "--inputs", INP, "--out", out, "--views", str(nv)] + sh, R, {}
    if method == "amodal3r":
        return [f"{R}/envs/reconviagen/bin/python", "scratchpad_extbaselines/batch_amodal3r.py", "--selection", SEL,
                "--inputs", INP, "--exp", E, "--out", out, "--views", str(nv), "--gpu", "0"] + sh, R, {}
    if method == "hy3d2mv":
        return [f"{R}/hunyuan3d-2mv/env/bin/python", "scratchpad_extbaselines/batch_hy3d_2mv.py", "--selection", SEL,
                "--inputs", INP, "--exp", E, "--out", out, "--views", str(nv), "--seed", "42",
                "--simplify-faces", "40000"] + sh, R, {}
    if method == "pixal3dsv":
        return [f"{R}/envs/pixal3d/bin/python", "pixal3d/batch_pixal3d.py", "--selection", SEL, "--inputs", INP,
                "--renders", REN, "--out", out, "--views", "1", "--seed", "42",
                "--resolution", "1024" if fill else "1536"] + sh, R, {}
    if method == "pixal3dmv":
        return [f"{R}/envs/pixal3d/bin/python", "pixal3d/batch_pixal3d_mv.py", "--exp", E, "--selection", SEL,
                "--out", out, "--views", str(nv), "--resolution", "1536", "--fallback_resolution", "1024",
                "--retries", "2"] + sh, R, {}
    if method == "cupid":
        CB = f"{R}/baselines/cupid"
        return [f"{CB}/env/bin/python", f"{CB}/batch_cupid.py", "--selection", SEL, "--inputs", INP, "--out", out,
                "--views", "1", "--seed", "42"] + sh, CB, {"ATTN_BACKEND": "flash_attn", "SPCONV_ALGO": "native"}
    raise ValueError(method)