The automatic detection of traffic accidents is a significant topic in traffic monitoring systems. It can reduce irresponsible driving behavior, improve emergency response, improve traffic management, and encourage safer driving practices. Computer vision can be a promising technique for automatic accident detection because it provides a reliable, automated, and speedy accident detection system that can improve emergency response times and ultimately save lives. This paper proposed an ensemble model that uses the YOLOv8 approach for efficient and precise event detection. The model framework's robustness is evaluated using YouTube video sequences with various lighting circumstances. The proposed model has been trained using the open-source dataset Crash Car Detection Dataset, and its produced precision, recall, and mAP are 93.8% and 98%, 96.1%, respectively, which is a significant improvement above the prior precision, recall, and mAP figures of 91.3%, 87.6%, and 93.8%. The effectiveness of the proposed approach in real-time traffic surveillance applications is proved by experimental results using actual traffic video data.