SummarySeveral autonomous traffic monitoring systems have been created as a result of the growing number of vehicles in urban areas. Traffic surveillance systems that use roadside cameras, in particular, are becoming widely used for traffic management. For an efficient traffic control and vehicle navigation system, accurate traffic flow information must be obtained based on the vehicles detected in surveillance videos. However, vehicles of various scales are difficult to spot in traffic surveillance videos due to the presence of barricades, other vehicles, and the impact of poor lighting. Also, adverse weather conditions like snow, fog, and heavy rain diminish the visual quality of the surveillance footage. This paper proposes multi‐scale dense nested deep CNN (MSDN‐DCNN) and regional search grasshopper optimization algorithm (RS‐GOA) framework to accurately detect the vehicles, estimate the traffic flow, and find the optimal path with less travel time. First, the surveillance videos are pre‐processed, which includes frame conversion, redundancy removal, and image enhancement. The pre‐processed frames are given as input to the MSDN‐DCNN for multi‐scale vehicle detection. The detected results are used for vehicle counting and estimating the traffic flow. Finally, the optimal path is chosen based on the traffic flow information by using the RS‐GOA algorithm. The performance of the proposed method is compared with the existing vehicle detection and path selection techniques. The results illustrate that the proposed Deep CNN‐RS‐GOA framework has improved performance with high detection accuracy (91.03%), high speed (53.9 fps), less running time (1,000 ms), less travel time, and faster convergence.