microsoft / Deep3DFaceReconstruction

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

Reconstructed image #72

Open KhurramPirov opened 4 years ago

KhurramPirov commented 4 years ago

After launching demo and visualization recon_img I got only grey contour of the face and some trace of the mouth. All other stuff works well, thank you!

YuDeng commented 4 years ago

Hi, can you post the recon_img here so that I might figure out what is wrong.

KhurramPirov commented 4 years ago

Hi, can you post the recon_img here so that I might figure out what is wrong.

Recon_img_3DMM I have just plotted reconimg for vd051.png,

YuDeng commented 4 years ago

This is quite strange. Does the output .obj file seems reasonable? You can also check the value of each pixel in the recon_img to see if there is any illegal value (for example out of the range of 0-255). And you can try to convert the pixel value to uint8 then plot the image again.

KhurramPirov commented 4 years ago

This is quite strange. Does the output .obj file seems reasonable? You can also check the value of each pixel in the recon_img to see if there is any illegal value (for example out of the range of 0-255). And you can try to convert the pixel value to uint8 then plot the image again.

All is in right range, type uint8, mesh is reasonable. snapshot_vd05100

@YuDeng any suggestions, ideas, what is wrong?

KhurramPirov commented 4 years ago

0001_01 0001_01_colors_yadira I've also tried to use rendering from PR_Net and texture coeffs from your work but got artefacts.

YuDeng commented 4 years ago

Hi, seems that the renderer from PR_Net do not handle self-occlusion so it may cause artifacts for certain part (e.g nose). I'm not sure why tf_mesh_renderer does not work in your circumstance. You can try to build it with bazel following their instruction instead of using pip install.

HOMGH commented 4 years ago

This is quite strange. Does the output .obj file seems reasonable? You can also check the value of each pixel in the recon_img to see if there is any illegal value (for example out of the range of 0-255). And you can try to convert the pixel value to uint8 then plot the image again.

All is in right range, type uint8, mesh is reasonable. snapshot_vd05100

@YuDeng any suggestions, ideas, what is wrong?

Hi, Could you fix this problem? I have the same one when try to plot the rendered face! The output is the same as yours. Appreciate your help

ChunpongLai-Danny commented 3 years ago

Solution I come with is first convert it to uint8 then convert it to RGB.

recon_img = mat["recon_img"] recon_img = recon_img.astype(np.uint8) recon_img = Image.fromarray(recon_img) recon_img = recon_img.convert("RGB") recon_img.show() ## should work