| 19 | |
| 20 | |
| 21 | def parse_args(): |
| 22 | parser = argparse.ArgumentParser() |
| 23 | parser.add_argument('--num_gpus', type=int, dest='num_gpus') |
| 24 | parser.add_argument('--file_name', type=str, default='test') |
| 25 | parser.add_argument('--ckpt_name', type=str, default='model_dump') |
| 26 | parser.add_argument('--start', type=str, default=1) |
| 27 | parser.add_argument('--end', type=str, default=1) |
| 28 | parser.add_argument('--multi_person', action='store_true') |
| 29 | parser.add_argument( |
| 30 | '--retarget_cam', |
| 31 | action='store_true', |
| 32 | help=( |
| 33 | 'Post-process exported SMPL-X parameters so all frames share a fixed camera: ' |
| 34 | 'constant focal length (from first frame) and principal point at image center. ' |
| 35 | 'This only affects exported params, not the rendered demo frames.' |
| 36 | ), |
| 37 | ) |
| 38 | args = parser.parse_args() |
| 39 | return args |
| 40 | |
| 41 | |
| 42 | def retarget_transl_to_fixed_camera(transl, focal_xy, princpt_xy, img_width, img_height): |