pjreddie / darknet

Convolutional Neural Networks
http://pjreddie.com/darknet/
Other
25.73k stars 21.33k forks source link

No detection after training YoloV3 on custom object dataset #1704

Open ghost opened 5 years ago

ghost commented 5 years ago

Hello All: I did training based on the available procedures ("darknet.exe detector train data/obj.data yolov3-tiny-obj.cfg yolov3-tiny.conv.15") and everything seems well. The training was started from 316.23 avg and was finished in 0.001, while the trained net could not detect anything (even on training/validating images). Please advise.

My "obj.data" is as below: classes = 1 train = data/train.txt valid = data/test.txt names = data/obj.names backup = backup/

My "yolov3-tiny-obj.cfg" is as below: [net]

Testing

batch=1

subdivisions=1

Training

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 burn_in=1000 max_batches = 2000 policy=steps steps=1600,1800 scales=.1,.1

[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=1

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

###########

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

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

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

[yolo] mask = 3,4,5 anchors = 10,14, 23,27, 37,58, 81,82, 135,169, 344,319 classes=1 num=6 jitter=.3 ignore_thresh = .7 truth_thresh = 1 random=1

[route] layers = -4

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

[upsample] stride=2

[route] layers = -1, 8

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

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

[yolo] mask = 0,1,2 anchors = 10,14, 23,27, 37,58, 81,82, 135,169, 344,319 classes=1 num=6 jitter=.3 ignore_thresh = .7 truth_thresh = 1 random=1

hasansalimkanmaz commented 5 years ago

did you solve the problem?

quantumsquirrel commented 4 years ago

Same problems happens to me. Can you tell me how to solve this problem please.

quocnhat commented 4 years ago

sam problem sofar has anyone solved this? pls help

huiguobao commented 4 years ago

Try to uncomment batch and subdivision as follow:

Testing

batch=1 subdivisions=1

Fetulhak commented 4 years ago

Test it by changing the IOU and Con_threshold as shown below !./darknet detector test build/darknet/x64/data/trainer.data build/darknet/x64/cfg/yolov3.cfg build/darknet/x64/backup/yolov3_last.weights -thresh 0.075 -iou_thresh 0.3 build/darknet/x64/data/img/p-095.jpg