Vehicle detection is an important part of modern intelligent transportation systems. At present, complex deep learning algorithms are often used for vehicle detection and tracking, but high-precision detection results are often obtained at the cost of time, and the existing research rarely considers optimization algorithms for vehicle information. Based on this, we propose an efficient method for vehicle detection in multi-graph mode and optimization method considering multi-section tracking based on geographic similarity. In this framework, we design a vehicle extraction method based on multi-graph mode and a vehicle detection technology based on traffic flow characteristics, which can cope with the challenge of vehicle detection under an unstable environment. Further, a multi-section tracking optimization technology based on geographic similarity at a high video frame rate is proposed, which can efficiently identify lane change behavior and match, track, and optimize vehicles. Experiments are carried out on several road sections, and the model performance and optimization effect are analyzed. The experimental results show that the vehicle detection and optimization algorithm proposed in this paper has the best effect and high detection accuracy and robustness. The average results of Recall, Precision, and F1 are 0.9715, 0.979, and 0.9752, respectively, all of which are above 0.97, showing certain competitiveness in the field of vehicle detection.