Jeff-sjtu / HybrIK

Official code of "HybrIK: A Hybrid Analytical-Neural Inverse Kinematics Solution for 3D Human Pose and Shape Estimation", CVPR 2021
MIT License
1.17k stars 142 forks source link

get_affine_transform() seems buggy #118

Open nnop opened 1 year ago

nnop commented 1 year ago

In the implementation of get_affine_transform () https://github.com/Jeff-sjtu/HybrIK/blob/403d1ae6d74c114f3c03eb92eeb320184ea54e61/hybrik/utils/transforms.py#L1310 You used src_w for the y coordinate: https://github.com/Jeff-sjtu/HybrIK/blob/403d1ae6d74c114f3c03eb92eeb320184ea54e61/hybrik/utils/transforms.py#L1325-L1326

I think it should be src_h and dst_h. That would produce wrong affine transformation between the two bboxes.

I saw the bug is also in the AlphaPose repo: https://github.com/MVIG-SJTU/AlphaPose/blob/02dbe666a2154fbd39ff33491266a81cba27fcdc/alphapose/utils/transforms.py#L777-L778

Jeff-sjtu commented 1 year ago

Hi @nnop, this vector is chosen freely to find the corresponding points in src and dst. I think as long as the three vectors match correctly, the affine transformation is correct.