Closed wuxiaolianggit closed 3 years ago
There was an error acquiring 3DDFA Expression Model,Can you provide Expression Model to Google cloud disk,thanks very much. @YuvalNirkin
The Expression Model is still downloadable. Check http://www.cbsr.ia.ac.cn/users/xiangyuzhu/projects/3DDFA/Code/3DDFA.zip and you can find it at /3DDFA_Release/Matlab/Model_Expression.mat
Thank you very much for your reply,Testing other pictures will lead to the following situation. How to solve it?
Thank you very much for your reply. When testing other pictures, the above results will appear. How to solve them? image@ @anhttran
When testing other pictures, the above results will appear. How to solve them? @ @YuvalNirkin
When testing other pictures, the above results will appear. How to solve them? @iacopomasi
I looks strange. Did you generate BaselFaceModel_mod.mat
and BaselFaceModel_mod.h5
with trimBaselFace.py
?
Can you try this code to make sure your mat file (and the h5 file respectively) is correct?
1) Add this function into utils.py
def projectBackExp(model,expr):
expr = np.reshape(expr, model.expEV.shape)
E = np.matmul(model.expPC, expr * model.expEV)
numVert = int(E.shape[0]/3)
return np.reshape(E,(numVert,3))
2) Run this code and check the output test.ply
import utils
import scipy.io
import numpy as np
BFM_path = '../3DMM_model/BaselFaceModel_mod.mat'
model = scipy.io.loadmat(BFM_path,squeeze_me=True,struct_as_record=False)
model = model["BFM"]
faces = model.faces-1
S,T = utils.projectBackBFM(model,np.zeros((198)))
gamma = np.zeros((29))
gamma[0] = -3
E = utils.projectBackExp(model,gamma)
utils.write_ply('test.ply', S+E, T, faces)
First of all, thank you very much for your reply,I did use trimBaselFace.py to generate BaselFaceModel_mod.mat and BaselFaceModel_mod.h5,I try to use the above methods to solve this problem. @anhttran
There was an error acquiring 3DDFA Expression Model,Can you provide Expression Model to Google cloud disk,thanks very much.