一、网络结构图: layer filters size input output 0 conv 32 3 x 3 / 1 416 x 416 x 3 -> 416 x 416 x 32 1 max 2 x 2 / 2 416 x 416 x 32 -> 208 x 208 x 32 2 conv 64 3 x 3 / 1 208 x 208 x 32 -> 208 x 208 x 64 3 max 2 x 2 / 2 208 x 208 x 64 -> 104 x 104 x 64 4 conv 128 3 x 3 / 1 104 x 104 x 64 -> 104 x 104 x 128 5 conv 64 1 x 1 / 1 104 x 104 x 128 -> 104 x 104 x 64 6 conv 128 3 x 3 / 1 104 x 104 x 64 -> 104 x 104 x 128 7 max 2 x 2 / 2 104 x 104 x 128 -> 52 x 52 x 128 8 conv 256 3 x 3 / 1 52 x 52 x 128 -> 52 x 52 x 256 9 conv 128 1 x 1 / 1 52 x 52 x 256 -> 52 x 52 x 128 10 conv 256 3 x 3 / 1 52 x 52 x 128 -> 52 x 52 x 256 11 max 2 x 2 / 2 52 x 52 x 256 -> 26 x 26 x 256 12 conv 512 3 x 3 / 1 26 x 26 x 256 -> 26 x 26 x 512 13 conv 256 1 x 1 / 1 26 x 26 x 512 -> 26 x 26 x 256 14 conv 512 3 x 3 / 1 26 x 26 x 256 -> 26 x 26 x 512 15 conv 256 1 x 1 / 1 26 x 26 x 512 -> 26 x 26 x 256 16 conv 512 3 x 3 / 1 26 x 26 x 256 -> 26 x 26 x 512 17 max 2 x 2 / 2 26 x 26 x 512 -> 13 x 13 x 512 18 conv 1024 3 x 3 / 1 13 x 13 x 512 -> 13 x 13 x1024 19 conv 512 1 x 1 / 1 13 x 13 x1024 -> 13 x 13 x 512 20 conv 1024 3 x 3 / 1 13 x 13 x 512 -> 13 x 13 x1024 21 conv 512 1 x 1 / 1 13 x 13 x1024 -> 13 x 13 x 512 22 conv 1024 3 x 3 / 1 13 x 13 x 512 -> 13 x 13 x1024 23 conv 1024 3 x 3 / 1 13 x 13 x1024 -> 13 x 13 x1024 24 conv 1024 3 x 3 / 1 13 x 13 x1024 -> 13 x 13 x1024 25 route 16 26 reorg / 2 26 x 26 x 512 -> 13 x 13 x2048 27 route 26 24 28 conv 1024 3 x 3 / 1 13 x 13 x3072 -> 13 x 13 x1024 29 conv 125 1 x 1 / 1 13 x 13 x1024 -> 13 x 13 x 125 30 detection 二、配置参数的解读: [net] batch=64 每batch个样本更新一次参数。 subdivisions=8 如果内存不够大,将batch分割为subdivisions个子batch,每个子batch的大小为batch/subdivisions。 在darknet代码中,会将batch/subdivisions命名为batch。 height=416 input图像的高 width=416 Input图像的宽 channels=3 Input图像的通道数 momentum=0.9 动量 decay=0.0005 权重衰减正则项,防止过拟合 angle=0 通过旋转角度来生成更多训练样本 saturation = 1.5 通过调整饱和度来生成更多训练样本 exposure = 1.5 通过调整曝光量来生成更多训练样本 hue=.1 通过调整色调来生成更多训练样本 learning_rate=0.0001 初始学习率 max_batches = 45000 训练达到max_batches后停止学习 policy=steps 调整学习率的policy,有如下policy:CONSTANT, STEP, EXP, POLY, STEPS, SIG, RANDOM steps=100,25000,35000 根据batch_num调整学习率 scales=10,.1,.1 学习率变化的比例,累计相乘 [convolutional] batch_normalize=1 是否做BN filters=32 输出多少个特征图 size=3 卷积核的尺寸 stride=1 做卷积运算的步长 pad=1 如果pad为0,padding由 padding参数指定。如果pad为1,padding大小为size/2 activation=leaky 激活函数: logistic,loggy,relu,elu,relie,plse,hardtan,lhtan,linear,ramp,leaky,tanh,stair [maxpool] size=2 池化层尺寸 stride=2 池化步进 [convolutional] batch_normalize=1 filters=64 size=3 stride=1 pad=1 activation=leaky [maxpool] size=2 stride=2 ...... ...... ####### [convolutional] batch_normalize=1 size=3 stride=1 pad=1 filters=1024 activation=leaky [convolutional] batch_normalize=1 size=3 stride=1 pad=1 filters=1024 activation=leaky [route] 拼接层,将两个层的数据进行合并 layers=-9 [reorg] the reorg layer is to make these features match the feature map size at the later layer. The end feature map is 13x13, the feature map from earlier is 26x26x512. The reorg layer maps the 26x26x512 feature map onto a 13x13x2048 feature map so that it can be concatenated with the feature maps at 13x13 resolution. stride=2 [route] 拼接层,将前一层和前三层拼接起来 layers=-1,-3 [convolutional] batch_normalize=1 size=3 stride=1 pad=1 filters=1024 activation=leaky [convolutional] size=1 stride=1 pad=1 filters=125 region前最后一个卷积层的filters数是特定的,计算公式为filter=num*(classes+5) 5的意义是5个坐标,论文中的tx,ty,tw,th,to activation=linear [region] anchors = 1.08,1.19, 3.42,4.41, 6.63,11.38, 9.42,5.11, 16.62,10.52 预选框,可以手工挑选, 也可以通过k means 从训练样本中学出 bias_match=1 classes=20 网络需要识别的物体种类数 coords=4 每个box的4个坐标tx,ty,tw,th num=5 每个grid cell预测几个box softmax=1 使用softmax做激活函数 jitter=.2 通过抖动增加噪声来抑制过拟合 rescore=1 暂理解为一个开关,非0时通过重打分来调整l.delta(预测值与真实值的差) object_scale=5 暂理解为计算损失时预测框中有物体时的权重 noobject_scale=1 暂理解为计算损失时预测框中无物体时的权重 class_scale=1 暂理解为计算类别损失时的权重 coord_scale=1 暂理解为计算损失时坐标偏差的权重 absolute=1 thresh = .6 random=0 是否随机确定最后一个预测框
yolo的参数解读
最新推荐文章于 2024-05-28 14:01:58 发布