How do I understand whether yolov4 training is overfitting?

3.6k Views Asked by At

I'm training to make human detection with YOLOv4 in the custom dataset. I used this command to train the dataset:

!./darknet detector train data/obj.data cfg/custom-yolov4-detector.cfg yolov4.conv.137 -dont_show -map

At the end of the training, it gives this chart:

enter image description here

Validation gives 97% accuracy at most. But when I observe the test data, it gives 80% accuracy approximately in video recording. Is it overfitting? How can I solve this problem? I think that the accuracy should grow up increasingly in the chart.

1

There are 1 best solutions below

5
On

This is not overfitting, it’s not a surprise that the accuracy on the test set is lower than on the validation set. The model has learned on the train set which normally is closer to the validation set and also sometimes the model is being fine tuned while using the validation set, so it’s expected that the model will perform better on the validation set (true for every ML model).

Overfitting occurs when training if the accuracy on the train set keeps increasing while the accuracy on the validation is decreasing between epocs. (the overfitting refers to the train set).