recalculate anchors for your dataset for width and height from cfg-file: darknet.exe detector calc_anchors data/obj.data -num_of_clusters 9 -width 416 -height 416 then set the same 9 anchors in each of 3 [yolo]-layers in your cfg-file. But you should change indexes of anchors masks= for each [yolo]-layer, so that 1st-[yolo]-layer has anchors larger than 60x60, 2nd larger than 30x30, 3rd remaining. Also you should change the filters=(classes + 5)*
before each [yolo]-layer. If many of the calculated anchors do not fit under the appropriate layers - then just try using all the default anchors.
What does this mean? How can I assert that an anchor pair is larger than 60x60?
My first yolo layer calculated anchors are:
mask = 6,7,8
anchors = 11, 31, 25, 48, 15,115, 43, 78, 36,228, 75,110, 93,172, 109,263, 165,316
93, 172, 109, 263, 165, 316 are all larger than 60 - does that mean they satisfy the guidelines in the readme?
My first yolo layer calculated anchors are:
mask = 6,7,8
anchors = 11, 31, 25, 48, 15,115, 43, 78,36,228,75,110,93,172,109,263,165,316
4 anchors larger than 60x60, for example 36x228=8208 > 60x60=3600,
so should be mask = 5,6,7,8
So my final Yolo layer should just have mask=0 because it is the only pair smaller than 30x30?
Does this apply in the same way if training with letter_box?
Having made the changes, this error occurs at the first yolo layer:
Error: l.outputs == params.inputs
filters= in the [convolutional]-layer doesn't correspond to classes= or mask= in [yolo]-layer
[convolutional]
size=1
stride=1
pad=1
filters=36
activation=linear
[yolo]
mask = 5,6,7,8
anchors = 11, 31, 25, 48, 15,115, 43, 78, 36,228, 75,110, 93,172, 109,263, 165,316
classes=7
num=9
jitter=.3
ignore_thresh = .7
truth_thresh = 1
random=1
But filters is correct according to: _filters = (classes + 5) * num / number_of_yolo_layers_
Where have I gone wrong? :o
@AlexeyAB any help? :/
But filters is correct according to: filters = (classes + 5) * num / number_of_yolo_layers
in general
filters=(classes + 5) * num_of_masks = (7+5) * 4 = 48
My first yolo layer calculated anchors are:
mask = 6,7,8
anchors = 11, 31, 25, 48, 15,115, 43, 78,36,228,75,110,93,172,109,263,165,3164 anchors larger than 60x60, for example 36x228=8208 > 60x60=3600,
so should bemask = 5,6,7,8
hi, @AlexeyAB
36 脳 228 = 2208 > 60 脳 60锛宼he anchors such as 36, 228 75,110, 93,172, 109,263, 165,316 statify the condition锛宮ask = 4,5,6,7,8.
36 < 60, so the anchor 36, 228 is excluded?
Most helpful comment
in general
filters=(classes + 5) * num_of_masks = (7+5) * 4 = 48