With the rapid development of computer technology and society,there is an increasing demand for small object recognition and tracking in fields such as remote sensing detection and drone aerial photography.Therefore,small object detection has important research significance.You Only Look Once v4(YOLO v4)is one of the classic representatives of object detection based on deep learning,which is now widely used in industrial quality inspection,intelligent transportation,and other fields by virtue of its high detection accuracy and fast speed.However,it often leads to the problem of missing or false detection when detecting small objects due to the low resolution and low feature information of small objects and the limitation of YOLO v4network to extract feature information of small objects.Therefore,in this thesis,we improve the YOLO v4 detection model and optimize the loss function and anchor box settings.Based on the selection of the appropriate anchor box,the discriminative and robustness of small object features are enhanced and the contribution of the loss function is increased,thus improving the performance of small object detection.The main contents of this research summarized as follows.(1)In order to obtain small object discriminative and robust features while improving the contribution to the loss function,a small object detection algorithm based on multi-scale contextual information and soft CIOU loss function(MCS-YOLO v4)is proposed.In terms of network structure,in order to enhance the robustness and discrimination of the extracted features,a multi-scale contextual information module set guided by the hybrid attention mechanism is proposed,which introduces new detection scales for predicting small objects on top of the original three detection scales,while multi-scale fusion of feature contextual information and original features is performed.The obtained features are fed into the feature fusion network and the region of interest is obtained under the guidance of the hybrid attention mechanism.The region of interest is obtained under the guidance of the hybrid attention mechanism.In terms of loss function,the Soft-CIOU loss function is proposed in order to enhance the learning ability of the network for small objects.Based on the CIOU function,the Euclidean distance is used as the calculation criterion for the distance between the center point of the bounding box and the ground truth box,and the aspect ratio weighting factor is set to mitigate the influence of the bounding box adjustment on the small object prediction results.The experimental results on the public small object data indicate that MCS-YOLO v4 shows some superiority in the accuracy and recall rate of detecting small objects compared with other detection algorithms.(2)In order to optimize the effect of anchor box clustering while enhancing the ability of the network to learn small objects,a small object detection algorithm based on anchor box clustering optimization and scale weight loss function(AS-MCS-YOLO v4)is proposed.In order to reduce the influence of random initial clustering centroids on the clustering effect and optimize the clustering effect,an anchor box clustering algorithm based on multi-region centroid partitioning and improved particle swarm optimization is proposed.The proposed particle swarm optimization algorithm based on self-adaptive inertia weight adjustment is integrated with the clustering algorithm to update the clustering centroids to accelerate the clustering convergence speed and improve the clustering effect.In order to reduce the limitation of Soft-CIOU in the ability to narrow the contribution gap,the proposed Soft-CIOUsw loss function based on scale weights,which sets the scale boundary constants of small targets and calculates the scale weights according to the area of small objects,achieves to improve the contribution of small objects to the loss function while keeping the weights of other objects unchanged,and enhances the learning of the network for small objects capability.The experimental results on the public small object data show that AS-MCS-YOLO v4 not only has no missed and false detections in small object detection compared with the existing object detection algorithms,but also can effectively identify and locate the aggregated small objects. |