JiawangBian / sc_depth_pl

SC-Depth (V1, V2, and V3) for Unsupervised Monocular Depth Estimation Webpage:https://jiawangbian.github.io/sc_depth_pl/
GNU General Public License v3.0
423 stars 70 forks source link

Pixel size problem #68

Open dasda-asd opened 11 months ago

dasda-asd commented 11 months ago

It's a great job! The output depth map is not the same size as the input RGB image. How can I modify the code so that the output depth map is the same size as the input RGBD image? I would appreciate it if I could get your reply.

JiawangBian commented 11 months ago

you can map the output depth to any resolution by using cv2.resize() function

dasda-asd commented 11 months ago

you can map the output depth to any resolution by using cv2.resize() function

Thank you for your answer! I run the following command: python inference.py --config configs/v3/tum.txt --input_dir image/ --output_dir output/ --ckpt_path /epoch=88-val_loss=0.1632.ckpt --save-vis --save-depth. I conducted tests on the TUM dataset. The size of the input RGB picture is (640 x 480), and the size of the output depth map is (320 x 256). Using the cv2.resize() function to restore the depth map size to (640 x 480), are the depth values of these recovered pixels accurate?

dasda-asd commented 11 months ago

you can map the output depth to any resolution by using cv2.resize() function Thank you for your answer! The size of the input RGB picture is (640 x 480), and the size of the output depth map is (320 x 256). Using the cv2.resize() function to restore the depth map size to (640 x 480), are the depth values of these recovered pixels accurate?