Deep3DFaceRecon_pytorch icon indicating copy to clipboard operation
Deep3DFaceRecon_pytorch copied to clipboard

How to visualize the face mesh without texture and color?

Open YiwuZhong opened this issue 3 years ago • 3 comments

Hi,

Thanks for your great work! I was wondering is there a way to visualize the face mesh on 2D image without texture and color?

One good example is 3rd column of Figure 2 in your paper. The default output is 2nd column in Figure 2 and no direct output can be the 3rd column visualization.

Best, Yiwu

YiwuZhong avatar Oct 20 '21 16:10 YiwuZhong

Hi, it also bothers me now. Have you found any solution? Thanks.

haonanhe avatar Nov 07 '22 08:11 haonanhe

hi, it is currently troubling me as well. Have you managed to solve it? I made changes to these two lines of code, but I didn't get the correct result.

def compute_color(self, face_texture, face_norm, `gamma):
        gamma = torch.ones_like(gamma)
        .....
        face_color = torch.cat([r, g, b], dim=-1)
        .....

chenhao-user avatar Oct 31 '23 12:10 chenhao-user

https://github.com/sicxu/Deep3DFaceRecon_pytorch/blob/b9e6fa89ea1566bb9ec27922f6f5d87c34b4b261/models/bfm.py#L294 face_texture = torch.ones(1,35709,3).float().cuda()*0.7
you could set the face_texture to a pure color here

StephanPan avatar Jan 02 '24 09:01 StephanPan