Traffic congestion is becoming a serious problem with a large number of vehicles on the roads. The present traffic system is a timer-based system that operates irrespective of the amount of traffic if there exists an ambulance. So, this Deep Learning project is designed in such a way that the traffic control system is based on vehicle density in a lane and also detecting the ambulance’s lane and let that particular lane pass considering as a first priority. In fact, we use computer vision to have the characteristics of the competing traffic rows at the signals. This is done by a object detection model based on a Deep Learning model called You Only Look Once (YOLO)v8. Then traffic signal phases are optimized according to collected data, mainly queue density and waiting time per vehicle, to enable as much as more vehicles to pass safely with minimum waiting time. Keywords— Object detection, ambulance, YOLOv8, Deep learning