anibali / margipose

3D monocular human pose estimation
Apache License 2.0
98 stars 20 forks source link

how overcome depth-scale ambiguity? #23

Closed guker closed 2 years ago

guker commented 3 years ago
def _to_univ_scale(self, skel_3d, skel_desc, univ_scale_factor):
       univ_skel_3d = skel_3d.clone()

        # Scale the skeleton to match the universal skeleton size
        if self.preserve_root_joint_at_univ_scale:
            # Scale the skeleton about the root joint position. This should give the same
            # joint position coordinates as the "univ_annot3" annotations.
            root = skel_3d[..., skel_desc.root_joint_id:skel_desc.root_joint_id+1, :]
            univ_skel_3d -= root
            univ_skel_3d /= univ_scale_factor
            univ_skel_3d += root
        else:
            # Scale the skeleton about the camera position. Useful for breaking depth/scale
            # ambiguity.
            univ_skel_3d /= univ_scale_factor

        return univ_skel_3d

your 3d ground turth is not root relative coordinate, how your method overcome depth-scale ambiguity?

anibali commented 3 years ago

There are a few options in the code: https://github.com/anibali/margipose/blob/604494922989b58a5f1fa5d2ecfbe7e062578dae/src/margipose/data/__init__.py#L52-L90

The two main ones are 1) using known root joint depth denormalise_with_depth, and 2) assuming a particular skeleton height denormalise_with_skeleton_height.