nabeel3133 / combining3Dmorphablemodels

Project Page of Combining 3D Morphable Models: A Large scale Face-and-Head Model - [CVPR 2019]
http://openaccess.thecvf.com/content_CVPR_2019/html/Ploumpis_Combining_3D_Morphable_Models_A_Large_Scale_Face-And-Head_Model_CVPR_2019_paper.html
MIT License
86 stars 8 forks source link

Not working #1

Closed BouOus closed 4 years ago

BouOus commented 4 years ago

Hello,

I think there is a problem in the code, I followed all the steps. But I do not get a good result

Capture du 2019-12-05 16-19-03

Here is a screenshot of what I get !

Thank you

nabeel3133 commented 4 years ago

@BouOus Can you let me know how many total heads and corresponding face shape parameters did you learn the regression matrix on?

BouOus commented 4 years ago

i used 700 heads and [100 params for the LYHM model] and [199 param for the BFM model].

Can you give me your Regression Matrix to test in my own generated BFM model ?

Thank you

nabeel3133 commented 4 years ago

Hello @BouOus. Can you send me your Input_Face.obj so I can verify whether there is an issue with the input or not.

Thank you!

BouOus commented 4 years ago

Hi

Here is my Input_Face.obj Input_Face.obj.zip

Thank you!

nabeel3133 commented 4 years ago

@BouOus There is something wrong with your input. Try checking the attached "Input_Face.obj" on your regression matrix. Input_Face.zip

BouOus commented 4 years ago

It's working thank you,

Can you give me your line code to generate the Obj BFM model (Input_Face.obj)

Thank you

nabeel3133 commented 4 years ago

The attached code snippet extracts a face from BFM Model (BFM Eigenspace)[01_MorphableModel.mat]. However, it extracts the same face every time. In order to generate different BFM faces, you will need to change the shape parameters which is a 199x1 dimensional vector for BFM model.

face_model_dict = loadmat('01_MorphableModel.mat') face_U = face_model_dict['shapePC'] face_mean = face_model_dict['shapeMU'] shape_parameter = np.ones((np.shape(face_U)[1],1)) input_face_tensor = face_mean + np.matmul(face_U,shape_parameter)

To learn more about generating different shape parameters provided only a single image, refer to the following repository: -> https://github.com/microsoft/Deep3DFaceReconstruction

BouOus commented 4 years ago

can you give me your script to generate random BFM and save it into obj. I tried with many ways but I still can not have the same heads for both models.

Thank you

nabeel3133 commented 4 years ago

@BouOus Please refer to the following commit: https://github.com/nabeel3133/combining3Dmorphablemodels/commit/714c30a8e8de9eba367c9999b50bf5f7f88d6e14 I have also edited the README.md. Make sure to read it again.

BouOus commented 4 years ago

Thank you for your answer I was sure the code did not work. I tried in many ways and it still produces the same heads. Capture du 2019-12-10 09-35-47

nabeel3133 commented 4 years ago

@BouOus The code will produce the same heads if the regression matrix is learned from only a few head and corresponding face shape parameters or if the shape parameters of the randomly generated bfm faces are close to eachother. Also you won't be able to see the difference in the shape of the head if you see it from the front. You need to open different heads in the same project of Meshlab and see them from either right or left side of the mesh by hiding and unhiding different head meshes. By doing that, you will be able to see the difference.