nerf-pytorch
nerf-pytorch copied to clipboard
Rendered depth video is black
I try to train a NeRF on the lego bulldozer scene, and although the RGB video comes out as expected, the depth video is just black. I'm using torch==1.8.1 and torchvision==0.9.1 with cuda-10.2. Any idea, what could be going wrong?
Hello! I have the problem also, did you solve it successfully?
Unfortunately, I haven't figured this out yet.
You need to normalize the depth_map
(or disp_map
) values to the range of [0.0,1.0]
before visualizing them or saving as images.
Simply doing disp_map = (disp_map - disp_map.min()) / (disp_map.max() - disp_map.min())
will work.
@yashbhalgat I already tried that before creating the disparity video, but it seems that the disparity contains nans which is the main problem. At what point do you perform the normalization? Btw, I see that the nans originate from the following line https://github.com/yenchenlin/nerf-pytorch/blob/a15fd7cb363e93f933012fd1f1ad5395302f63a4/run_nerf.py#L299
Were you able to resolve the issue ?
I'm also having this issue – there are occasional artefacts that pass through the video, but most of the time it's just black.
Have you fixed that problem?
Hi, What's the difference between disparity map and depth map? How can I get the real world scale depth map?