YanzuoLu / CFLD

[CVPR 2024 Highlight] Coarse-to-Fine Latent Diffusion for Pose-Guided Person Image Synthesis
MIT License
183 stars 12 forks source link

Is pose map must needed? I want to inference with my own dataset for pose #29

Closed justinday123 closed 2 months ago

justinday123 commented 4 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

17

YanzuoLu commented 2 months ago

You may try using openpose to generate the same keypoint coordinate as dataset giving.