yaml文件
模型深度&宽度
nc: 3 # number of classes
depth_multiple: 0.33 # model depth multiple
width_multiple: 0.50 # layer channel multiple
depth_multiple:控制子模块数量=int(number*depth)
width_multiple:控制卷积核的数量=int(number*width)
Anchor
anchors:
- [10,13, 16,30, 33,23] # P3/8,检测小目标,10,13是一组尺寸,总共三组检测小目标
- [30,61, 62,45, 59,119] # P4/16,检测中目标,共三组
- [116,90, 156,198, 373,326] # P5/32,检测大目标,共三组
该anchor尺寸是为输入图像640×640分辨率预设的,实现了即可以在小特征图(feature map)上检测大目标,也可以在大特征图上检测小目标。三种尺寸的特征图,每个特征图上的格子有三个尺寸的anchor。
Backbone
backbone:
# [from, number, module, args]
[[-1, 1, Focus, [64, 3]], # 0-P1/2
[-1, 1, Conv, [128, 3, 2]], # 1-P2/4
[-1, 3, C3, [128]],
[-1, 1, Conv, [256, 3, 2]], # 3-P3/8
[-1, 9, C3, [256]],
[-1, 1, Conv,