| As my country’s economy is taking off,people’s desire to buy cars has increased.Over the years,the growth rate of roads has been far slower than that of vehicles,causing traffic congestion and frequent traffic accidents.Intersections are the joints of urban traffic,and are also areas with high traffic congestion.Real-time statistics of traffic flow in all directions at intersections are helpful for traffic control departments to understand the traffic conditions in time,and to clear traffic congestion sections.Traditional data collection relies on the urban "sky eye" system.Because the camera has a limited height,it is easy to cause shadows and occlusion,and the detection range is also limited.It is difficult to deal with the complex detection scene of intersections.High-altitude video has the advantages of a wide monitoring range,and is not easily affected by vehicle occlusion and light shadows.It is especially suitable for such complex realistic scenes as intersections.This subject relies on intersections as the research scene,and mainly proposes an improved YOLOv4 target detection algorithm,a DeepSort target tracking algorithm based on CIoU,and a vehicle counting method in high-altitude images of intersections.The method of "detection +tracking + counting" is used to calculate the traffic flow in different driving directions at intersections.The main research contents are as follows:(1)Improved YOLOv4 target detection algorithm.Aiming at the problem that the current YOLOv4 detection method cannot balance accuracy and real-time in complex scenes such as intersections,the input image size is optimized first,and a sliding window cropping method is added to prevent the image from being deformed after input.Secondly,the number of output layers is reduced,and feature maps of two scales are used for target detection.Then the residual network structure is introduced in the output layer of YOLOv4 to improve the performance of the network,and the activation function of the CBL structure in the output layer is replaced with the mish function.Finally,the K-means++ algorithm is used to cluster the large and small vehicle anchor frame values in the high-altitude data set,and the anchor frame clustering results are combined to replace the original anchor point parameters.This method can not only effectively improve the detection accuracy of small targets in high-altitude images,but also maintain a high detection speed.(2)DeepSort target tracking algorithm based on CIoU.The IoU in the DeepSort algorithm only considers the overlap ratio of the detection frame and the prediction frame,and cannot measure whether the two frames are adjacent or far apart.Replace the IoU algorithm used for matching in the algorithm with the CIoU algorithm.It can better reflect the similarity between the prediction frame and the detection frame,and effectively improve the accuracy of target matching.(3)The method of counting vehicles in high-altitude images at intersections.First,draw a virtual detection frame at the entrance and exit.In order to compensate for the inability to count due to the loss of the target when passing through the virtual detection frame,the Vibe algorithm and YOLOv4 are added to the virtual detection frame for fusion detection to reduce the probability of target loss.Finally,the combined virtual detection frame counting method is used to count the traffic flow in each direction of the intersection.Experiments show that this method can effectively improve the accuracy of counting and meet the needs of applications. |