Vehicle Tracking System Based on Improved YOLOv5 and SORT Algorithms
Studied a large number of parameters in recognition models in complex road environments,as well as the ID switching problem that is prone to occur when using SORT algorithm to track targets when encountering occlusion.On the recognition model,a lightweight model based on YOLOv5 was designed,using MobileNetV3 lightweight network to optimize the original network structure and reduce model parameters.The reduction of parameters may lead to a decrease in model accuracy.To improve the feature extraction ability of the model,a CA attention mechanism is added at the end of the feature fusion network,and the original CIOU Loss function is replaced with an EIOU Loss function in the Head layer.In terms of tracking algorithms,the SORT algorithm introduces the Mahalanobis distance formula and the minimum cosine formula to achieve consistency in the front and back ID information of the SORT model when encountering occlusion.The results showed that the average accuracy(mAP50)of YOLOv5 after optimization was 89.3%.Compared with before optimization,the average accuracy of the model decreased by 2.7%,while the number of model parameters decreased by 49.4%,significantly reducing model complexity.The optimized SORT algorithm can successfully complete target re detection and achieve consistent tracking IDs when encountering occlusion.