本篇文章在ubuntu18.04中配置。
主要版本如下:
Python 3.7
Cuda 10.1
Torch 1.7.0
1、创建anaconda虚拟环境python=3.7
2、安装pytorch,torchvision
3、安装mmcv-full
pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/{cu_version}/{torch_version}/index.html
{cu_version} and {torch_version}根据自己版本选择
此处我用的是cuda10.1,torch1.7.0,所以命令如下所示
pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu101/torch1.7.0/index.html
4、进入mmdet目录下 pip install -r requirements/build.txt
5、最后 pip install -v -e . # or "python setup.py develop"
最后附一下官方的要求:
Prerequisites
Linux or macOS (Windows is in experimental support)
Python 3.6+
PyTorch 1.3+
CUDA 9.2+ (If you build PyTorch from source, CUDA 9.0 is also compatible)
GCC 5+
MMCV