(path, output_dir, type)
| 112 | ax.tick_params('z', labelleft = False) |
| 113 | |
| 114 | def get_pose2D(path, output_dir, type): |
| 115 | |
| 116 | print('\nGenerating 2D pose...') |
| 117 | keypoints, scores = hrnet_pose(path, det_dim=416, num_person=1, gen_output=True, type=type) |
| 118 | keypoints, scores, valid_frames = h36m_coco_format(keypoints, scores) |
| 119 | re_kpts = revise_kpts(keypoints, scores, valid_frames) |
| 120 | print('Generating 2D pose successful!') |
| 121 | |
| 122 | output_dir += 'input_2D/' |
| 123 | os.makedirs(output_dir, exist_ok=True) |
| 124 | |
| 125 | output_npz = output_dir + 'keypoints.npz' |
| 126 | np.savez_compressed(output_npz, reconstruction=keypoints) |
| 127 | |
| 128 | def img2video(video_path, filename, output_dir): |
| 129 | cap = cv2.VideoCapture(video_path) |
no test coverage detected