Win10下基于Pytorch配置语义分割问题及解决方案

最近在学习语义分割,采用的是GitHub上开源的《awesome-semantic-segmentation-pytorch》,网址:

https://github.com/Tramac/awesome-semantic-segmentation-pytorch.git,期间遇到了一些问题,解决如下:

(1)执行python setup.py build develop编译PyTorch时出现找不到C++ Build的问题,需要下载Microsoft C++ 生成工具,工具下载地址:https://visualstudio.microsoft.com/zh-hans/visual-cpp-build-tools/ 下载完成后按下图安装,然后重启电脑即可。

(2)执行程序时出现下面的错误,这是由于云端文件已删除引起的,作者通过两种方法解决。

RuntimeError: Failed downloading url https://hangzh.s3.amazonaws.com/encoding/models/resnet50-25c4b509.zip

第一种:本人从别处找到了原始文件,点击 https://github.com/LikeLy-Journey/SegmenTron/releases/download/v0.1.0/resnet50-25c4b509.pth 下载,然后粘贴到~/.torch/models/目录下。

第二种:找到代码里的core/models/model_store.py,修改如下图红框内的文件为网络上存在的即可。

阅读剩余
THE END