深度估计方法monodepth2 PSMnet

monodepth2  预训练 批量测试

双目测距系列(三)monodepth2模型的测试 https://blog.csdn.net/avideointerfaces/article/details/105647031

官方保存的是伪彩色图,保存为灰度图:

colormapped_im = (mapper.to_rgba(disp_resized_np)[:, :, 3] * 255).astype(np.uint8)
改
colormapped_im = (mapper.to_rgba(disp_resized_np)[:, :, 0] * 255).astype(np.uint8)

批量处理 

python3 slz_test_batch.py --image_path /kitti_07/image_0 --model_name stereo_1024x320

深度估计方法monodepth2 PSMnet_第1张图片效果

 

PSMnet 预训练批量

论文阅读笔记《Pyramid Stereo Matching Network》https://blog.csdn.net/qq_36104364/article/details/79940969

运行PSMNet网络时遇到的问题及解决方案

https://blog.csdn.net/qq_36104364/article/details/80406327?utm_medium=distribute.pc_aggpage_search_result.none-task-blog-2~all~first_rank_v2~rank_v25-4-80406327.nonecase&utm_term=psmnet%E9%A2%84%E8%AE%AD%E7%BB%83%E9%AA%8C%E8%AF%81%E5%87%BA%E9%97%AE%E9%A2%98&spm=1000.2123.3001.4430

 

python3.6 torch1.4 torchvision0.5.0 运行记录

python Test_img.py --loadmodel weight/pretrained_model_KITTI2015.tar --leftimg ~/dataset/kitti_07/image_0/000000.png --rightimg ~/dataset/kitti_07/image_1/000000.png

报错;

File "Test_img.py", line 12, in 
    from models import *
  File "/home/shilinzhe/PSMNet/models/__init__.py", line 1, in 
    from .basic import PSMNet as basic
  File "/home/shilinzhe/PSMNet/models/basic.py", line 8, in 
    from submodule import *
ModuleNotFoundError: No module named 'submodule'

猜测是官方要求的python3.7 特性,

改为  from .submodule import *  (加个点)

File "/home/shilinzhe/PSMNet/models/stackhourglass.py", line 138
    cost1 = F.upsample(cost1, [self.maxdisp,left.size()[2],left.size()[3]], mode='trilinear')
                                                                                            ^
TabError: inconsistent use of tabs and spaces in indentation

改:把对应位置的tab换空格.....

kitti07  批量处理

python slz_Test_img_batch.py --loadmodel weight/pretrained_model_KITTI2012.tar --leftimg ~/dataset/kitti_07/image_0/ --rightimg ~/dataset/kitti_07/image_1/ --output ~/dataset/kitti_07/disp_psmnet/

深度估计方法monodepth2 PSMnet_第2张图片

 

其他

AD-census

rSGM

SGBM

你可能感兴趣的:(深度估计)