Ubuntu18.04配置mmdetection环境全攻略
"该资源是关于在Linux Ubuntu 18.04环境下配置mmdetection的详细步骤,包括了所需的软件版本以及可能遇到的问题及解决方案。" 在配置mmdetection的环境中,首先需要确保系统是Linux Ubuntu 18.04,并且需要安装以下软件及其特定版本: 1. GCC 5.5 和 G++ 5.5:这两个是C++编译器,用于编译和链接Python扩展模块。 2. Python 3.6:mmdetection依赖于Python 3.6版本,它是处理数据和运行模型的主要语言。 3. CUDA 10.1:CUDA是NVIDIA提供的用于GPU计算的软件平台,对于使用GPU加速深度学习训练至关重要。 4. PyTorch 1.4:这是一个广泛使用的深度学习框架,mmdetection基于PyTorch构建。 5. torchvision 0.5.0:与PyTorch配套的库,包含常用的图像处理和模型数据集。 6. mmdetection 1.2:这是一个开源的物体检测框架,由OpenMMLab维护。 7. mmcv 0.4.3:这是mmdetection的基础组件,提供了一系列的CV模块和工具。 配置过程如下: 1. 安装PyTorch和相关依赖: 使用conda安装指定版本的PyTorch、torchvision和CUDA工具包: ``` conda install pytorch==1.4.0 torchvision==0.5.0 cudatoolkit=10.1 -c pytorch ``` 2. 安装mmdetection: 首先,通过pip安装mmcv和终端表格库: ``` pip install -q mmcv terminaltables ``` 然后,克隆mmdetection的v1.2.0分支到本地: ``` git clone --branch v1.2.0 'https://github.com/open-mmlab/mmdetection.git' ``` 进入mmdetection目录并安装: ``` cd mmdetection pip install -r "/content/mmdetection/requirements/optional.txt" python setup.py install python setup.py develop pip install -r "requirements.txt" pip install pillow==6.2.1 pip install mmcv==0.4.3 ``` 在安装过程中可能出现的错误是“CUDA error: invalid device function”,这通常是因为CUDA版本与编译的PyTorch版本不兼容。解决方法是检查CUDA和PyTorch的版本匹配,或者尝试重新运行`python setup.py`。 参考链接:https://github.com/open-mmlab/mmdetection/issues/1961,这个问题可能在一开始出现,通过再次运行`python setup.py`可以解决,但具体原因还需要进一步调查。 总结来说,配置mmdetection环境需要对软件版本有严格的要求,并且可能会遇到一些硬件兼容性问题。遵循上述步骤和注意事项,应该能够成功地在Ubuntu 18.04上建立mmdetection的开发环境。
gcc 5.5
g++ 5.5
python 3.6
cuda 10.1
pytorch 1.4
Torchvision = 0.5.0
mmdetection =1.2
mmcv = 0.4.3
1.首先安装pytorch
conda install pytorch==1.4.0 torchvision==0.5.0 cudatoolkit=10.1 -c pytorch
2.接着安装mmdetection
pip install -q mmcv terminaltables
git clone --branch v1.2.0 'https://github.com/open-mmlab/mmdetection.git'
cd "mmdetection"
pip install -r "/content/mmdetection/requirements/optional.txt"
python setup.py install
python setup.py develop
pip install -r {"requirements.txt"}
pip install pillow==6.2.1
pip install mmcv==0.4.3
遇到的错误
1.CUDA error: invalid device function (launch_kernel at /opt/conda/conda-bld/pytorch_1579022034529/work/aten/src
/ATen/native/cuda/Loops.cuh:103) frame #0: c10::Error::Error(c10::SourceLocation, std::string const&) + 0x47 (0x7f5cae
d57627 in /home/xuguangyang/.conda/envs/mmdet/lib/python3.6/site-packages/torch/lib/libc10.so)
参考 https://github.com/open-mmlab/mmdetection/issues/1961中
这个回答 IIt occured in the beginning. I fixed it by running 'python setup.py' again,but I still don't understand why it happened and why it can be fixed by this command,this is weird..
下载后可阅读完整内容,剩余1页未读,立即下载
- 粉丝: 7
- 资源: 6
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- OptiX传输试题与SDH基础知识
- C++Builder函数详解与应用
- Linux shell (bash) 文件与字符串比较运算符详解
- Adam Gawne-Cain解读英文版WKT格式与常见投影标准
- dos命令详解:基础操作与网络测试必备
- Windows 蓝屏代码解析与处理指南
- PSoC CY8C24533在电动自行车控制器设计中的应用
- PHP整合FCKeditor网页编辑器教程
- Java Swing计算器源码示例:初学者入门教程
- Eclipse平台上的可视化开发:使用VEP与SWT
- 软件工程CASE工具实践指南
- AIX LVM详解:网络存储架构与管理
- 递归算法解析:文件系统、XML与树图
- 使用Struts2与MySQL构建Web登录验证教程
- PHP5 CLI模式:用PHP编写Shell脚本教程
- MyBatis与Spring完美整合:1.0.0-RC3详解