facebookresearch/consistent_depth

How can I get the real depth from the output?

ChenLingFeng22 opened this issue · 4 comments

Hi, thanks for your brilliant job, the result is really amazing. I am a noob in this field and I see the visulization of the result is the disparity map, not the depth map. I see that if you want to convert the disparty to the depth, you should konw the baseline first. But this is a monocular depth estimation job, is the baseline the distance of the camera between two frames in world coordinates? Can I get the real depth from the output directly? How can I convert the output to the real depth? Looking forward to your answer.

@ChenLingFeng22 Any luck with this, how do we know what two cameras were used for each pixel to get the baseline?

I think this has been explained from the code:
https://github.com/facebookresearch/consistent_depth/blob/master/depth_fine_tuning.py

depth should be equal to the inverse of the output raw image. Not the disparity equation from common sense.

        depth = depth.detach().cpu().numpy().squeeze()
        inv_depth = 1.0 / depth

        image_io.save_raw_float32_image(
            depth_fmt.format(frame_id) + ".raw", inv_depth)

Please correct me if I am wrong. I think the authors don't like others to find easy depth output.

I think this has been explained from the code:
https://github.com/facebookresearch/consistent_depth/blob/master/depth_fine_tuning.py

depth should be equal to the inverse of the output raw image. Not the disparity equation from common sense.

        depth = depth.detach().cpu().numpy().squeeze()
        inv_depth = 1.0 / depth

        image_io.save_raw_float32_image(
            depth_fmt.format(frame_id) + ".raw", inv_depth)

Please correct me if I am wrong. I think the authors don't like others to find easy depth output.

I use those final png files. why did author save inv_depth = 1.0 / depth? Is there any particular reason?

Does anybody know the unit of actual depth? Are they in meters, feet, inches, or sth else?
thanks.