AlexeyAB / darknet

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

Model trained on custom dataset not detecting most objects #2877

Closed DarylWM closed 5 years ago

DarylWM commented 5 years ago

Hi @AlexeyAB . I've learned a lot about YOLO by reading your answers here and the "How to improve object detection" section. I haven't managed to get it to detect many objects yet so I'm seeking your advice.

I'm training a YOLO model to detect peptide features in mass spectrometry data. I've converted the raw data into pseudo-colour images. I have 15,900 images in the training set, 885 images in the validation set, and 885 images in the test set (a 90:5:5% split), with images assigned to a set at random. Across the whole set, I have about 70,000 labelled objects from four classes.

After 5000 iterations the mAP hovers under 15-20% and never improves.

image

As an example, for this image from the test set...

image

... this is the prediction:

image

My model definition is a modified yolov3.cfg, with custom anchors for this dataset. The images are 910x910 but I had to make the YOLO input layer 864x864 to fit in my GTX1070s. yolov3-peptides.cfg.txt

image

Next on my list of things to try is a different model, like 5l or spp.

Do you have any suggestions?

DarylWM commented 5 years ago

Switching to yolov3-tiny_3l gave much better results, and it trains much faster.

image

AlexeyAB commented 5 years ago

@DarylWM Hi,

Can you share your modified yolov3-tiny_3l.cfg? This is strange that Tiny model gives better mAP than Full model.

DarylWM commented 5 years ago

Hi @AlexeyAB . From the cfg out of the box I changed the width and height, number of classes, filters, removed augmentation, and adjusted subdivisions.

yolov3-tiny_3l-peptides.cfg.txt