pjreddie / darknet

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

I train my own yolov3-tiny.weights,but no object be detected. #2278

Open jack162 opened 4 years ago

jack162 commented 4 years ago

Hello everyone,

I use ./darknet detector train button-tiny/cfg/obj.data button-tiny/cfg/yolov3-tiny.cfg darknet53.conv.74 to train my own weights. here are my cfg file

obj.data classes= 8 train = /home/josh/darknet/button-tiny/cfg/train.txt valid = /home/josh/darknet/button-tiny/cfg/test.txt names = /home/josh/darknet/button-tiny/cfg/obj.names backup = /home/josh/darknet/button-tiny/cfg/weights/

obj.names up down 3 2 1 B1 close open

yolov3-tiny.cfg batch=24 subdivisions=8 classes=8 filter=(classes+3)*5=39

then i get yolov3-tiny_40000.weights

it is usable in darknet that i test it by my computer camera ./darknet detector demo button-tiny/cfg/obj.data button-tiny/cfg/yolov3-tiny.cfg yolov3-tiny_40000.weights the outcome looks like this predictions

but when i put my weights to darknet_ros,the buttons can not be detect. i chang network_param_file in yolo_v3.launch to yolov3-tiny-button.yaml.

yolov3-tiny-button.yaml. yolo_model:

config_file: name: yolov3-tiny.cfg weight_file: name: yolov3-tiny_40000.weights threshold: value: 0.3 detection_classes: names:

I use ./darknet detector train button-tiny/cfg/obj.data button-tiny/cfg/yolov3-tiny.cfg darknet53.conv.74 to train my own weights. here are my cfg file

By the way,the yolov3-tiny.cfg is same as the I use for training.only batch and subdivisions i set to 1.

if anyone face to same problem? thanks a lot!

InputBlackBoxOutput commented 3 years ago

I faced the same issue. I dug in to discover that the confidences are too low.

Remedy:

  1. Train yolov3-tiny with convolution layers having more filters by editing the cfg file
  2. Train for more than 10000 batches