yfeng95 / PRNet

Joint 3D Face Reconstruction and Dense Alignment with Position Map Regression Network (ECCV 2018)
http://openaccess.thecvf.com/content_ECCV_2018/papers/Yao_Feng_Joint_3D_Face_ECCV_2018_paper.pdf
MIT License
4.95k stars 947 forks source link

[demo_texture.py + face3d/examples/3_transform.py] face position is off after vertices are rotated #72

Open speculaas opened 6 years ago

speculaas commented 6 years ago

Dear YadiraF, Thanks for your help!

By modifying demo_texture.py, I tried to rotate the vertices of one image then change its texture to another image's texture.

In "1. 3d reconstruction -> get texture.", I added this line : rotated_v = mesh.transform.rotate(vertices.copy(), [30, 0, 0]) # pitch, yaw, roll : positive : looking down, looking left, tilting head right

And I didn't modify other steps.

And the rotated vertices seemed not only rotated but also translated.

Can you help me investigate why?

Is this because the center of rotation is outside the face?

My image rendered from rotated vertices with new texture is as below :

output

input image :

image00081

ref image :

trump

BR, JimmyYS