YOLO训练笔记第一篇——YOLOv3训练时打印的日志

关于yolov2的训练日志有英文讲解,这边进一步讲一下yolov3的,大致差不多。


  • 以下是yolov3 cfg/yolov3-voc.cfg中的前部分内容:
[net]
# Testing
# batch=1
# subdivisions=1
# Training
 batch=64
 subdivisions=16
width=416
height=416
channels=3
momentum=0.9
decay=0.0005
angle=0
saturation = 1.5
exposure = 1.5
hue=.1

learning_rate=0.001
burn_in=1000
max_batches = 50200
policy=steps
steps=40000,45000
scales=.1,.1
  • 以下是一个训练批次(batch)的输出:
Region 82 Avg IOU: 0.801934, Class: 0.737764, Obj: 0.782024, No Obj: 0.006216, .5R: 1.000000, .75R: 1.000000,  count: 5
Region 94 Avg IOU: 0.706899, Class: 0.073915, Obj: 0.544467, No Obj: 0.000506, .5R: 1.000000, .75R: 0.000000,  count: 1
Region 106 Avg IOU: 0.831056, Class: 0.037965, Obj: 0.026004, No Obj: 0.000057, .5R: 1.000000, .75R: 1.000000,  count: 1
Region 82 Avg IOU: 0.731572, Class: 0.800899, Obj: 0.793200, No Obj: 0.005694, .5R: 1.000000, .75R: 0.333333,  count: 3
Region 94 Avg IOU: 0.607969, Class: 0.199724, Obj: 0.884315, No Obj: 0.000286, .5R: 1.000000, .75R: 0.000000,  count: 1
Region 106 Avg IOU: -nan, Class: -nan, Obj: -nan, No Obj: 0.000015, .5R: -nan, .75R: -nan,  count: 0
Region 82 Avg IOU: 0.735589, Class: 0.746280, Obj: 0.810360, No Obj: 0.007780, .5R: 1.000000, .75R: 0.500000,  count: 6
Region 94 Avg IOU: -nan, Class: -nan, Obj: -nan, No Obj: 0.000409, .5R: -nan, .75R: -nan,  count: 0
Region 106 Avg IOU: -nan, Class: -nan, Obj: -nan, No Obj: 0.000009, .5R: -nan, .75R: -nan,  count: 0
Region 82 Avg IOU: 0.760144, Class: 0.714771, Obj: 0.620028, No Obj: 0.009195, .5R: 1.000000, .75R: 0.428571,  count: 7
Region 94 Avg IOU: 0.585034, Class: 0.338258, Obj: 0.063679, No Obj: 0.000263, .5R: 0.800000, .75R: 0.000000,  count: 5
Region 106 Avg IOU: -nan, Class: -nan, Obj: -nan, No Obj: 0.000011, .5R: -nan, .75R: -nan,  count: 0
Region 82 Avg IOU: 0.668911, Class: 0.837415, Obj: 0.460267, No Obj: 0.013548, .5R: 1.000000, .75R: 0.272727,  count: 11
Region 94 Avg IOU: 0.611764, Class: 0.881824, Obj: 0.148980, No Obj: 0.002015, .5R: 0.777778, .75R: 0.166667,  count: 18
Region 106 Avg IOU: -nan, Class: -nan, Obj: -nan, No Obj: 0.000024, .5R: -nan, .75R: -nan,  count: 0
Region 82 Avg IOU: 0.750869, Class: 0.339373, Obj: 0.584975, No Obj: 0.006975, .5R: 1.000000, .75R: 0.500000,  count: 4
Region 94 Avg IOU: 0.629718, Class: 0.634818, Obj: 0.204681, No Obj: 0.000279, .5R: 1.000000, .75R: 0.000000,  count: 3
Region 106 Avg IOU: -nan, Class: -nan, Obj: -nan, No Obj: 0.000025, .5R: -nan, .75R: -nan,  count: 0
Region 82 Avg IOU: 0.729762, Class: 0.770841, Obj: 0.666645, No Obj: 0.010649, .5R: 1.000000, .75R: 0.500000,  count: 4
Region 94 Avg IOU: 0.748649, Class: 0.905171, Obj: 0.132450, No Obj: 0.000543, .5R: 1.000000, .75R: 0.600000,  count: 5
Region 106 Avg IOU: -nan, Class: -nan, Obj: -nan, No Obj: 0.000006, .5R: -nan, .75R: -nan,  count: 0
Region 82 Avg IOU: 0.711578, Class: 0.547901, Obj: 0.534795, No Obj: 0.006752, .5R: 1.000000, .75R: 0.500000,  count: 6
Region 94 Avg IOU: 0.755615, Class: 0.788897, Obj: 0.571559, No Obj: 0.000736, .5R: 1.000000, .75R: 0.600000,  count: 5
Region 106 Avg IOU: 0.424832, Class: 0.074158, Obj: 0.000558, No Obj: 0.000035, .5R: 0.000000, .75R: 0.000000,  count: 1
Region 82 Avg IOU: 0.744985, Class: 0.772669, Obj: 0.696923, No Obj: 0.008254, .5R: 1.000000, .75R: 0.750000,  count: 4
Region 94 Avg IOU: 0.579775, Class: 0.220255, Obj: 0.017404, No Obj: 0.000183, .5R: 0.500000, .75R: 0.000000,  count: 2
Region 106 Avg IOU: -nan, Class: -nan, Obj: -nan, No Obj: 0.000019, .5R: -nan, .75R: -nan,  count: 0
Region 82 Avg IOU: 0.797530, Class: 0.498026, Obj: 0.526854, No Obj: 0.010189, .5R: 1.000000, .75R: 0.571429,  count: 7
Region 94 Avg IOU: 0.734900, Class: 0.220150, Obj: 0.012103, No Obj: 0.000186, .5R: 1.000000, .75R: 0.000000,  count: 1
Region 106 Avg IOU: 0.381251, Class: 0.054329, Obj: 0.004250, No Obj: 0.000039, .5R: 0.000000, .75R: 0.000000,  count: 1
Region 82 Avg IOU: 0.746654, Class: 0.753884, Obj: 0.446375, No Obj: 0.005853, .5R: 1.000000, .75R: 0.500000,  count: 4
Region 94 Avg IOU: 0.670456, Class: 0.967786, Obj: 0.483518, No Obj: 0.001018, .5R: 1.000000, .75R: 0.400000,  count: 5
Region 106 Avg IOU: 0.253231, Class: 0.168553, Obj: 0.002074, No Obj: 0.000050, .5R: 0.000000, .75R: 0.000000,  count: 1
Region 82 Avg IOU: 0.752799, Class: 0.538428, Obj: 0.532614, No Obj: 0.006688, .5R: 1.000000, .75R: 0.500000,  count: 4
Region 94 Avg IOU: -nan, Class: -nan, Obj: -nan, No Obj: 0.000108, .5R: -nan, .75R: -nan,  count: 0
Region 106 Avg IOU: 0.605627, Class: 0.386968, Obj: 0.047194, No Obj: 0.000045, .5R: 0.500000, .75R: 0.500000,  count: 2
Region 82 Avg IOU: 0.561862, Class: 0.752781, Obj: 0.278683, No Obj: 0.004893, .5R: 0.750000, .75R: 0.000000,  count: 4
Region 94 Avg IOU: 0.716844, Class: 0.663945, Obj: 0.285661, No Obj: 0.001633, .5R: 0.916667, .75R: 0.333333,  count: 12
Region 106 Avg IOU: 0.590148, Class: 0.051722, Obj: 0.000492, No Obj: 0.000017, .5R: 0.500000, .75R: 0.000000,  count: 2
Region 82 Avg IOU: 0.810546, Class: 0.923952, Obj: 0.909483, No Obj: 0.008805, .5R: 1.000000, .75R: 0.750000,  count: 4
Region 94 Avg IOU: 0.650187, Class: 0.883176, Obj: 0.420170, No Obj: 0.000697, .5R: 1.000000, .75R: 0.200000,  count: 5
Region 106 Avg IOU: 0.847660, Class: 0.717516, Obj: 0.398166, No Obj: 0.000095, .5R: 1.000000, .75R: 1.000000,  count: 1
Region 82 Avg IOU: 0.731753, Class: 0.752628, Obj: 0.584548, No Obj: 0.005009, .5R: 1.000000, .75R: 0.400000,  count: 5
Region 94 Avg IOU: -nan, Class: -nan, Obj: -nan, No Obj: 0.000222, .5R: -nan, .75R: -nan,  count: 0
Region 106 Avg IOU: -nan, Class: -nan, Obj: -nan, No Obj: 0.000015, .5R: -nan, .75R: -nan,  count: 0
Region 82 Avg IOU: 0.798032, Class: 0.559781, Obj: 0.515851, No Obj: 0.006533, .5R: 1.000000, .75R: 1.000000,  count: 2
Region 94 Avg IOU: 0.725307, Class: 0.830518, Obj: 0.506567, No Obj: 0.000680, .5R: 1.000000, .75R: 0.750000,  count: 4
Region 106 Avg IOU: 0.579333, Class: 0.322556, Obj: 0.020537, No Obj: 0.000070, .5R: 1.000000, .75R: 0.000000,  count: 2
2706: 1.350835, 1.386559 avg, 0.001000 rate, 3.323842 seconds, 173184 images
Loaded: 0.000058 seconds

以上输出显示了所有训练图片的一个批次(batch),批次大小的划分根据我们在 .cfg 文件中设置的subdivisions参数。在我使用的 .cfg 文件中 batch = 64 ,subdivision = 16,所以在训练输出中,训练迭代包含了16组,每组又包含了4张图片,跟设定的batch和subdivision的值一致。
但是此处有16*3条信息,每组包含三条信息,分别是:
Region 82 Avg IOU:
Region 94 Avg IOU:
Region 106 Avg IOU:
三个尺度上预测不同大小的框 82卷积层 为最大的预测尺度,使用较大的mask,但是可以预测出较小的物体 94卷积层 为中间的预测尺度,使用中等的mask, 106卷积层为最小的预测尺度,使用较小的mask,可以预测出较大的物体

  • 每个batch都会有这样一个输出:
2706: 1.350835, 1.386559 avg, 0.001000 rate, 3.323842 seconds, 173184 images
  1. 2706:batch是第几组。
  2. 1.350835:总损失
  3. 1.386559 avg : 平均损失
  4. 0.001000 rate:当前的学习率
  5. 3.323842 seconds: 当前batch训练所花的时间
  6. 173184 images : 目前为止参与训练的图片总数 = 2706 * 64
Region 82 Avg IOU: 0.798032, Class: 0.559781, Obj: 0.515851, No Obj: 0.006533, .5R: 1.000000, .75R: 1.000000,  count: 2

Region Avg IOU: 表示在当前subdivision内的图片的平均IOU,代表预测的矩形框和真实目标的交集与并集之比.
Class: 标注物体分类的正确率,期望该值趋近于1。
Obj: 越接近1越好。
No Obj: 期望该值越来越小,但不为零。
count: count后的值是所有的当前subdivision图片(本例中一共4张)中包含正样本的图片的数量。

你可能感兴趣的:(机器视觉)