Traffic congestion is a significant issue with studies indicating it costs cities billions annually and averages 54 hours of wasted time per traveler each year. This situation necessitates the implementation of efficient traffic management systems, especially at intersections. In response to this challenge, our work introduces an artificial intelligence-based system designed to analyze and predict traffic flow using machine learning algorithms and deep learning methods in conjunction with traffic cameras. The model comprises two main components: real-time data collection and predictive modeling. It employs object detection to identify and classify vehicles and adjusts traffic signal timings based on the necessary passage time and predetermined constraints. Additionally, data accumulated during operation facilitates the development of a predictive model for traffic flow over time, allowing for proactive traffic management. Evaluations are done to showcase the accuracy of the model and corresponding simulation and physical implementation further approved the applicability of our approach. Finally, this work aims to enhance urban transportation efficiently, reduce commuting stress, and improve the quality of life for city residents