1.conda pytorch 环境
建议还是重新安装一个新的conda环境,同时torch版本建议不要太高。
pip install torch==1.7.1+cu110 torchvision==0.8.2+cu110 torchaudio==0.7.2 -f https://download.pytorch.org/whl/torch_stable.html
2. mmcv-full
mmcv的环境要和pytorch相吻合
pip install mmcv-full==1.2.4 -f https://download.openmmlab.com/mmcv/dist/cu110/torch1.7.0/index.html
3. 其他
还有其他的一些杂七杂八的环境,可以直接cd到从GitHub下好的swin-transformer的文件中
pip install -r requirements.txt
pip install -e . --user
他自己就会把环境配置好
4. 训练
设置好config、weights、data后就能python tools/train.py啦
5. 参考
Swin-Transformer分割源码(已跑通) - 简书 (jianshu.com)
mmsegmentation/get_started.md at master · open-mmlab/mmsegmentation · GitHub
(17条消息) 使用Swin-Transformer-Semantic-Segmentation训练自己的数据(语义分割,自己做数据)_中科哥哥的博客-CSDN博客
(17条消息) mmsegmentation 训练自制数据集全过程_Cecilia_lu的博客-CSDN博客(17条消息) 【Swin Transformer】Win10使用Swin Transformer做语义分割 (使用自己的数据集 + 图解超详细)_swintransformer语义分割代码_莫余的博客-CSDN博客