MMdetection在VisDrone2019上训练FCOS和CenterNet

 配置环境

 

  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

装一下下面这些包,

# mmdetection的 requirements.txt里面的文件
pip install -r requrements.py

pip install cython 

pip install albumentations>=0.3.2 imagecorruptions pycocotools six terminaltables 

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

pip install mmcv

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

      RuntimeError: Error compiling objects for extension
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> mmcv

note: This is an issue with the package mentioned above, not pip.
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博客

 

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

德彪稳坐倒骑驴

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值