File size: 1,078 Bytes
c049970
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import os
import subprocess
from tqdm import tqdm

root_dir = "/home/ubuntu/magicsim/gs-dynamics/data/episode_rope"


dir_list = os.listdir(root_dir)
dir_list.sort(key=lambda n: int(n.split('_')[-1]) if n.split('_')[-1].isdigit() else 0)

weight_params=[
    "--weight_soft_col_cons=0.01",
    "--weight_im=50.0",
    "--weight_seg=200.0",
    "--weight_rigid=200.0",
    "--weight_bg=200.0",
    "--weight_iso=1000.0",
    "--weight_rot=4.0",
    "--num_knn=20",
    "--scale_scene_radius=0.05",
]

start=0
end=10

for i in tqdm(range(start,end,1)):
    name=dir_list[i]
    full_path = os.path.join(root_dir, name)

    if os.path.isdir(full_path) and name.startswith("episode_"):
        tqdm.write(f"Processing directory: {full_path}")
        cmd=[
            "python",
            "./src/tracking/train_gs.py",
            "--exp_name='exp1'",
            f"--sequence='episode_rope/{name}'",
            "--metadata_path='train_meta.json'",
            "--init_pt_cld_path='init_pt_cld_0000.npz'",
        ]

        subprocess.run(" ".join(cmd), shell=True,check=True)