nerf-pytorch icon indicating copy to clipboard operation
nerf-pytorch copied to clipboard

Rendered depth video is black

Open gkouros opened this issue 2 years ago • 8 comments

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?

gkouros avatar Apr 06 '22 13:04 gkouros

Hello! I have the problem also, did you solve it successfully?

renliao avatar Apr 29 '22 03:04 renliao

Unfortunately, I haven't figured this out yet.

gkouros avatar Apr 29 '22 07:04 gkouros

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 avatar May 04 '22 20:05 yashbhalgat

@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

gkouros avatar May 05 '22 10:05 gkouros

Were you able to resolve the issue ?

vanshilshah97 avatar Jul 15 '22 21:07 vanshilshah97

I'm also having this issue – there are occasional artefacts that pass through the video, but most of the time it's just black.

lachholden avatar Aug 03 '22 03:08 lachholden

Have you fixed that problem?

Yuchen-Song avatar Sep 07 '22 14:09 Yuchen-Song

Hi, What's the difference between disparity map and depth map? How can I get the real world scale depth map?

rockywind avatar Jan 19 '23 07:01 rockywind