摘要

  • 驱动版本450.80.02
  • cuda 10.1
  • python 3.7
  • pytorch 1.4
  • mmcv 1.2
  • mmdetection 2.6

安装cuda10.1

目前来看cuda10.1 是一个能屈能伸的版本,兼容性较好。
具体代施工

安装anaconda3

没啥好说的直接最新版省得很多麻烦:
具体代施工
更改为清华源:
具体代施工

创建conda环境

conda create -n vps python=3.7
conda activate vps

安装pytorch

直接官网下载历史版本:
https://pytorch.org/get-started/previous-versions/
我用的是1.4版本:
(e.g. 不加 -c pytorch 就可以用自己配置的源否则用的是官方源)

conda install pytorch1.4.0 torchvision0.5.0 cudatoolkit=10.1

安装mmcv

直接在官网找到对应版本使用命令下载:
https://mmcv.readthedocs.io/en/latest/#installation
这是我安装的版本:

pip install mmcv-full==latest+torch1.4.0+cu101 -f https://download.openmmlab.com/mmcv/dist/index.html

安装mmdetection

在官网下载master版本,clond和直接下载都可以:

cd mmdetection-master
pip install -r requirements.txt
pip install -v -e .

最后在检查一下是否都安装到位:

pip list

测试mmdetection

首先创建checkpoints目录在mmdetection根目录下然后下载官方训练集到该目录下:
官方训练集地址: https://github.com/open-mmlab/mmdetection/tree/master/configs/
(e.g. 要下载与configs对应的训练集)
运行官方测试用例:

python demo/image_demo.py demo/demo.jpg configs/mask_rcnn/mask_rcnn_r101_fpn_1x_coco.py checkpoints/mask_rcnn_r101_fpn_1x_coco_20200204-1efe0ed5.pth

看到下图即为配置成功:
深度学习环境配置:Ubuntu18.04 配置mmdetection

相关文章: