| 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) |
|
|