| 31 | |
| 32 | |
| 33 | def parse_args(): |
| 34 | parser = argparse.ArgumentParser(description='Train keypoints network') |
| 35 | # general |
| 36 | parser.add_argument('--cfg', type=str, default=cfg_dir + 'w48_384x288_adam_lr1e-3.yaml', |
| 37 | help='experiment configure file name') |
| 38 | parser.add_argument('opts', nargs=argparse.REMAINDER, default=None, |
| 39 | help="Modify config options using the command-line") |
| 40 | parser.add_argument('--modelDir', type=str, default=model_dir + 'pose_hrnet_w48_384x288.pth', |
| 41 | help='The model directory') |
| 42 | parser.add_argument('--det-dim', type=int, default=416, |
| 43 | help='The input dimension of the detected image') |
| 44 | parser.add_argument('--thred-score', type=float, default=0.30, |
| 45 | help='The threshold of object Confidence') |
| 46 | parser.add_argument('-a', '--animation', action='store_true', |
| 47 | help='output animation') |
| 48 | parser.add_argument('-np', '--num-person', type=int, default=1, |
| 49 | help='The maximum number of estimated poses') |
| 50 | parser.add_argument("-v", "--video", type=str, default='camera', |
| 51 | help="input video file name") |
| 52 | parser.add_argument('--gpu', type=str, default='0', help='input video') |
| 53 | parser.add_argument('--fix_z', action='store_true', help='fix z axis') |
| 54 | args = parser.parse_args() |
| 55 | |
| 56 | return args |
| 57 | |
| 58 | |
| 59 | def reset_config(args): |