mmSegmentation的單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

須要注意問題:html

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
python

2. 多GPU

參考:githubgit

相關文章
相關標籤/搜索