yfeng95 / PRNet

Joint 3D Face Reconstruction and Dense Alignment with Position Map Regression Network (ECCV 2018)
http://openaccess.thecvf.com/content_ECCV_2018/papers/Yao_Feng_Joint_3D_Face_ECCV_2018_paper.pdf
MIT License
4.95k stars 947 forks source link

How to get the z-value's map? #8

Closed hangkaitan closed 6 years ago

hangkaitan commented 6 years ago

Can you tell me how to get the face depth-map throw. I want to get the map, but i don't know how to deal with it. Thank you very much.

yfeng95 commented 6 years ago

Hi, the z-channel of vertices is actually the depth value, the problem is they are not pixel-pixel corresponding to the 2D image. So a simple way is to interpolate the value then get the depth-map(which means each pixel in 2D image has a depth value). A more accurate way is to render the mesh(which interpolates using triangles) and then get the depth channel. I think they have few differences if your input image is not too large.

If you are still confused with this, I will write a function that you can directly get the depth map. But I may do this one or two months later.

Thanks for your reporting.

GewelsJI commented 5 years ago

Hi! @YadiraF I have the same problem as he and fail to deal with it? Can you provide some help with me about how to generate hotmap(facial depth map) from vertices?

nwdxbx commented 5 years ago

Hi, the z-channel of vertices is actually the depth value, the problem is they are not pixel-pixel corresponding to the 2D image. So a simple way is to interpolate the value then get the depth-map(which means each pixel in 2D image has a depth value). A more accurate way is to render the mesh(which interpolates using triangles) and then get the depth channel. I think they have few differences if your input image is not too large.

If you are still confused with this, I will write a function that you can directly get the depth map. But I may do this one or two months later.

Thanks for your reporting.

Hi, I also want to get the depth map of face .but I could't find the function that directly get the depth map. could you tell me where is it . Thank you very much.