SfmLearner-Pytorch icon indicating copy to clipboard operation
SfmLearner-Pytorch copied to clipboard

Hello, how to visualize the true value of the depth map.

Open yangbinchao opened this issue 5 years ago • 4 comments

I want to compare my prediction performance by visualizing the true value of the picture(depth). How to display the ground_truth of the depth map?

yangbinchao avatar Sep 29 '20 07:09 yangbinchao

Hi,

you can easily log the ground truth with the tensor2array function. Here, in a very similar project, I made a little function that logs best and worst results that you can work on : https://github.com/ClementPinard/unsupervised-depthnet/blob/master/test_depth.py#L50

Note that the depth here is only a bunch of lidar rays, so not continuous.

ClementPinard avatar Oct 12 '20 14:10 ClementPinard

Hi,

you can easily log the ground truth with the tensor2array function. Here, in a very similar project, I made a little function that logs best and worst results that you can work on : https://github.com/ClementPinard/unsupervised-depthnet/blob/master/test_depth.py#L50

Note that the depth here is only a bunch of lidar rays, so not continuous.

Thank you very much. That solved my problem

yangbinchao avatar Nov 04 '20 09:11 yangbinchao

Hi,

you can easily log the ground truth with the tensor2array function. Here, in a very similar project, I made a little function that logs best and worst results that you can work on : https://github.com/ClementPinard/unsupervised-depthnet/blob/master/test_depth.py#L50

Note that the depth here is only a bunch of lidar rays, so not continuous.

Thank you for your reply, how can this kind of GT be generated ?

图片1

yangbinchao avatar Nov 19 '20 03:11 yangbinchao

Hi, you can easily log the ground truth with the tensor2array function. Here, in a very similar project, I made a little function that logs best and worst results that you can work on : https://github.com/ClementPinard/unsupervised-depthnet/blob/master/test_depth.py#L50 Note that the depth here is only a bunch of lidar rays, so not continuous.

Thank you for your reply, how can this kind of GT be generated ?

图片1

hi,have you achieve this funciton?

zx897 avatar Oct 16 '21 04:10 zx897

Hi, doing chores to clean up mi issue list, the visualization above can be obtained through scipy ND interpolator. See https://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.LinearNDInterpolator.html#scipy.interpolate.LinearNDInterpolator

So you just need to use this function to get the 3d points from lidar, and https://github.com/ClementPinard/SfmLearner-Pytorch/blob/master/data/kitti_raw_loader.py#L165 then use scipy's function to construct the interpolated depth map.

Note that it won't be accurate so it's only for vizualisation purpose.

ClementPinard avatar Jan 23 '23 13:01 ClementPinard