| Due to the continuous development of deep learning technology,object detection is becoming more and more widely used in real-world scenarios.In order to address the lack of detection accuracy or the phenomenon of missing detection in the current target detection field,this paper carries out research on the improvement method from the backbone part and feature fusion part of YOLOv5 s network,and the main research contents are as follows:(1)YOLOv5s Object Detection Algorithm Based on Improved Backbone Network.This paper improves the feature extraction capability of the network by introducing the attention mechanism module in the YOLOv5 s backbone network part.The feature extraction network used in the YOLOv5 s backbone network part is a cross-stage local network,which is prone to the phenomenon of losing feature information after multiple down sampling of small target feature information in the backbone network part,thus causing the problem of wrong and missed detection.To solve the above problems,this paper proposes the adaptive coordinate attention mechanism module(Coordinate Attention-Activate or not,CA-A)to enhance the feature extraction ability of the network model,so that the model can better identify the feature information.And the ACON activation function is used and normalized,thus avoiding problems such as gradient loss.Next,the CIo U loss function of the original YOLOv5 s network is improved.In order to solve the problem that the CIo U loss function has ambiguous bounding box localization,the AD-CIo U loss function is proposed in this paper,which improves the accuracy of bounding box localization by combining angle loss and distance loss.Experiments on the PASCAL VOC dataset show that the YOLOv5 s target detection algorithm based on the improved backbone network has better detection performance compared with the target detection algorithms of recent years.(2)YOLOv5s Object Detection Algorithm Based on Improved Feature Fusion.In order to enhance the feature fusion capability of YOLOv5 s network,this paper proposes a target detection algorithm for YOLOv5 s based on improved feature fusion.Firstly,the spatial pyramid pooling structure of the original YOLOv5 s network is improved,and Spatial Pyramid Pooling-Fast-P-Re LU(SPPF-R)is proposed to improve its operation speed by replacing the Si LU activation function in the spatial pyramid pooling structure with the P-Re LU activation function.In order to enhance the model’s attention to important features,a module fusing the channel and spatial attention mechanism(Channel and Spatial Attention Module(CSAM))is proposed to fuse features by mapping attention weights in both channel and spatial dimensions,which in turn improves the model’s detection capability for targets.The CSAM module is then fused with the Adaptively Spatial Feature Fusion(ASFF)structure to form a CSAM-ASFF network structure to enhance the feature fusion capability of the network.In order to avoid the phenomenon that the ratio of the width and height of the prediction frame to the real frame of the CIo U loss function is linearly proportional,which leads to the phenomenon that the width and height of the prediction frame cannot be increased or decreased at the same time when the prediction frame is regressed,and to increase the speed of the prediction frame regression,the S-CIo U loss function is proposed in this paper by combining the CIo U loss function with the shape loss.The experiments show that the YOLOv5 s network with improved feature fusion has better detection performance compared with the target detection algorithms of recent years.In addition,this paper designs a object detection system using Py Qt5 and demonstrates that this algorithm can be applied to other fields through experiments on the Face Mask Detection dataset and the disguised person dataset. |