mmSegmentation的单GPU训练和测试

mmSegmentation使用

    • mmSegmentation的使用
        • 参考:
        • mmseg安装:
          • 1. 安装依赖包:
          • 2. mmcv 安装
          • 3.mmseg安装
        • mmseg 训练
          • 1. 单GPU
          • 2. 多GPU

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 安装
CUDA torch 1.6 torch 1.5 torch 1.4 torch 1.3
10.2 O O X X
10.1 O O O O
9.2 O O O O
cpu O O O O
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

你可能感兴趣的:(pytorch,深度学习)