| With the takeoff of our economy,the number of cars is growing daily,but the speed of road construction is far slower than the growth rate of the number of vehicles,resulting in traffic congestion and traffic accidents,placing a great deal of strain on the road traffic,the construction of a more comprehensive intelligent traffic system is urgent.Vehicle flow statistics is the basis for the intelligent traffic system to function,supplying the fundamental data for subsequent processing,and vehicle detection is the premise of vehicle flow statistics.However,in the actual application scenario,the phenomenon of low accuracy of vehicle detection and poor accuracy of vehicle flow statistics is common.In this research,based on the analysis of the current research status and difficulties in the field of vehicle detection and vehicle flow statistics,a vehicle flow statistics method combining vehicle detection,vehicle tracking and virtual detection line is proposed.This technique can gather real-time detailed vehicle information,provide a basis for traffic management to divert traffic,avoid traffic jams and enhance the utilization of road resources.The main works are as follows:For vehicle detection,the YOLOv4 algorithm,a representative deep learning-based target detection algorithm,is selected to complete the detection work,and the algorithm is improved to increase the accuracy and speed.First,in order to obtain the anchor frames that match the vehicle dimension size,the clustering is completed using the K-means++ algorithm with higher stability.Secondly,to improve the feature extraction capability,the embedding method of the attention mechanism is studied,and the optimized ECA attention mechanism is fused to find the best embedding position that can improve the detection performance.Finally,to improve the detection speed,the algorithm structure is lightened,and the depthwise separable convolution is introduced into the feature extraction network and reduce the number of residual blocks in the residual structure to reduce the number of network parameters.For vehicle tracking,the Deep SORT algorithm,which has good performance in multi-objective online tracking algorithm,is selected to complete the vehicle tracking work.First of all,the size of the input image of the feature extraction network is adjusted to make it more consistent with the aspect ratio of the vehicle.Next,the connection of detection and tracking algorithm is designed to track the module to reduce the phenomenon of false detection and missed detection of the vehicle.Last,the adjusted network is trained for re-identification to obtain a tracking algorithm more suitable for this research.In terms of vehicle flow statistics,based on the detection and tracking of vehicle information,the detection,tracking and counting are effectively unified through the most commonly used detection line method,which can more accurately and efficiently count the vehicle flow.Two virtual detection lines are set up at suitable locations on the road to determine the statistical area,and the vehicles in the area are detected and tracked,and the vehicle flow statistics are completed by combining the position relationship between the tracked vehicles and the detection lines to obtain the current traffic situation on the road.The experimental findings demonstrate that the enhanced vehicle detection algorithm has better detection accuracy and detection speed and can respond to the requirement for real-time detection.The optimized vehicle tracking algorithm better solves the problem of identity loss caused by the reappearance of the vehicle after being obscured,and the combined detection algorithm reduces the situation of the vehicle being false detected and missed.The vehicle flow statistics scheme that integrates the advantages of the two methods obtains a high accuracy rate,which has practical significance and application value. |