AugFPN 环境配置

2022/2/23 23:25:56

本文主要是介绍AugFPN 环境配置,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

AugFPN 代码原始地址 https://github.com/Gus-Guo/AugFPN

基础环境 Ubuntu18+anaconda+cuda10.0

1. 检查gcc版本 博主只试了gcc7.3的版本 

如何安装参考 https://www.jianshu.com/p/82ca5443f85c

2. conda 创建3.7.3的虚拟环境

  2.1 conda create -n XXXX python==3.7.3

 安装 pytorch 请访问www.pytorch.org 按照官网要求安装,注意低算力的显卡会有版本限制 

 本文推荐安装pytorch1.1.0或1.2.0 

  2.2 conda install opencv

  2.3 pip install cython numpy albumentations==0.3.2 imagecorruptions matplotlib pytest-runner mmcv==0.2.16 numpy Pillow==6.2.2 six terminaltables asynctest codecov flake8 isort pytest pytest-cov pytest-runner xdoctest==0.10.0 yapf kwarray pycocotools -i https://pypi.tuna.tsinghua.edu.cn/simple

3 下载mmdetection文件与代码文件

 3.1在https://github.com/open-mmlab/mmdetection/releases中找到1.0.0的zip文件

 下载解压

 3.2 git clone https://github.com/Gus-Guo/AugFPN

 放到mmdetection的目录中

 3.3 在mmdetection的目录中执行 python setup.py develop

 3.4 在AugFPN目录中执行 python setup.py develop

    3.5 继续在此目录执行  bash compile.sh

 3.6 继续在此目录执行  pip install .


4 链接数据 开始训练

    4.1链接数据  数据集需为coco格式

  mkdir -p data/coco
  ln -s /path_to_coco_dataset/annotations data/coco/annotations
  ln -s /path_to_coco_dataset/train2017 data/coco/train2017
  ln -s /path_to_coco_dataset/test2017 data/coco/test2017
  ln -s /path_to_coco_dataset/val2017 data/coco/val2017

  4.2 训练

  ./tools/dist_train.sh configs/faster_rcnn_r50_augfpn_1x.py 1 --validate --work_dir faster_rcnn_r50_augfpn_1x

——————————————————————

文章参考 

1. https://blog.csdn.net/White_yn/article/details/119871117

2. https://blog.csdn.net/qq_44703886/article/details/118596382

3. https://github.com/Gus-Guo/AugFPN

4. https://github.com/open-mmlab/mmdetection/issues

感谢参考文章的原作者



这篇关于AugFPN 环境配置的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程