| Target detection has a wide range of applications in various scenarios,such as license plate detection and recognition,face recognition,tracking and positioning,etc.It plays an indispensable role.At present,with the development of target detection technology,the overall recognition accuracy of target detection has made great progress.However,in the field of small target detection in target detection,due to factors such as the low proportion of small targets in the image and the complex background,there is still room for improvement in the detection accuracy of small targets.Therefore,in view of the low recognition rate and poor detection accuracy in the current small target detection,this paper proposes an improved algorithm based on the target detection framework(You Only Look Once version 5,YOLOv5),from two levels of feature information extraction and feature recognition Improve the detection accuracy of the original algorithm for small targets.In view of the current YOLOv5 target detection frameworkâs insufficient ability to acquire information on small targets,a hybrid attention mechanism(Convolutional Block Attention Module,CBAM)is introduced.CBAM obtains more importance weights for small targets in two dimensions: channel and space,improve the connection of each feature in the channel and space,and more effectively extract the feature information of the small target in the image.Since YOLOv5 is prone to gradient explosion problems during feature transfer,an efficient intersection and ratio loss function(Focal and Efficient Interest Over Union,Focal-EIOU)was introduced to replace the original complete intersection and ratio loss function(Complete Interesection Over Union,CIOU),speeding up the convergence of the model.In view of the insufficient recognition ability of small targets in the current small target detection,this paper improves the internal structure of YOLOv5 and replaces the path aggregation network module(Path-Aggregation Network,PANet)in the original structure with the feature pyramid module(Attention Fusion Feature Pyramid Network,AF-FPN),because the AF-FPN module adds an adaptive attention module and a feature enhancement module on the basis of the traditional feature pyramid network,it can effectively reduce the loss of small target information,and the characteristics of small targets expression was enhanced.The K-Means clustering algorithm of the original network is replaced by the K-Means++ clustering algorithm,so that the local optimum during clustering is improved to the global optimum,and the recognition effect of the detection frame is improved,thereby improving the feature recognition ability of small targets.Finally,the improved algorithm was trained and tested on the Visdrone2019 dataset.Compared with the original algorithm,the improved YOLOv5 algorithm increased the value of m AP@0.5 by 3.1%,m AP@0.5:0.95 by 2.6%,and the accuracy rate increased by 3.2%,the recall rate has increased by 2.5%,and the detection accuracy of the improved algorithm has been improved to a certain extent,and it has certain advantages in small target detection compared with other target detection algorithms,and the detection effect is more prominent.Through the comparative analysis of the experimental results,it can be seen that the improved YOLOv5 model effectively improves the detection accuracy of small targets,which proves the effectiveness of the improved algorithm in the detection of small targets. |