Search code examples
yolo

Trained YOLO, which iteration does yolo_best.weights have?


I trained YOLOv3 via the Darknet framework. Every 1000 iteration it saved the weights but at the end, Darknet evaluates all the weights, and uses the best. They are saved in a separate file "yolov3_best.weights".

I want to find out, which iteration was used for this file. I tried so far:

  • use the weights in a recognition test via terminal and checked the output
  • opened the best.weights-file via Editor and searched for it

but I couldn't find it.

Does anyone have a solution?

Thanks upfront.


Solution

  • so, it is not clear how to find out which iteration step / epoch was used for the best_weights-file, so I did the following:

    I wrote a script, which uses the "yolov3_best.weights"-file to detect all classes in the testset, compared that with my label-data and calculated the metrics recall, precision and f1. I did this also for all the other weights, that darknet saves by default (every 1000 iteration steps) and compared the results of.

    At the end I found out, that the "yolov3_best.weights" is not the best for my metrics, so I choose the one with the highest recall value (but others may choose according to the metric that has to be optimized for the case neccessary).

    Hope this helpes others.