mmSegmentation的单GPU训练和测试

本文档详细介绍了mmSegmentation的安装步骤及单GPU和多GPU训练注意事项。包括Python环境配置、mmcv安装方法及不同CUDA版本对应指令,帮助读者顺利完成环境搭建。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

mmSegmentation的使用

参考:
  1. github
mmseg安装:
1. 安装依赖包:
python==3.6, 3.7
1.1.2<=mmcv<=1.2.0
torch==1.5.0 
torchvision==0.6.0
2. mmcv 安装
CUDAtorch 1.6torch 1.5torch 1.4torch 1.3
10.2OOXX
10.1OOOO
9.2OOOO
cpuOOOO
pip install mmcv-full==latest+torch1.6.0+cu102 -f https://openmmlab.oss-accelerate.aliyuncs.com/mmcv/dist/index.html
pip install mmcv-full==latest+torch1.5.0+cu102 -f https://openmmlab.oss-accelerate.aliyuncs.com/mmcv/dist/index.html
pip install mmcv-full==latest+torch1.6.0+cu101 -f https://openmmlab.oss-accelerate.aliyuncs.com/mmcv/dist/index.html
pip install mmcv-full==latest+torch1.5.0+cu101 -f https://openmmlab.oss-accelerate.aliyuncs.com/mmcv/dist/index.html
pip install mmcv-full==latest+torch1.4.0+cu101 -f https://openmmlab.oss-accelerate.aliyuncs.com/mmcv/dist/index.html
pip install mmcv-full==latest+torch1.3.0+cu101 -f https://openmmlab.oss-accelerate.aliyuncs.com/mmcv/dist/index.html
pip install mmcv-full==latest+torch1.6.0+cu92 -f https://openmmlab.oss-accelerate.aliyuncs.com/mmcv/dist/index.html
pip install mmcv-full==latest+torch1.6.0+cpu -f https://openmmlab.oss-accelerate.aliyuncs.com/mmcv/dist/index.html
# 安装mmcv-full build时间较长
pip isntall -r requirements.txt
MMCV_WITH_OPS=1 pip install -e .
3.mmseg安装
pip install -r requirements/build.txt
pip install -e .
mmseg 训练
1. 单GPU

需要注意问题:

https://github.com/open-mmlab/mmdetection/issues/847.  SyncBN only works with distributed environment, you may either use tools/dist_test.sh or modify SyncBN to BN manually during testing.

修改方法:
将configs/_base_中的参数设置 SyncBN修改为BN

2. 多GPU

参考:github

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值