Traffic around the world has become a major problem and with a sharp increase in the number of vehicles, there is a dire need for systems that can adapt towards the changes in traffic. The inability of current systems to deal with this increased traffic leads to inefficient traffic management. The current static traffic systems do not account for the present congestion and current scenario of traffic.The paper proposes a dynamic traffic system that takes in present traffic footage and calculates the percentage congestion and based on this, allocates the timer to each signal. The system makes use of the Image Processing techniques like background subtraction, edge detection in order to process the video. The system also consists of a prediction mechanism based on clustering, which is capable of predicting the congestion based on previous observable patterns. The image processing algorithm along with the prediction mechanism, process each frame into a value, the congestion percentage. The system is implemented on Raspberry Pi 0 W's and makes use of the OpenCV library for image processing.