YOLO_weight_extractor support one class cfg and .weights file?
Closed this issue · 1 comments
I used one class cfg and .weights file like this: ./darknet yolo test cfg/yolo1-tiny-obj.cfg yolo1-tiny-obj_40000.weights. Then error happened in [detection] layer: 15: darknet: ./src/detection_layer.c:25: make_detection_layer: Assertion `sideside((1 + l.coords)*l.n + l.classes) == inputs' failed.
已放弃 (核心已转储)
My cfg file like this:
[net]
batch=64
subdivisions=8
height=448
width=448
channels=3
momentum=0.9
decay=0.0005
saturation=.75
exposure=.75
hue = .1
learning_rate=0.0005
policy=steps
steps=200,400,600,800,20000,30000
scales=2.5,2,2,2,.1,.1
max_batches = 40000
[convolutional]
batch_normalize=1
filters=16
size=3
stride=1
pad=1
activation=leaky
[maxpool]
size=2
stride=2
[convolutional]
batch_normalize=1
filters=32
size=3
stride=1
pad=1
activation=leaky
[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
filters=128
size=3
stride=1
pad=1
activation=leaky
[maxpool]
size=2
stride=2
[convolutional]
batch_normalize=1
filters=256
size=3
stride=1
pad=1
activation=leaky
[maxpool]
size=2
stride=2
[convolutional]
batch_normalize=1
filters=512
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=256
activation=leaky
[connected]
output= 1470
activation=linear
[detection]
classes=1
coords=4
rescore=1
side=7
num=2
softmax=0
sqrt=1
jitter=.2
object_scale=1
noobject_scale=.5
class_scale=1
coord_scale=5
Have anyone known how to solve the problem? Thank you.
I solved it. It means output in last [connected] layer should be equal to side*side((1 + l.coords)*l.n + l.classes)