facebookresearch / pifuhd

High-Resolution 3D Human Digitization from A Single Image.
Other
9.5k stars 1.44k forks source link

Is there an easy way to generate a depth map? #109

Closed nosy-b closed 3 years ago

nosy-b commented 3 years ago

As we get the Normal Map as output png, could we also get a png with the DepthMap?

Thanks!

nosy-b commented 3 years ago

Ok I added a function in render_turntable.py to output Depth instead of normals :) I guess I could compute it earlier without the need to generate the mesh which takes a long time... piFuHDWithDepthjpg

sandorkonya commented 2 years ago

@nosy-b , i am looking for the same output (depth map) and I found the code for generating normals in the mesh.py, https://github.com/facebookresearch/pifuhd/blob/ee51fc23629c4afc99dbfd235c5b8bbd77a86aa2/lib/render/mesh.py#L303 but is there a function for generating depth maps, seems not to be in there. Would you mind sharing your solution if it's not proprietary or the way to solve this, please?

Thank you in advance!

sanazsab commented 2 years ago

It is also the same question from my side for but is there a function for generating depth maps, seems not to be in there.

Have you found sth for that?

sandorkonya commented 2 years ago

@sanazsab nope.

lql1233 commented 2 years ago

好的,我在 render_turntable.py 中添加了一个函数来输出深度而不是法线:) 我想我可以更早地计算它而无需生成需要很长时间的网格...... piFuHDWithDepthjpg

Did you use the get_value function? How did you use it? My problem is that I need the sample.vs file, but I don't know what this file is? How did you do it?