microsoft/human-pose-estimation.pytorch

how to convert the hm to point

mathpopo opened this issue · 2 comments

@leoxiaobin
first thank you for your job,but i try to use warpAffine & gaussian_filter & maximum_filter to draw the result ,show offset error,could you tell how to convert the hm to point(i just show in warpAffine img ),i try to :
new_img = input = cv2.warpAffine(
data_numpy,
trans,
(int(self.image_size[0]), int(self.image_size[1])),
flags=cv2.INTER_LINEAR)

    for i in range(self.num_joints):
        if joints_vis[i, 0] > 0.0:
            print(affine_transform(joints[i, 0:2], trans))
            cv2.circle(new_img, center=(int(affine_transform(joints[i, 0:2], trans)[0]), int(affine_transform(joints[i, 0:2], trans)[1])), color=(0, 0, 255), radius=5)
            joints[i, 0:2] = affine_transform(joints[i, 0:2], trans) 

to show the gt ,is right

i guess is the reverse-def generate_target(self, joints, joints_vis),it : point->heatmap

Hi @mathpopo,
Do you have the solution, can you share it with me?
Thank you very much!