AlexeyAB / darknet

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

MAP on VOC07 test #696

Open ghost opened 6 years ago

ghost commented 6 years ago

Hi,

I follow the training steps in ReadMe to train the VOC model. But the MAP on VOC07 test is only 71.8. It seems quite farm from yolov2's performance which is about 76.8. Does anyone also try the training and what is your MAP? And any advice I can follow to improve the MAP?

Thx.

----Edit---- The average loss is about 0.389580.

AlexeyAB commented 6 years ago

Hi,

ghost commented 6 years ago

Thx for the reply.

Did you use yolo-voc.cfg or tiny-yolo-voc.cfg?

Yes, I used yolo-voc.cfg.

What batch, subdivision, width, height and random did you use for training and detection?

bacth=64, subdivision=32. Other options remain unchanged.

To get the maximum mAP you can try to train multiple times and get the best weights-file.

By "train multiple times", do you mean start multiple training process independently but with different learning rate schedules? Or just with the same schedules?

AlexeyAB commented 6 years ago

Start multiple training process independently with the same learning rate schedules. Every time, the accuracy changes a little. And try to use subdivision=8 if your GPU allow this.

Did you train 80200 iterations?

ghost commented 6 years ago

Train 50200 iterations by default. @AlexeyAB

Thx.

AlexeyAB commented 6 years ago

Why would the subdivision affect the performance?

real_batch_size = cfg-batch / cfg-subdivision: https://github.com/AlexeyAB/darknet/blob/15139eb6abd3c6c05a4046b5ac917de42c678827/src/parser.c#L608

So during training we iterate in the loop from 0 to subdivision and do forward-backward-update for real_batch_size:

https://github.com/AlexeyAB/darknet/blob/15139eb6abd3c6c05a4046b5ac917de42c678827/src/network.c#L309-L320

So:

The bigger the real_batch_size - the better network can be generalizied.