Darknet: Can not learn yolov3-voc

Created on 26 Mar 2018  路  7Comments  路  Source: pjreddie/darknet

The yolov3-voc.cfg that you uploaded today has the following error.

darknet: ./src/parser.c:351: parse_region: Assertion `l.outputs == params.inputs' failed.

Most helpful comment

in the yolov3-voc.cfg file there are three [yolo] block. you have to change the filter size for each of the [convolutional] block filter size before all the three [yolo] block as follow -
filter size=(num/3)*(classes+5)
In my case, as the classes are 1 and num=9 so the filter size is 18.

[convolutional]
size=1
stride=1
pad=1
filters=18
activation=linear

[yolo]
mask = 6,7,8
anchors = 10,13, 16,30, 33,23, 30,61, 62,45, 59,119, 116,90, 156,198, 373,326
classes=1
num=9

jitter=.3
ignore_thresh = .5
truth_thresh = 1
random=1

All 7 comments

set your filters in the last convolution layer as (classes+1+coords)*num_of_clusters , e.g it should be 30 if classes =1, coords=4, num_of_clusters=5

Sorry, no that was me I broke it but I fixed it 060faa268de7bf45126fbc1ee775f6af091fc8ed

@pjreddie Thank you for your enthusiastic works.

@pjreddie i got same error.

81 conv 99 1 x 1 / 1 13 x 13 x1024 -> 13 x 13 x 99 0.034 BFLOPs 82 detection darknet: ./src/parser.c:312: parse_yolo: Assertion "l.outputs == params.inputs" failed. Aborted (core dumped)

@bduman Did you solve the problem? I face the same error.
Thank you!

@ChongZhangZC i switch it to v2 and not try again later

in the yolov3-voc.cfg file there are three [yolo] block. you have to change the filter size for each of the [convolutional] block filter size before all the three [yolo] block as follow -
filter size=(num/3)*(classes+5)
In my case, as the classes are 1 and num=9 so the filter size is 18.

[convolutional]
size=1
stride=1
pad=1
filters=18
activation=linear

[yolo]
mask = 6,7,8
anchors = 10,13, 16,30, 33,23, 30,61, 62,45, 59,119, 116,90, 156,198, 373,326
classes=1
num=9

jitter=.3
ignore_thresh = .5
truth_thresh = 1
random=1

Was this page helpful?
0 / 5 - 0 ratings