AlexeyAB / darknet

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

Setting upsample layer yolo V3 #5915

Open Alessio-Attanasio opened 4 years ago

Alessio-Attanasio commented 4 years ago

Hi! I'm tring to improve detection of small object of my yolov3 model, obviously my dataset have many examples of this type.

I'm following an article that recommend to set step=4 at last upsample layer, but in cfg file i can't find value "step" at upsample layer but a value called "stride".

here extract of article that cite the operation: "We set the step size to 4 in the upsampling layer before the last yolo layer"

Are step size and stride the same thing? The article clearly cite yolov3 as used model.

AlexeyAB commented 4 years ago

Can you show link to the article?

Alessio-Attanasio commented 4 years ago

https://link.springer.com/article/10.1186/s12544-019-0390-4?shared-article-renderer#Sec13

In the section "Results and discussion" there is "Network training and vehicle detection"

AlexeyAB commented 4 years ago

Actually this is stride: https://github.com/AlexeyAB/darknet#how-to-improve-object-detection

for training for small objects (smaller than 16x16 after the image is resized to 416x416) - set layers = 23 instead of https://github.com/AlexeyAB/darknet/blob/6f718c257815a984253346bba8fb7aa756c55090/cfg/yolov4.cfg#L895 set stride=4 instead of https://github.com/AlexeyAB/darknet/blob/6f718c257815a984253346bba8fb7aa756c55090/cfg/yolov4.cfg#L892 and set stride=4 instead of https://github.com/AlexeyAB/darknet/blob/6f718c257815a984253346bba8fb7aa756c55090/cfg/yolov4.cfg#L989

Alessio-Attanasio commented 4 years ago

Thanks a lot, i have a question about "layers" value, i set width and height at 832*832 in cfg so layers=23 is okay anyway?