yfeng95 / face3d

Python tools for 3D face: 3DMM, Mesh processing(transform, camera, light, render), 3D face representations.
2.68k stars 614 forks source link

Differences of result between mesh(cython) and mesh_numpy version #54

Open rinsa318 opened 5 years ago

rinsa318 commented 5 years ago

I really appreciate your great work. Your code helped me a lot. I tried to run "7_generate_uv.py". I was able to reproduce same result with you when I use your function named mesh(cython) version. However I got noisy result around border of image when I use mesh_numpy version. Could you please tell me why is this problem happening?

uv_texture_map mesh(cython)

uv_texture_map mesh_numpy

P.S. the result of position map has noise around border as well when I use mesh_numpy

yqwu94 commented 5 years ago

@rinsa318, Hi, can you provide me with your BFW_UV.mat file? I was not able to reproduce same result with you after running 7_generate_uv.py. About the noise around border of image, I thank that you can modify the mesh_core.cpp.

sublimationAC commented 4 years ago

Hi, thank the owner for great work at first. I encountered the same problem. Actually, I read both the numpy and cython version codes. I found there was a difference when judging whether the point is in the triangle. In cython version, the author considers about the border whether it's less than 2 or more than w-2, while not in numpy version, as the result pictures posted by rinsa318. I can't figure out the reason, after thinking for 2 weeks. Does anyone know it, please tell me? Thanks~

HOMGH commented 4 years ago

I really appreciate your great work. Your code helped me a lot. I tried to run "7_generate_uv.py". I was able to reproduce same result with you when I use your function named mesh(cython) version. However I got noisy result around border of image when I use mesh_numpy version. Could you please tell me why is this problem happening?

uv_texture_map mesh(cython)

uv_texture_map mesh_numpy

P.S. the result of position map has noise around border as well when I use mesh_numpy

Hi Could anyone run demo without error? I'm getting this error: err, "a mismatch between the current graph and the graph") when I use the pre-trained model.