microsoft / Deep3DFaceReconstruction

Accurate 3D Face Reconstruction with Weakly-Supervised Learning: From Single Image to Image Set (CVPRW 2019)
MIT License
2.18k stars 442 forks source link

not able to find the morphable.mat file and BFM_model_front.mat in the BFM MODEL SITE #78

Closed Vamshigoud784 closed 4 years ago

Vamshigoud784 commented 4 years ago

Hi as you have said in instructions, i have received a email containing the h5 files link but i was not able to find the BFM_modelfront.mat as you have mentioned. please can you add some link where can i get those files . please help needed. Thanks[ ]

YuDeng commented 4 years ago

If you get access to the basel face model 2009, they should provide you a link to download their original model, which contains a file named 01_MorphableModel.mat. Then you can run demo.py and BFM_model_front.mat will be generated automatically.

Vamshigoud784 commented 4 years ago

BFM_model_front

Hi Yu, Thanks for the fast response i got the 01_MorphableModel.mat File and i have run demo.py but it's not generationg the BFM_model_front.mat automatically. is there something i'm doing wrong? Please have a look at this. Thanks for the reply Screenshot from 2020-06-01 12-34-59 Screenshot from 2020-06-01 12-35-41 Screenshot from 2020-06-01 12-38-39

YuDeng commented 4 years ago

Hi, the code should check if BFM_model_front.mat exists in line 31, 32 in demo.py. If the file doesn't exist, demo.py should load transferBFM09 function to create the required .mat file. Can you check if these two lines have actually run?

Vamshigoud784 commented 4 years ago

Hi, the code should check if BFM_model_front.mat exists in line 31, 32 in demo.py. If the file doesn't exist, demo.py should load transferBFM09 function to create the required .mat file. Can you check if these two lines have actually run?

Hi i was able to run the code now but the error keeps coming please have a look at it. thanks for amazing response. Screenshot from 2020-06-01 13-05-29

YuDeng commented 4 years ago

What version of tensorflow are you using? The error seems to be caused by an incompatible version. I suggest using tensorflow 1.12 or lower version to run the code.

Vamshigoud784 commented 4 years ago

What version of tensorflow are you using? The error seems to be caused by an incompatible version. I suggest using tensorflow 1.12 or lower version to run the code.

Thanks i have downgraded tensorflow now . i have another issue now. i have posted my dependencies too please let me know if any of it is wrong? Screenshot from 2020-06-01 13-21-08 Screenshot from 2020-06-01 13-20-37

YuDeng commented 4 years ago

This is caused by tf_mesh_renderer library. The tf_mesh_renderer lib will compile using corresponding tensorflow version. If you install tf_mesh_renderer first and then change the tf version, it can also cause an incompatible error. In this case, you can uninstall tf_mesh_renderer then install it again.

Vamshigoud784 commented 4 years ago

Hi Yu, Thanks. it is working now but how can i get texture for the obj file . but how can i get texture file or material file . for the face colour . i have mat file how can i export to import the colours on mesh obj mesh

YuDeng commented 4 years ago

The face color information is recorded in each vertex in .obj file. You can use Mashlab to view it. I am not so sure how to view them in Blender. You may need to transfer it to the format you need.

Vamshigoud784 commented 4 years ago

The face color information is recorded in each vertex in .obj file. You can use Mashlab to view it. I am not so sure how to view them in Blender. You may need to transfer it to the format you need.

Hi this is the output i got. its so real but i noticed that all output obj have same colour eyes and i cannot see the lip colour in this? is there something i'm missing like i have seen one of these issues will uv_mat will help in adding more colours to face? gigi2 meshs

YuDeng commented 4 years ago

Colors of eyes and lips may not be reconstructed faithfully due to the ability of BFM itself. The color of a face is totally depicted by a texture vector instead of directly copied from the input image. To obtain better color, mixing the current result with color extracted from the input image can be a good choice.