AlexeyAB / darknet

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

Is there need to change the random=1 to random=0 when I training the higher resolution than 608? #4272

Open QuntuamLoop opened 4 years ago

QuntuamLoop commented 4 years ago

Hi, there is a question in the introdution about "How to improve object detection" : "Increase network-resolution by set in your .cfg-file (height=608 and width=608) or (height=832 and width=832) or (any value multiple of 32) - this increases the precision and makes it possible to detect small objects: it is not necessary to train the network again, just use .weights-file already trained for 416x416 resolution but to get even greater accuracy you should train with higher resolution 608x608 or 832x832, note: if error Out of memory occurs then in .cfg-file you should increase subdivisions=16, 32 or 64: link" Is that mean the higher than 608 resolution training with the ### random=1 will train out the resolution range from 320 to 608 . Or in fact we train the input image in the higher resolution should set the random=1 to =0 in the Yolo section? Thank you.

AlexeyAB commented 4 years ago

With width=832 height=832 random=1 the network will be trained for /1.4 - 1.4x resolution, i.e. 608x608 - 1152x1152 resolution (randomly for each 10 iterations).

random=1 increases accuracy.

QuntuamLoop commented 4 years ago

So, that is one of differences from pjreddie? In my practice, I feel the old version is trainning with the resolution range from 320 to 608 @AlexeyAB

AlexeyAB commented 4 years ago

Yes, if in pjreddie repo you will set width=1024 height=1024 random=1 and train, then you will get very bad results, since training will for 320x320 to 608x608, but detection will be for 1024x1024.

It is fixed in this repository.

QuntuamLoop commented 4 years ago

Thanks a lot, AlexeyAB. It is a very important amendment.