Sina
Sina

Reputation: 1

re train yolo4 weight with the .weights extension

I have trained yolo network weight with the ".weights" extension, and am trying to update it using darknet, and more dataset. Is there anyway I can use this weight and update it with more dataset than using original provided weight (.conv.74)? Or I need to train everything from the beginning?

Here is what I am trying to do, but it is not giving me anything.

./darknet detector train tmp_yolo/cfg/obj.data tmp_yolo/cfg/yolov3-tiny-custom.cfg /content/drive/MyDrive/Training_Forest3D/Weight/yolov3.weights

Upvotes: 0

Views: 127

Answers (1)

Stéphane
Stéphane

Reputation: 20380

The error of "not giving me anything" is too vague to be useful.

But what I'm guessing you've run into is you told Darknet to train for a certain number of batches. Known as "max batches" in the .cfg file. So when you attempt to train again and re-using the previous weights, Darknet is telling you it has already reached that value, and simply exits with a message. The message it logs is this one:

If you want to re-start training, then use the flag "-clear" in the training command.

So you have 3 options:

  • Use the -clear command as it is telling you to do.
  • Increase your max batches in your .cfg file to force Darknet to continue training.
  • Retrain from scratch.

Note this is also addressed in the Darknet/YOLO FAQ: https://www.ccoderun.ca/programming/yolo_faq/#training_command

If the problem is something else, you'll need to edit your original question to make it clear exactly what sort of issue you ran into.

Upvotes: 0

Related Questions