【魔改YOLOv5-6.x(下)】YOLOv5s+Ghostconv+BiFPN+CA

训练设置

$ python -m torch.distributed.launch --nproc_per_node 2 train.py --weights  --cfg yolov5s.yaml --data data/VOC2007.yaml -- hyp data/hyps/hyp.scratch-high.yaml --epochs 300 --device 0,1
  • 实验环境为2个GTX 1080 Ti
  • 数据集为VOC2007
  • 超参数为hyp.scratch-high.yaml
  • 训练300个epoch
  • 其他参数均为源码中默认设置的数值

测试设置

$ python val.py --weights yolov5s.pt --data VOC2007.yaml --img 832 --augment --half --iou 0.6
$ python val.py --weights yolov5s.pt --data VOC2007.yaml --img 640 --task speed --batch 1

模型文件(参考)

yolov5s-Ghostconv-BiFPN-CA.yaml


nc: 20
depth_multiple: 0.33
width_multiple: 0.50
anchors:
  - [10,13, 16,30, 33,23]
  - [30,61, 62,45, 59,119]
  - [116,90, 156,198, 373,326]

backbone:

  [[-1, 1, Conv, [64, 6, 2, 2]],
   [-1, 1, GhostConv, [128, 3, 2]],
   [-1, 3, C3, [128]],
   [-1, 1, GhostConv, [256, 3, 2]],
   [-1, 6, C3, [256]],
   [-1, 1, GhostConv, [512, 3, 2]],
   [-1, 9, C3, [512]],
   [-1, 1, GhostConv, [1024, 3, 2]],
   [-1, 3, C3, [1024]],
   [-1, 1, CABlock, [1024, 32]],
   [-1, 1, SPPF, [1024, 5]],
  ]

head:
  [[-1, 1, GhostConv, [512, 1, 1]],
   [-1, 1, nn.Upsample, [None, 2, 'nearest']],
   [[-1, 6], 1, Concat, [1]],
   [-1, 3, C3, [512, False]],

   [-1, 1, GhostConv, [256, 1, 1]],
   [-1, 1, nn.Upsample, [None, 2, 'nearest']],
   [[-1, 4], 1, Concat, [1]],
   [-1, 3, C3, [256, False]],

   [-1, 1, GhostConv, [256, 3, 2]],
   [[-1, 15, 6], 1, Concat, [1]],
   [-1, 3, C3, [512, False]],

   [-1, 1, GhostConv, [512, 3, 2]],
   [[-1, 11], 1, Concat, [1]],
   [-1, 3, C3, [1024, False]],

   [[18, 21, 24], 1, Detect, [nc, anchors]],
  ]

训练仍在进行中,之后会更新相应的测试结果,目前还没有尝试更多的改进方法,欢迎大家前来交流,分享改进YOLOv5的方法~

Original: https://blog.csdn.net/weixin_43799388/article/details/123612828
Author: 嗜睡的篠龙
Title: 【魔改YOLOv5-6.x(下)】YOLOv5s+Ghostconv+BiFPN+CA

原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/626118/

转载文章受原作者版权保护。转载请注明原作者出处!

(0)

大家都在看

亲爱的 Coder【最近整理,可免费获取】👉 最新必读书单  | 👏 面试题下载  | 🌎 免费的AI知识星球