AlexeyAB / darknet

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

possible overfitting #5461

Open ahmadalzoubi13579 opened 4 years ago

ahmadalzoubi13579 commented 4 years ago

hi @AlexeyAB , i trained for 10,000 iteration with yolov3.cfg on my dataset to detect 2 classes ( person and fire )

darknet.exe detector train data/obj.data yolo-obj.cfg darknet53.conv.74

my dataset has 6000 image for training and 1000 image for validation , the best model results was 58% mAP on validation dataset , but when i calculate the mAP using the same model on the training dataset , i got 95% mAP , so the question, is the model overfitting ? and how to solve this problem ?

results :

best model results on validation dataset :

Untitled

best model results on training dataset :

Untitled1

AlexeyAB commented 4 years ago

https://github.com/AlexeyAB/darknet#how-to-improve-object-detection

for each object which you want to detect - there must be at least 1 similar object in the Training dataset with about the same: shape, side of object, relative size, angle of rotation, tilt, illumination. So desirable that your training dataset include images with objects at diffrent: scales, rotations, lightings, from different sides, on different backgrounds - you should preferably have 2000 different images for each class or more, and you should train 2000*classes iterations or more