geopavlakos / hamer

HaMeR: Reconstructing Hands in 3D with Transformers
https://geopavlakos.github.io/hamer/
MIT License
419 stars 42 forks source link

How to output each coordinate information as .pkl #86

Open yuriokamoto opened 1 day ago

yuriokamoto commented 1 day ago

How do I change the code to output each coordinate information in .pkl? I looked at past issues but could not figure it out due to my lack of understanding.

geopavlakos commented 1 day ago

What information do you want to write in the .pkl file? Is the question about how to write a pkl file? Or about the format of the model output? If it's the second, then you can take a look at the contents of the out variable.

yuriokamoto commented 1 day ago

It is difficult to understand because it is through translation. Sorry. Is it possible to get the coordinates of the keypoints of the hand output in the image in .pkl?

geopavlakos commented 1 day ago

You can get the 3D coordinates of the hand keypoints in the camera frame by adding pred_cam_t_full (which is calculated here) to out['pred_keypoints_3d'] (which is calculated here). Then you can export the sum in a pkl file.