Closed justinday123 closed 2 months ago
Is pose map(keypoint coordinate) must needed? I want to inference with my own dataset for pose.
def build_pose_img(annotation_file, img_path): string = annotation_file.loc[os.path.basename(img_path)] array = load_pose_cords_from_strings(string['keypoints_y'], string['keypoints_x']) pose_map = torch.tensor(cords_to_map(array, (256, 256), (256, 176)).transpose(2, 0, 1), dtype=torch.float32) pose_img = torch.tensor(draw_pose_from_cords(array, (256, 256), (256, 176)).transpose(2, 0, 1) / 255., dtype=torch.float32) pose_img = torch.cat([pose_img, pose_map], dim=0) return pose_img
You may try using openpose to generate the same keypoint coordinate as dataset giving.
Is pose map(keypoint coordinate) must needed? I want to inference with my own dataset for pose.
def build_pose_img(annotation_file, img_path): string = annotation_file.loc[os.path.basename(img_path)] array = load_pose_cords_from_strings(string['keypoints_y'], string['keypoints_x']) pose_map = torch.tensor(cords_to_map(array, (256, 256), (256, 176)).transpose(2, 0, 1), dtype=torch.float32) pose_img = torch.tensor(draw_pose_from_cords(array, (256, 256), (256, 176)).transpose(2, 0, 1) / 255., dtype=torch.float32) pose_img = torch.cat([pose_img, pose_map], dim=0) return pose_img