  Optimal management of traffic light timing is one of the most effective
factors in reducing urban traffic. In most old systems, fixed timing was used
along with human factors to control traffic, which is not very efficient in
terms of time and cost. Nowadays, methods in the field of traffic management
are based on the use of artificial intelligence. In this method, by using
real-time processing of video surveillance camera images along with
reinforcement learning, the optimal timing of traffic lights is determined and
applied according to several parameters. In the research, deep learning methods
were used in vehicle detection using the YOLOv9-C model to estimate the number
and other characteristics of vehicles such as speed. Finally, by modeling
vehicles in an urban environment simulator at OpenAI Gym using multi-factor
reinforcement learning and the DQN Rainbow algorithm, timing is applied to
traffic lights at intersections. Additionally, the use of transfer learning
along with retraining the model on images of Iranian cars has increased the
accuracy of the model. The results of the proposed method show a model that is
reasonably accurate in both parts of analyzing surveillance cameras and finding
the optimal timing, and it has been observed that it has better accuracy than
previous research.
