Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rendered depth video is black #59

Open
gkouros opened this issue Apr 6, 2022 · 8 comments
Open

Rendered depth video is black #59

gkouros opened this issue Apr 6, 2022 · 8 comments

Comments

@gkouros
Copy link

gkouros commented Apr 6, 2022

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 gkouros changed the title Depth is black Depth video is black Apr 6, 2022
@gkouros gkouros changed the title Depth video is black Rendered depth video is black Apr 6, 2022
@renliao
Copy link

renliao commented Apr 29, 2022

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

@gkouros
Copy link
Author

gkouros commented Apr 29, 2022

Unfortunately, I haven't figured this out yet.

@yashbhalgat
Copy link

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.

@gkouros
Copy link
Author

gkouros commented May 5, 2022

@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

disp_map = 1./torch.max(1e-10 * torch.ones_like(depth_map), depth_map / torch.sum(weights, -1))

@vanshilshah97
Copy link

Were you able to resolve the issue ?

@lachholden
Copy link

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

@Yuchen-Song
Copy link

Have you fixed that problem?

@rockywind
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants