cleardusk / 3DDFA

The PyTorch improved version of TPAMI 2017 paper: Face Alignment in Full Pose Range: A 3D Total Solution.
MIT License
3.61k stars 654 forks source link

obama@demo #88

Closed Asiyeh-Bahaloo closed 5 years ago

Asiyeh-Bahaloo commented 5 years ago

Hello This is a great work and thank you for sharing your code. But i have some problem understanding it. There is a frame rendered with 3D model in obama@demo file. I looked in the code but there is no documentation on how u did this. I know how to calculate R,T and the 3DMM model but how can i render this 3DMM on face? how should i align 3DMM and face? I appreciate if you explain it theoretically or just mention the code.

Thank you

cleardusk commented 5 years ago

I'm quite busy these days, but I may give a code demo or an explanation soon.

Asiyeh-Bahaloo commented 5 years ago

Thank you very much

cleardusk commented 5 years ago

Please see rendering_demo.py for details.

Asiyeh-Bahaloo commented 5 years ago

Thank you very much for your code. But my problem is how to use R,T. I mean The model we have is a frontal view of face which has R,T = 0 , But obama's face have some rotation and translation. So for aligning this two we just need to rotate and translate the 3D model of face, which needs ( as far as i know) triangulation , world coordinate origin and etc. I cant find the code for this part. Thank you again

cleardusk commented 5 years ago

What do you mean aligning?

Asiyeh-Bahaloo commented 5 years ago

I want to align (Superimpose) the 3D model which is in origin of the world with obama'c face which is in some R,T. So i need to move and rotate this 3D model so it can lay on obama's face. Am i right? or the 3D model is already have some rotation and translation?

cleardusk commented 5 years ago

You may refer to similarity transform or ICP, registration.

Asiyeh-Bahaloo commented 5 years ago

I thought you used something like projection matrix.