当前位置:   article > 正文

MMdetection在VisDrone2019上训练FCOS和CenterNet_centernet visdrone

centernet visdrone

 配置环境

 

  1. Python 3.5+
  2. >=PyTorch 1.1
  3. >=CUDA 9.0
  4. NCCL 2
  5. >=GCC 4.9
  6. mmcv‘’

把mmdetection的代码下载下来

git clone https://github.com/open-mmlab/mmdetection.git

进入这个mmdetection文件,准备编译mmdetection的文件

cd mmdetection

装一下下面这些包,

  1. # mmdetection的 requirements.txt里面的文件
  2. pip install -r requrements.py
  3. pip install cython
  4. pip install albumentations>=0.3.2 imagecorruptions pycocotools six terminaltables

直接装mmcv在我这个环境里会报错

pip install mmcv

报错长这样,就是告诉你mmcv安装失败了

  1. RuntimeError: Error compiling objects for extension
  2. [end of output]
  3. note: This error originates from a subprocess, and is likely not a problem with pip.
  4. error: legacy-install-failure
  5. × Encountered error while trying to install package.
  6. ╰─> mmcv
  7. note: This is an issue with the package mentioned above, not pip.
  8. hint: See above for output from the failure.

解决方案是去mmcv的官方文档上

GitHub - open-mmlab/mmcv: OpenMMLab Computer Vision Foundation

Installation — mmcv 2.0.1 documentation

把你的cuda版本、torch版本选上,下面就会生成一条用pip安装的命令语句,你在自己的终端执行一下mmcv就安装好了        

将VisDrone转换成COCO格式

需要做这一步,然后把下面coco文件中的类别数和一些参数改了,包括均值和方差(这个可以先不改,跑通后再改),——然后运行

训练模型

所有的目标检测的模型都被放在了“/configs”

coco_detection.py的位置“configs/_base_/datasets”或“/mmdet/configs/_base_/datasets”

各个数据集的处理和转换“mmdet/datasets”

训练模型用的train.py放在了“./tools”

运行指令,开始训练

python tools/train.py configs/fcos/fcos_r50_caffe_fpn_gn-head_1x_coco.py

MMdetection实现的所有的10个FCOS模型:https://github.com/open-mmlab/mmdetection/tree/master/configs/fcos

FCOS模型中mAP最低的模型:https://github.com/open-mmlab/mmdetection/blob/master/configs/fcos/fcos_r50_caffe_fpn_gn-head_1x_coco.py (不知道要不要安装caffe?

MMdetection实现的2个CenterNet模型:https://github.com/open-mmlab/mmdetection/tree/master/configs/centernet

训练时候调用的train.py位于./tools下面

https://github.com/open-mmlab/mmdetection/blob/main/tools/train.py

 Reference:

将VisDrone数据集转换成COCO格式:将visdrone数据集转化为coco格式并在mmdetection上训练,附上转好的json文件_S5242的博客-CSDN博客

用MMdetection 训练自己的模型:(详细教程)mmdetection训练自己的模型,测试,评估_若风么么哒的博客-CSDN博客

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/秋刀鱼在做梦/article/detail/1014955
推荐阅读
相关标签
  

闽ICP备14008679号