menyifang / ADGAN

The Implementation of paper "Controllable Person Image Synthesis with Attribute-Decomposed GAN" CVPR 2020 (Oral); Pose and Appearance Attributes Transfer;
473 stars 90 forks source link

Issue with the generate_pose_map_fashion.py script #12

Open JiamingFB opened 4 years ago

JiamingFB commented 4 years ago

Hi @menyifang ,

Thanks a lot for replying my previous issues!

In generate_pose_map_fashion.py, the np array used to store the heat map is of type 'uint8'. This will drop any value that is less than 1.

def cords_to_map(cords, img_size, sigma=6): result = np.zeros(img_size + cords.shape[0:1], dtype='uint8')

But the Gaussian function always returns less than 1 except for exact pixel matches, which means that most of the values are dropped. result[..., i] = np.exp(-((yy - point[0]) ** 2 + (xx - point[1]) ** 2) / (2 * sigma ** 2))

When I used the generate_pose_map_fashion.py script to generate pose heatmap, I found that only a few pixels have values, and these are the keypoint pixels.