AlexeyAB / darknet

YOLOv4 / Scaled-YOLOv4 / YOLO - Neural Networks for Object Detection (Windows and Linux version of Darknet )
http://pjreddie.com/darknet/
Other
21.67k stars 7.95k forks source link

Finetune the model with yolov3.weights #1372

Open dionysos4 opened 6 years ago

dionysos4 commented 6 years ago

Hi @AlexeyAB,

I have a very similar dataset as COCO but it has only around 8000 images. What I now want to do is finetuning with the yolov3.weights. However, when I want to start the training with the yolov3.weights the program aborts after creating the network immediately and prints "saving weights yolov3_final.weights". Do you have any experience with finetuning or do you have any idea what to change in the code that it is possible to train with yolov3.weights?

dionysos4 commented 6 years ago

In #1368 you mentioned the "-clear" parameter. Can you explain what this parameter does? Another interesting thing what I noticed is that if I set the learning rate to 0.0 and train for 100 minibatches there still trains something. (MAP on COCO before training: 0.398; after training with learning rate 0.0: 0.392.

liaoluke commented 6 years ago

I believe I had this exact same issue before where the finetuning doesn't train. The reason that the training did not proceed was because the cfg had a max_batches = 500200 parameter, and the yolov3 weights have already been trained for the maximum number of batches, so additional training immediately terminates. To fix this you just have to reset the batch count to 0 and it should work.

AlexeyAB commented 6 years ago

In #1368 you mentioned the "-clear" parameter. Can you explain what this parameter does?

It just resets iteration number that is saved in the yolov3.weights file. So you can train even it iteration number reached max_batches=.

dionysos4 commented 6 years ago

Thanks and do you have any idea what happens if learning rate = 0.0

huynhtnhut commented 5 years ago

In #1368 you mentioned the "-clear" parameter. Can you explain what this parameter does?

It just resets iteration number that is saved in the yolov3.weights file. So you can train even it iteration number reached max_batches=.

Which yolov3.weights file that had reset, can you give me the direct link ? This one keep saving it self when i press Enter(https://pjreddie.com/media/files/yolov3.weights)