zyhbili / Pose2Img

A warping based image translation model focusing on upper body synthesis.
35 stars 5 forks source link

Error in vis_hyperparams.py #4

Closed liuweie closed 1 year ago

liuweie commented 1 year ago

hello,when I use vis_hyperparams.py to compute kp_var_root and mask_sigma_perp ,the following error ocurred:

image

I've been debugging for a long time and still can't solve it. Can you help me to see what the problem is? .

zyhbili commented 1 year ago

Have you tried the demo data and cfg? It seems the problem of your custom keypoints, are they of shape (3,137)?

liuweie commented 1 year ago

In fact,the image showed above is exactly demo data of oliver,and oliver's keypoints shape is (122, 2): import numpy as np path = 'D:\\Pose2Img\\data\\Oliver\\keypoints\\Auto_Lending_-_Last_Week_Tonight_with_John_Oliver_HBO-4U2eDJnwz_s_58_000_0_00_05.405405.npy' npy = np.load(path) print(npy.shape)

and the result: (122, 2)

zyhbili commented 1 year ago

please pull the code

liuweie commented 1 year ago

Oh!I tried keypoints of shape(3,137), problem solved now, thanks for your patience !

liuweie commented 1 year ago

May I ask what are the specific meanings of the two parameters kp_var_root and mask_sigma_perp? Is there any explanation in the paper?And here are some of my img result using vis_hyperparams.py ,does this prove that this is a good parameter setting? 5

liuweie commented 1 year ago

1

liuweie commented 1 year ago

2

zyhbili commented 1 year ago

The two parameters are used to control the size of gaussian map. The keypoint gaussian maps are used to indicate the target pose. The per-part mask gaussian maps are used to fetch the source features and they will be refined in the sub module. You can refer to Synthesizing Images of Humans in Unseen Poses for more details. It seems a proper hyperparams setting. If you produce poor results, you can augment your custom training data with more diverse poses to bridge the gap between train and test distribution. For further discussing, you could contact me by email zhiyh@shanghaitech.edu.cn.

liuweie commented 1 year ago

Thanks very much!