Abstract: A small target detection algorithm based on the improved YOLOv5s is proposed. Firstly, based on YOLOv5s, Focal Loss and EIoU Loss are introduced into the model to optimize the original BCE Loss and CIoU Loss to accelerate the convergence speed of the model. Secondly, a target detection head is added to improve the detection accuracy of small target sundries. Finally, the influence of different types of attention modules on the model is compared and analyzed, and coordinate attention is introduced into the model neck to strengthen the extraction of key features of the target and improve the learning ability of the model. The model is trained based on the self-made sundries dataset, and the experimental results show that compared with YOLOv5s, the accuracy of the improved model on the test set is improved by 4.9%, the recall rate increases by 5.5%, and the mean average precision (mAP) value increases by 7.3%. The model has better recognition effect, which meets the accuracy and real-time requirements in actual production.
Keywords: small target detection; YOLOv5s algorithm; attention mechanism; detection head; loss function improvement