human-pose-estimation.pytorch icon indicating copy to clipboard operation
human-pose-estimation.pytorch copied to clipboard

how to convert the hm to point

Open mathpopo opened this issue 6 years ago • 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

mathpopo avatar Nov 21 '19 11:11 mathpopo

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

mathpopo avatar Nov 21 '19 11:11 mathpopo

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

tucachmo2202 avatar Apr 07 '21 07:04 tucachmo2202