Ubuntu18.04实现bmask-rcnn代码

本文详细描述了如何在Ubuntu18.04系统上配置CUDA11.1、Python3.8以及相关库(如torch1.9.0、detectron2等),并解决在安装过程中遇到的版本冲突和AttributeError问题,如numpy、PIL和TensorBoard的版本调整,以及内存优化等。

Ubuntu18.04实现bmask-rcnn

配置环境

cuda 11.1在这里插入代码片
cudnn
cudatoolkit 11.1.1
python 3.8 刚开始使用的是3.6,但是在安装torch1.9版本的时候冲突,需要python3.7及以上,所以直接安装了3.8
torch 1.9.0+cu111
torchaudio 0.9.0
torchvision 0.10.0+cu111
(选用 torch1.9是因为torch1.8和bmask rcnn使用的框架detectron2冲突,会出现错误RuntimeError: radix_sort: failed on 1st step: cudaErrorInvalidDevice: invalid device ordinal)

// 创建环境
conda create --name detectron2 python==3.8
//下载cudatoolkit,在base环境中安装过了cuda和cudnn,这里没有安装也可使用
conda activate detectron2
conda install -c anaconda cudatoolkit=11.1.1
//安装totch等
pip install torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html
//安装detectron2
 pip install fvcore
 pip install cython
 pip install pycocotool
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值