-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathvisualize_motion.py
More file actions
40 lines (36 loc) · 1.23 KB
/
visualize_motion.py
File metadata and controls
40 lines (36 loc) · 1.23 KB
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
import os
from utils.visualize import render_video
RAW_DATA_PATH = "raw_data"
feature_dirs = [
f"{RAW_DATA_PATH}/BABEL_streamed/motions",
f"{RAW_DATA_PATH}/BABEL_streamed/motions_recovered_20251030_085836_vae_wan_z4",
f"{RAW_DATA_PATH}/HumanML3D/new_joint_vecs",
f"{RAW_DATA_PATH}/HumanML3D/new_joint_vecs_recovered_TOKENS_20251030_085836_vae_wan_z4",
]
save_dirs = [
f"{RAW_DATA_PATH}/BABEL_streamed/animations",
f"{RAW_DATA_PATH}/BABEL_streamed/animations_recovered_20251030_085836_vae_wan_z4",
f"{RAW_DATA_PATH}/HumanML3D/animations",
f"{RAW_DATA_PATH}/HumanML3D/animations_recovered_20251030_085836_vae_wan_z4",
]
frame_dirs = [
f"{RAW_DATA_PATH}/BABEL_streamed/frames",
f"{RAW_DATA_PATH}/BABEL_streamed/frames",
None,
None,
]
# make dir
for save_dir in save_dirs:
if not os.path.exists(save_dir):
os.makedirs(save_dir)
render_setting = {}
render_setting["recover_dim"] = 263
render_setting["simple"] = True
for feature_dir, save_dir, frame_dir in zip(feature_dirs, save_dirs, frame_dirs):
print(f"Rendering {feature_dir} to {save_dir}")
render_video(
motion_dir=feature_dir,
save_dir=save_dir,
render_setting=render_setting,
frames_dir=frame_dir,
)