Vehicle detection is an important component of intelligent transportation systems.Based on advanced perception and analysis techniques,it provides strong support for traffic management and safety by monitoring various information about vehicles on the road in real time.Currently,there are many vehicle detection algorithms available,but small target vehicle detection is challenging due to factors such as difficult feature recognition,low resolution,complex environment,and limited contextual information.This can lead to missed or false detections.Additionally,most vehicle detection algorithms cannot balance accuracy and real-time performance,making them difficult to apply in practical situations.To address these issues,this paper proposes two deep learning-based vehicle detection algorithms,which are outlined in detail below:This article proposes the YOLO-TRANS vehicle detection algorithm to address the issue of low detection accuracy for small target vehicles in current vehicle detection algorithms.The algorithm is based on YOLOv4 and incorporates a Transformer attention mechanism module to enhance the model’s ability to obtain contextual information,allowing the model to focus more on the vehicle regions in the image and learn vehicle features better,thereby avoiding interference from complex backgrounds or other regions.Additionally,to avoid the loss of information during feature fusion,a weighted Bidirectional Feature PyramidNetwork(BiFPN)is employed to add extra weights to different input features and better fuse features of different scales.Finally,the K-Means++ clustering method is used to analyze the target scales for vehicle detection and obtain more accurate prior boxes through clustering,further improving the algorithm’s detection performance.This article proposes the YOLO-Ghost lightweight vehicle detection algorithm based on the YOLO-TRANS algorithm.To address the challenge of balancing high detection accuracy and high detection speed in current lightweight vehicle detection algorithms,YOLO-Ghost replaces the CSPDarknet53 network in YOLO-TRANS with the lightweight GhostNet network as its backbone,reducing redundant network parameters to improve detection speed.The Transformer attention module is added to the GhostNet network to enhance network detection accuracy and avoid the potential tradeoff between detection accuracy and speed.In the feature fusion stage,YOLO-Ghost employs Depthwise Separable Convolution(DSConv)instead of ordinary convolution in the BiFPN network,significantly reducing the number of parameters and improving feature fusion efficiency,thus further boosting detection speed.This article demonstrates the effectiveness of YOLO-TRANS and YOLO-Ghost algorithms in vehicle detection using the UA-DETRAC dataset.The experimental results show that YOLO-TRANS algorithm achieves remarkable improvement in detecting small vehicle targets compared to other object detection algorithms,while YOLO-Ghost algorithm achieves a significant increase in real-time detection speed without compromising detection accuracy. |