Open yusiyohpolimi opened 3 years ago
@yusiyohpolimi check the readme file which has mentioned
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
set stride=4 instead of https://github.com/AlexeyAB/darknet/blob/6f718c257815a984253346bba8fb7aa756c55090/cfg/yolov4.cfg#L989
& also check this https://github.com/AlexeyAB/darknet/issues/7087#issuecomment-750924784
Firstly thank you for your response. However, I have read already the part you sent, it is for yolov4 not yolov4-csp. I think there are structural differences. In addition, I cannot open the issue you sent in the end. Thanks again.
@yusiyoh what is the difference between yolov4 vs yolov4-csp?
Yolov4-CSP uses Cross-Stage-Partial (CSP) Network approach and is also known as Scaled-Yolov4. https://github.com/AlexeyAB/darknet/issues/7087
@yusiyoh this is mentioned by alexyab
https://github.com/AlexeyAB/darknet/issues/7087
If you want to detect small objects using new models csp/x-mish, then its better to fine-tune yolov4x-mish.cfg/weights on COCO or your dataset by using Darknet with these modifications for each [yolo] layer in yolov4x-mish.cfg
objectness_smooth=0 scale_x_y = 1.05 remove iou_loss=ciou and iou_normalizer=0.07 as a last resort: remove new_coords=1 (and change activation=logistic to activation=linear in [convolutional] layers before [yolo] layers) Also if you want to detect objects in crowds, then train with iou_thresh=1.0 instead of iou_thresh=0.2
@yusiyoh this is mentioned by alexyab
7087
If you want to detect small objects using new models csp/x-mish, then its better to fine-tune yolov4x-mish.cfg/weights on COCO or your dataset by using Darknet with these modifications for each [yolo] layer in yolov4x-mish.cfg
objectness_smooth=0 scale_x_y = 1.05 remove iou_loss=ciou and iou_normalizer=0.07 as a last resort: remove new_coords=1 (and change activation=logistic to activation=linear in [convolutional] layers before [yolo] layers) Also if you want to detect objects in crowds, then train with iou_thresh=1.0 instead of iou_thresh=0.2
Do you know that I can use pytorch implementation and make these changes on cfg file instead of yaml (because they are not same configurations) and use that cfg file to train model with pytorch? Because It is mentioned that to use darknet and make these changes on cfg file.
@yusiyohpolimi See here: https://github.com/AlexeyAB/darknet/issues/8081#issuecomment-931741303
Hello there, thank you for very good work. I have images of 2048*1024 resolution. And I have an average width of 11 pixels for the labels. (The dataset is actually DriveU Traffic Light Dataset). I was reading your tips about training, and saw some changes for small objects in the cfg files. However they are for another version. What should I change in yolov4-csp.cfg for small object detection? In addition, I am also open to suggestions for a model for this task if anyone has. Thank you,