hongsukchoi / Pose2Mesh_RELEASE

Official Pytorch implementation of "Pose2Mesh: Graph Convolutional Network for 3D Human Pose and Mesh Recovery from a 2D Human Pose", ECCV 2020
MIT License
677 stars 69 forks source link

Draw overlay of human mesh and original picture #7

Closed BennyWnj closed 3 years ago

BennyWnj commented 3 years ago

Hi, is there code to draw human mesh on top of the original rgb picture as displayed in the paper?

hongsukchoi commented 3 years ago

Hi, it’s in the demo code

BennyWnj commented 3 years ago

Do you mean the two lines of codes that were commented on in render() function in run.py? I tried to uncomment the two lines and use my img path. The 2d keypoints were correctly mapped on the original image, but the human mesh overlay didn't seem correct.

demo_2Dpose_test demo_mesh_test

hongsukchoi commented 3 years ago

Hi, did you also comment this line?
img = np.zeros((img_res, img_res, 3)) # dummy

BennyWnj commented 3 years ago

yes

hongsukchoi commented 3 years ago

Hi, you should change this line toimg_shape = 255 * renderer(pred_vertices, camera_translation, img / 255.)

I have plan to update some codes, and I will update the demo code also. Thank you for noting me!

BennyWnj commented 3 years ago

Thanks, that works.