| 16 | |
| 17 | |
| 18 | def parse_args() -> argparse.Namespace: |
| 19 | parser = argparse.ArgumentParser(description="Render MBench-style videos and update meta JSON.") |
| 20 | parser.add_argument( |
| 21 | "--meta-json", |
| 22 | type=Path, |
| 23 | default=Path("data_samples/example_archive_wi_ref.json"), |
| 24 | help="metadata JSON containing motion_path entries.", |
| 25 | ) |
| 26 | parser.add_argument( |
| 27 | "--output-json", |
| 28 | type=Path, |
| 29 | default=Path("data_samples/example_archive_wi_ref_eval.json"), |
| 30 | help="Where to write updated metadata with video_path and mbench_eval_path.", |
| 31 | ) |
| 32 | parser.add_argument( |
| 33 | "--output-dir", |
| 34 | type=Path, |
| 35 | default=Path("data_samples/mb_render"), |
| 36 | help="Directory to store rendered mp4/pt outputs.", |
| 37 | ) |
| 38 | parser.add_argument( |
| 39 | "--smplx-model-dir", |
| 40 | type=Path, |
| 41 | default=Path("data/body_models/smplx"), |
| 42 | help="Directory containing SMPLX model files.", |
| 43 | ) |
| 44 | parser.add_argument( |
| 45 | "--fps", |
| 46 | type=int, |
| 47 | default=20, |
| 48 | help="Frames per second for rendered videos.", |
| 49 | ) |
| 50 | parser.add_argument( |
| 51 | "--width", |
| 52 | type=int, |
| 53 | default=960, |
| 54 | help="Video width.", |
| 55 | ) |
| 56 | parser.add_argument( |
| 57 | "--height", |
| 58 | type=int, |
| 59 | default=960, |
| 60 | help="Video height.", |
| 61 | ) |
| 62 | parser.add_argument( |
| 63 | "--device", |
| 64 | type=str, |
| 65 | default="cuda:0" if torch.cuda.is_available() else "cpu", |
| 66 | help="Device used by MBench renderer (CUDA recommended).", |
| 67 | ) |
| 68 | parser.add_argument( |
| 69 | "--limit", |
| 70 | type=int, |
| 71 | default=None, |
| 72 | help="Optional limit to process first N entries (debug).", |
| 73 | ) |
| 74 | return parser.parse_args() |
| 75 | |