PSMNet环境搭建以及问题

1.下载

https://github.com/JiaRenChang/PSMNet

解压

PSMNet-master$ ls
dataloader  finetune.py  LICENSE  main.py  models  README.md  run.sh  submission.py  utils

ubuntu下已经安装

2. 训练运行

 PSMNet-master$ python finetune.py 


Traceback (most recent call last):
File "finetune.py", line 5, in <module>
import torch

 

3.评估运行

PSMNet-master$ python submission.py 
Traceback (most recent call last):
File "submission.py", line 5, in <module>

import torch
ImportError: No module named torch

 

4.

环境:Centos7.3 , python 3.5

安装:GPU 版本pytorch-0.4.0以及torchvision0.2.1

步骤:

1.由于官网无法选择版本(可能是浏览器原因),因此下载whl文件:

http://download.pytorch.org/whl/cu80/torch-0.4.0-cp35-cp35m-linux_x86_64.whl
2.上传至服务器,然后安装

pip install torch-0.4.0-cp35-cp35m-linux_x86_64.whl
3.安装torchvision0.2.1:

①下载torchvision-0.2.1-py2.py3-none-any.whl

https://pypi.org/project/torchvision/#files
②安装torchvision
pip install torchvision-0.2.1-py2.py3-none-any.whl
 

5.

$ pip install torch-0.4.1-cp27-cp27m-linux_x86_64.whl 
torch-0.4.1-cp27-cp27m-linux_x86_64.whl is not a supported wheel on this platform.
You are using pip version 10.0.1, however version 18.1 is available.

 

6.

https://pytorch.org/

 

pip install torch-0.4.1-cp27-cp27mu-linux_x86_64.whl 
Processing ./torch-0.4.1-cp27-cp27mu-linux_x86_64.whl
distributed 1.21.8 requires msgpack, which is not installed.
grin 1.2.1 requires argparse>=1.1, which is not installed.
Installing collected packages: torch
Successfully installed torch-0.4.1
You are using pip version 10.0.1, however version 18.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

 

 

$python submission.py 
/usr/local/anaconda2/lib/python2.7/site-packages/matplotlib/font_manager.py:278: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
  'Matplotlib is building the font cache using fc-list. '
Traceback (most recent call last):
  File "submission.py", line 19, in <module>
    from utils import preprocess 
  File "/devdata/lizuoguang/deep/stereonet/PSMNet-master/utils/preprocess.py", line 2, in <module>
    import torchvision.transforms as transforms
ImportError: No module named torchvision.transforms

 

7.

https://pypi.org/project/torchvision/

https://pypi.org/project/torchvision/0.2.0/#files

 

8.

 pip install torchvision-0.2.0-py2.py3-none-any.whl 
Processing ./torchvision-0.2.0-py2.py3-none-any.whl
Requirement already satisfied: six in /usr/local/anaconda2/lib/python2.7/site-packages (from torchvision==0.2.0) (1.11.0)
Requirement already satisfied: numpy in /usr/local/anaconda2/lib/python2.7/site-packages (from torchvision==0.2.0) (1.14.3)
Requirement already satisfied: torch in /usr/local/anaconda2/lib/python2.7/site-packages (from torchvision==0.2.0) (0.4.1)
Requirement already satisfied: pillow>=4.1.1 in /usr/local/anaconda2/lib/python2.7/site-packages (from torchvision==0.2.0) (5.1.0)
distributed 1.21.8 requires msgpack, which is not installed.
grin 1.2.1 requires argparse>=1.1, which is not installed.
Installing collected packages: torchvision
Successfully installed torchvision-0.2.0
You are using pip version 10.0.1, however version 18.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

 

9.


$ python submission.py 
Traceback (most recent call last):
  File "submission.py", line 52, in <module>
    test_left_img, test_right_img = DA.dataloader(args.datapath)
  File "/devdata/lizuoguang/deep/stereonet/PSMNet-master/dataloader/KITTI_submission_loader.py", line 23, in dataloader
    image = [img for img in os.listdir(filepath+left_fold) if img.find('_10') > -1]
OSError: [Errno 2] No such file or directory: '/media/jiaren/ImageNet/data_scene_flow_2015/testing/image_2/'

10.

 python submission.py 
Traceback (most recent call last):
  File "submission.py", line 62, in <module>
    model.cuda()
  File "/usr/local/anaconda2/lib/python2.7/site-packages/torch/nn/modules/module.py", line 258, in cuda
    return self._apply(lambda t: t.cuda(device))
  File "/usr/local/anaconda2/lib/python2.7/site-packages/torch/nn/modules/module.py", line 185, in _apply
    module._apply(fn)
  File "/usr/local/anaconda2/lib/python2.7/site-packages/torch/nn/modules/module.py", line 185, in _apply
    module._apply(fn)
  File "/usr/local/anaconda2/lib/python2.7/site-packages/torch/nn/modules/module.py", line 185, in _apply
    module._apply(fn)
  File "/usr/local/anaconda2/lib/python2.7/site-packages/torch/nn/modules/module.py", line 185, in _apply
    module._apply(fn)
  File "/usr/local/anaconda2/lib/python2.7/site-packages/torch/nn/modules/module.py", line 185, in _apply
    module._apply(fn)
  File "/usr/local/anaconda2/lib/python2.7/site-packages/torch/nn/modules/module.py", line 191, in _apply
    param.data = fn(param.data)
  File "/usr/local/anaconda2/lib/python2.7/site-packages/torch/nn/modules/module.py", line 258, in <lambda>
    return self._apply(lambda t: t.cuda(device))
RuntimeError: Cannot initialize CUDA without ATen_cuda library. PyTorch splits its backend into two shared libraries: a CPU library and a CUDA library; this error has occurred because you are trying to use some CUDA functionality, but the CUDA library has not been loaded by the dynamic linker for some reason.  The CUDA library MUST be loaded, EVEN IF you don't directly use any symbols from the CUDA library! One common culprit is a lack of -Wl,--no-as-needed in your link arguments; many dynamic linkers will delete dynamic library dependencies if you don't depend on any of their symbols.  You can check if this has occurred by using ldd on your binary to see if there is a dependency on *_cuda.so library.

 

10.download data.

http://www.cvlibs.net/datasets/kitti/eval_scene_flow.php?benchmark=stereo

Download stereo 2015/flow 2015/scene flow 2015 data set (2 GB)

https://s3.eu-central-1.amazonaws.com/avg-kitti/data_scene_flow.zip

 

11.

https://pytorch.org/

 

pip install https://download.pytorch.org/whl/cu80/torch-1.0.0-cp27-cp27mu-linux_x86_64.whl
pip install torchvision

# if the above command does not work, then you have python 2.7 UCS2, use this command
pip install https://download.pytorch.org/whl/cu80/torch-1.0.0-cp27-cp27m-linux_x86_64.whl

 

 

 

  • 0
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值