MCPcopy Create free account
hub / github.com/AdaptiveMotorControlLab/FMPose3D / get_pose2D

Function get_pose2D

demo/vis_in_the_wild.py:114–126  ·  view source on GitHub ↗
(path, output_dir, type)

Source from the content-addressed store, hash-verified

112 ax.tick_params('z', labelleft = False)
113
114def 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
128def img2video(video_path, filename, output_dir):
129 cap = cv2.VideoCapture(video_path)

Callers 1

vis_in_the_wild.pyFile · 0.70

Calls 2

h36m_coco_formatFunction · 0.90
revise_kptsFunction · 0.90

Tested by

no test coverage detected