云服务器上安装MMDetection及训练自己的数据集 |
您所在的位置:网站首页 › 如何使用矩池云训练 › 云服务器上安装MMDetection及训练自己的数据集 |
1.安装mmcv和mmdetection
第一步:使用清华源来安装pytorch、torchvision和cython
直接安装pytorch和torchvision,命令如下: install pytorch torchvision cudatoolkit=10.0 install cython这一步由于我使用的是云服务器,机器已经把基础环境配置好了,我用的版本是: pytorch1.6.0 CUDA10.2 python 3.6 登陆工具为XFTP,Xshell 注意:版本一定要对应(包括后续安装),避免安装过程中各种莫名其妙的错误!!! 第二步:git下载mmcv和mmdetection:从github上下载mmcv和mmdetection,可能会导致超时或过慢:(不建议) git clone https://github.com/open-mmlab/mmcv.git git clone https://github.com/open-mmlab/mmdetection.git 1.从码云上下载mmcv和mmdetection的代码到云主机,命令如下:(建议使用) git clone https://gitee.com/mirrors/mmcv.git git clone https://gitee.com/mirrors/mmdetection.git 2.确保一些必要的包已经安装:不要提前安装pycocotools!!!因为mmdetection是使用的自己开发的pycocotools,当系统中已经安装了此包的时候,mmdetection不会覆盖安装,会导致后面安装失败!!(找了好久才解决) pip install pytest-runner pip install pytest pip install addict pip install numpy -i https://pypi.tuna.tsinghua.edu.cn/simple pip install pyyaml pip install yaps #这个很可能需要安装 pip install matplotlib terminaltables imagecorruptions albumentations pip install opencv-python -i https://pypi.tuna.tsinghua.edu.cn/simple pip install -i https://pypi.tuna.tsinghua.edu.cn/simple matplotlib==3.3.1 3.安装mmcv-fullmmcv-full为GPU版本,mmcv为CPU版本,官方提示两者不可同时安装。 pip install mmcv-full==1.2.4 -f https://download.openmmlab.com/mmcv/dist/cu102/torch1.6.0 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |