Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to convert Deep3DFace reusult mesh to flame? #17

Open
skeras opened this issue Aug 11, 2022 · 6 comments
Open

How to convert Deep3DFace reusult mesh to flame? #17

skeras opened this issue Aug 11, 2022 · 6 comments

Comments

@skeras
Copy link

skeras commented Aug 11, 2022

Hi,
This project use standard BFM2009 convert to FLame, but deep3dface (https://github.com/sicxu/Deep3DFaceRecon_pytorch.git) generate mesh is not standart (71418,3), how to convert this mesh to flame?
Thanks a lot!

@TimoBolkart
Copy link
Owner

Can you provide one Deep3DFace mesh for reference?

@skeras
Copy link
Author

skeras commented Sep 6, 2022

@TimoBolkart
Copy link
Owner

Sorry, I missed that. Deep3DFace uses BFM as underlying model. Do you have the vertex indices of those cropped faces?

@LinShiqi047
Copy link

I have the same problem as well.

@LinShiqi047
Copy link

    # vertex indices for each face. starts from 0. [F,3]
    self.face_buf = model['tri'].astype(np.int64) - 1
    # vertex indices for 68 landmarks. starts from 0. [68,1]
    self.keypoints = np.squeeze(model['keypoints']).astype(np.int64) - 1

    if is_train:
        # vertex indices for small face region to compute photometric error. starts from 0.
        self.front_mask = np.squeeze(model['frontmask2_idx']).astype(np.int64) - 1
        # vertex indices for each face from small face region. starts from 0. [f,3]
        self.front_face_buf = model['tri_mask2'].astype(np.int64) - 1
        # vertex indices for pre-defined skin region to compute reflectance loss
        self.skin_mask = np.squeeze(model['skinmask'])

@hu394854434
Copy link

I look up your code and the sparse matrix,and the sum of each row , I found that your processing of bfm to flame is to generate vertex of flame with weighted vectices of bfm, so how you get the weight

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants