Stages

StageScriptDescription
0scripts/undistort_egoexo.py / undistort_egocam.pyUndistort & extract frames
1scripts/read_cameras.pyCompute camera matrices
2scripts/run_bbox_selection.py → ViTPose → scripts/run_batched_hamer.pyDetection + pose + hand mesh
3scripts/triangulate_points.pyMulti-view triangulation
4slahmr/run_opt.py (smooth_fit)SLAHMR optimization, chunked

Auto-detection: use_aria is True when the take name contains "cooking" or "bike", else False. chunk_size is 100 frames for cooking takes, 2000 for everything else (single chunk for anything shorter) — independent of use_aria, so bike takes use Aria but still run in one chunk.

Single take (local)

cd /path/to/egoexo4d_human_meshes
CUDA_VISIBLE_DEVICES=0 EGL_DEVICE_ID=0 PYOPENGL_PLATFORM=egl \
  python scripts/run_pipeline.py --video <take_name> --device_num 0 --log-time

# Examples:
python scripts/run_pipeline.py --video cmu_bike02_4 --device_num 0 --log-time
python scripts/run_pipeline.py --video iiith_cooking_109_4 --device_num 1 --log-time

Batch via jobs file

One JSON object per line: {"take": "cmu_bike01_2", "status": "not_done"}. File-locking (filelock) lets multiple GPU processes pull from the same jobs file concurrently.

python scripts/run_pipeline.py --jobs_file /path/to/jobs.jsonl --device_num 0 --log-time

Resuming from a stage

--resume_stage N skips stages 0..N-1:

python scripts/run_pipeline.py --video <take> --resume_stage 3 --device_num 0

When resuming without an explicit stage, the pipeline checks sentinel files to auto-detect the highest completed stage and resumes one stage before that (redoing the last stage for robustness):

GPU environment

Always set before running (the pipeline does this automatically when --device_num N is passed):

export CUDA_VISIBLE_DEVICES=<N>
export EGL_DEVICE_ID=<N>
export PYOPENGL_PLATFORM=egl
unset DISPLAY
unset WAYLAND_DISPLAY