Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

How to get mano pose, 3d points and vertex in camera coordinate system for each frame #26

Open
gs-ren opened this issue Jun 1, 2023 · 2 comments

Comments

@gs-ren
Copy link

gs-ren commented Jun 1, 2023

Hi,
How I can get the pose and shape for each frame?It seems cp.mano_meshes(frame_idx) only return the mano pose for three frames .

@samarth-robo
Copy link
Contributor

@gs-ren as you can see in the function documentation, cp.mano_meshes(frame_idx) does not return 3 frames. Instead, it returns a list of 2 dicts. [left_hand_dict, right_hand_dict]. Each dict is either None if that hand is absent, or it contains 3 keys: {'vertices', 'faces', 'joints'}. You can see a usage example in the cell number 12 of the demo notebook.

@gs-ren
Copy link
Author

gs-ren commented Jun 7, 2023

Thank you for replying!
I want to get the opse ,3d points and vertex in cam coordinate system for each frame if it was valid. I get the fullpose by adding return value in mutils.load_mano_meshes line 475

out.append({
      'vertices': vertices,
      'joints': joints,
      'faces': np.asarray(m.f),
      'fullpose':np.array(m.fullpose),
      'beta':np.array(m.betas[:]),
    }

and then do the transform below:

            root_pose = pose[:3]
            root_pose, _ = cv2.Rodrigues(root_pose)
            root_pose, _ = cv2.Rodrigues(np.dot(object_pose[:3, :3], root_pose))

by doing this, I can get the vertex and 3d hand points from Manolayer,

            P = cp.P(camera_name, frame_idx)                         # 3x4 projection matrix
            points_2d = mutils.project(P, points_3d_mano)           # project 3D joints to 2D

but the 2d points projected by 3d hand points was not equal to joints = cp.projected_hand_joints(camera_name, frame_idx).
Could you please give me some suggestions?
Thank you for your time!
@samarth-robo

@gs-ren gs-ren changed the title mano pose and shape for each frame How to get mano pose, 3d points and vertex in camera coordinate system for each frame Jun 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants