Abstract
Efficient anomaly detection and traffic monitoring are the advance features of Intelligent Transportation Systems (ITS) while existing techniques struggle in handling hazardous scenarios in traffic. Traditional detection methods based on bounding-box approach as discussed in earlier studies, show reduced effectiveness with variable vehicle types and complex traffic patterns deployed in heterogeneous traffic environment. This paper presents an advanced framework of computer vision for real-time traffic monitoring and anomaly detection in different traffic environments. The system utilizes YOLOv8 instance segmentation models that achieves pixel-level accuracy in vehicle detection while maintaining real-time processing capabilities. Using user-defined regions of interest (ROIs) in the paradigm of road-region focused detection eliminates background interference. The proposed framework implements pixel-level vehicle segmentation and supports simultaneous vehicle counting, traffic density analysis and substantially improves accuracy in anomaly detection by eliminating background noise. The proposed system was authenticated on urban traffic datasets across all analyzed frames (n=7) proving exceptional performance with consistent anomaly detection. The results displayed noteworthy enhancement in processing efficiency and detection accuracy in comparison to existing methodologies, including average occupancy percentages ranging from 63.31% to 71% and maximum occupancy reaching 93.74%.