关于yolo but -nan和nan的训练模型

时间:2020-02-11 23:21:48

标签: python opencv image-processing artificial-intelligence yolo

我想在yolo上训练模型,但是一步之后就给nan和-nan 我有300张不同尺寸的图像(几乎600 * 600) 一类检测图像。在我给出100张图像的好结果之前(检测精度为75%) 但我想给出最好的结果。

train

tiny_yolo.cfg

[net]
batch=64
subdivisions=8
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
max_batches = 120000
policy=steps
steps=-1,100,80000,100000
scales=.1,10,.1,.1

[convolutional]
batch_normalize=1
filters=30
size=3
stride=1
pad=1
activation=leaky

[maxpool]
size=2
stride=2

[convolutional]
batch_normalize=1
filters=30
size=3
stride=1
pad=1
activation=leaky

[maxpool]
size=2
stride=2

[convolutional]
batch_normalize=1
filters=30
size=3
stride=1
pad=1
activation=leaky

[maxpool]
size=2
stride=2

[convolutional]
batch_normalize=1
filters=30
size=3
stride=1
pad=1
activation=leaky

[maxpool]
size=2
stride=2

[convolutional]
batch_normalize=1
filters=30
size=3
stride=1
pad=1
activation=leaky

[maxpool]
size=2
stride=2

[convolutional]
batch_normalize=1
filters=30
size=3
stride=1
pad=1
activation=leaky

[maxpool]
size=2
stride=1

[convolutional]
batch_normalize=1
filters=30
size=3
stride=1
pad=1
activation=leaky

###########

[convolutional]
batch_normalize=1
size=3
stride=1
pad=1
filters=30
activation=leaky

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

[region]
anchors = 0.738768,0.874946,  2.42204,2.65704,  4.30971,7.04493,  10.246,4.59428,  12.6868,11.8741
bias_match=1
classes=1
coords=4
num=5
softmax=1
jitter=.2
rescore=1
small_object=1

object_scale=5
noobject_scale=1
class_scale=1
coord_scale=1

absolute=1
thresh = .6
random=1

我拆分了80-20个火车和测试数据 我使用这个darknet

请帮助我!

1 个答案:

答案 0 :(得分:0)

我忘记了Darknet中的配置makefile。 我使用Google Colab,首先必须使用GPU和CUDNN进行定义。

Makefile(darknet)