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

Query regarding depth map. #133

Closed
rohitcmohite opened this issue Sep 25, 2021 · 2 comments
Closed

Query regarding depth map. #133

rohitcmohite opened this issue Sep 25, 2021 · 2 comments

Comments

@rohitcmohite
Copy link

rohitcmohite commented Sep 25, 2021

Hi , Thanks a lot for your work, its very inspiring.

  1. After executing run_inference.py the depth image obtained is a 3 channel image, so how can I get the actual depth of each pixel in the image?
    Does any of those 3 channels represent the depth of the corresponding pixel?

  2. Also, what I understood by now is that, the depthmap obtained from the network dosent provide the direct actual depth but it is the scaled depth. So I need to compare the scaled depth obtained from the network with the ground truth value and find the scaling factor. And this scaling factor I can use it everytime further to get the actual depth from the scaled depth. Could you please confirm if I am understanding it correctly.

  3. I am currently trying it on KITTI dataset. Could it be possible to calculate the depthmap ourself using the disparity map obtained from the model?

Thank You.

@ClementPinard
Copy link
Owner

Hi,

  1. No, it's juste a vizualisation. If you want to output actual depth, you can this line here. Careful, it will be much heavier as it's uncompressed floats.
np.save(output_dir/'{}_depth.npy'.format(file_name), depth)
  1. The scale factor is undetermined. That's the main pain point of this work, it's not constant with the network, you need to find it each time. You could try a scale factor that works for most images, but there is no guarantee at all. The method to get it in the original paper is to compare the median of prediction with median of groundtruth. The proposed alternitve method here is to compare movement magnitude prediction with Posent with groundtruth odometry, either from GPS or from integrating wheel speed.
  2. As said above, the depth map needs a scale factor to be computed. It's up to you how you get it since KITTI features both Lidar and odometry. Odometry is more realistic if you plan to use it on your own device where chances are that you have Lidar data

@rohitcmohite
Copy link
Author

Hello, Thank you. Will definitely try it out.

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

No branches or pull requests

2 participants