yohanshin / WHAM

MIT License
626 stars 68 forks source link

recovering SMPL coefficients #73

Open timegate opened 5 months ago

timegate commented 5 months ago

I'd like to extract SMPL coefficients like humannerf did (https://github.com/chungyiweng/humannerf?tab=readme-ov-file#metadatajson)

after WHAM, I could get results (['poses_body', 'poses_root_cam', 'betas', 'verts_cam', 'poses_root_world', 'trans_world', 'frame_id']), and needed coefficients for humannerf are "poses", "betas", "cam_intrinsics", "cam_extrinsics"

I could easily find that "betas" are exactly same as results[0]["betas"], and it seems "cam_extrinsics" is results[0]["poses_root_world"] + results[0]["trans_world"].

But in humannerf or VIBE, "poses" were (72,) array, while results[0]['poses_body'] were (23,3,3). also I'm not sure about recovering cam_intrinsics. Maybe results[0]["poses_root_cam"] means cam_intrinsics?

Could you please let me know how to recover these coefficients? It would be great if you also introduce me (poses_root_cam, verts_cam).

happysujin commented 5 months ago

I think , for poses, you can use 'matrix_to_axis_angle' function in tranforms.py . (3x3 -> 3, which makes 24x3x3->24x3) And..I'm really not sure about, but maybe you can use data from DPVO output... Maybe you'd better check # ========= Store results ========= # part code on demo.py and your data!