本人小白,看过多个博文,不断踩坑+重配,从其他博主的经验中总结适合服务器配置的环境,记录为方便自己后续使用,如有错误,欢迎指正!(服务器用RTX2080TI、或者2060。使用30系列总出错弃了)
一、solo/solov2环境配置
参考:环境配置经过无数踩坑,最后用这位博主方法顺利完成,亲测有用【SOLO】环境配置(mmdetection=1.0.0+mmcv = 0.2.15)_mmdetection1.0_摇曳的树的博客-优快云博客solo环境配置最难的是版本问题,一定严格按照文中版本配置(mmdetection v1.0.0,mmcv 0.2.16或0.2.15)
1、创建虚拟环境
conda create -n solo python==3.7.3
conda activate solo
2、安装指定版本的pytorch及torchvision
pip install torch==1.4.0 torchvision==0.5.0 -i https://pypi.tuna.tsinghua.edu.cn/simple
3、下载V1.0.0 的mmdetection
git clone -b v1.0.0 https://github.com/open-mmlab/mmdetection.git
#下载后进入mmdetection文件中
cd mmdetection
4、安装需要的模块
conda install opencv
pip install cython numpy albumentations==0.3.2 imagecorruptions matplotlib pytest-runner mmcv==0.2.15 numpy Pillow==6.2.2 six terminaltables asynctest codecov flake8 isort pytest pytest-cov pytest-runner xdoctest==0.10.0 yapf kwarray pycocotools -i https://pypi.tuna.tsinghua.edu.cn/simple
如果不行就单独安装
pip install XX -i https://pypi.tuna.tsinghua.edu.cn/simple
cython
numpy
albumentations==0.3.2
imagecorruptions
matplotlib # 5
pytest-runner # 必须在mmcv之前安装(依赖库),否则会报错!!!!!!!!!
mmcv==0.2.15 # 0.2.16版本也可以
numpy
Pillow==6.2.2
six # 10
terminaltables
asynctest
codecov
flake8
isort # 15
pytest
pytest-cov
pytest-runner
xdoctest==0.10.0
yapf # 20
kwarray
pycocotools
5、第一次编译,编译mmdetection
python setup.py develop
# 此时在mmdetection文件夹下
6、 在当前mmdetection路径,下载SOLO源码
git clone https://github.com/WXinlong/SOLO.git
# 进入SOLO文件夹内
cd SOLO
7、安装所需spicy模块,第二次编译,编译SOLO环境
pip install scipy
# 第二次编译环境
python setup.py develop
到此,solo所需环境已配置完成,下一章对环境进行测试,看是否正确配置