Yinghao-Li / 3DMM-fitting

Fit 3DMM to front and side face images simultaneously.
216 stars 53 forks source link

fitting front face issue #3

Closed cizmek777 closed 6 years ago

cizmek777 commented 6 years ago

Is there a way to fit face without profile face? I use these code in function fit_fandp_to_landmarks_linear() , but it doesn't fit facial expression well.

num_front_landmarks = len(front_landmarks)
num_profile_landmarks = len(profile_landmarks) 
#num_total_landmarks = num_front_landmarks + num_profile_landmarks 
num_total_landmarks = num_front_landmarks 

test data: save file as 'image_0146.pts' image_0146.txt

save image as 'image_0146.png' image_0146

and here is the result: https://i.loli.net/2018/07/28/5b5c2406b1053.png

Yinghao-Li commented 6 years ago

I'm sorry that I didn't reply earlier.

In this case, you can try the function core\fitting.fit_shape_and_pose(). This function is designed to fit frontal face without profile.

However, as this project is based on eos, I would suggest you use their python API directly if you do not need profile-fitting. Their project runs much faster since it is written in C++ while mine is completely in Python.

cizmek777 commented 6 years ago

thanks, it works.