Scripts for running the PromptHMR → robot retargeting pipeline on raw video files.
All scripts activate the phmr_pt2.6 conda env automatically via config.env.
Videos are broken into 500-frame chunks with a 250-frame overlap window.
# Single video
bash video_processing/run_prompthmr_single.sh <path/to/video.MOV>
# All videos in a session folder
bash video_processing/run_prompthmr.sh <path/to/session_folder>Outputs are saved to video_processing/human_pose_outputs/.
bash video_processing/fuse_results.sh <session_folder_name> <video_name> [--simple] [--force]Saves world4d_fused.pkl alongside the chunk files.
Open the fused pkl in a viewer to identify start/end frames, then:
# Raw PromptHMR output:
bash video_processing/extract_smpl.sh \
<path_to_results_pkl> <start_frame> <end_frame> <action_title>
# Fused world4d:
bash video_processing/extract_smpl.sh \
<path_to_world4d_fused_pkl> <start_frame> <end_frame> <action_title> --fused
# With viser visualization:
bash video_processing/extract_smpl.sh \
<path_to_results_pkl> <start_frame> <end_frame> <action_title> \
--run-viser --video-path <path/to/original_video.MOV>Saves retargeted actions to retarget/retarget_inputs/<action_title>.npz.
Each .npz file contains:
| Key | Shape | Description |
|---|---|---|
pose_body |
T × 63 | Body joint axis-angles (joints 1–21) |
root_orient |
T × 3 | Root orientation axis-angle |
trans |
T × 3 | Root translation (MuJoCo frame, normalized to first frame) |
betas |
1 × 16 | SMPL-X shape coefficients |
gender |
str | "neutral" |
mocap_frame_rate |
int | 30 |
Coordinate frame: Z-up (MuJoCo), with X and Y flipped from raw PromptHMR output via R = diag([-1, -1, 1]).