# Innovative Approaches to Traffic Anomaly Detection and Classification Using AI
## 2 Algorithms and Methods
### Convolutional Neural Networks (CNNs)  
Convolutional neural networks (CNNs) have been widely adopted for detecting traffic anomalies in surveillance videos. These models effectively analyze video sequences, learning normal traffic patterns and identifying deviations that signal unusual events. CNN-based systems, utilizing both supervised and unsupervised machine learning techniques, can detect a variety of anomalies, such as traffic accidents, congestion, and driver behavior. Their implementation has shown promising results in enhancing road safety and enabling smarter traffic management. [PERSON] et al. proposed a novel approach for anomaly detection in real-world surveillance videos, addressing the challenge of identifying anomalies without prior knowledge of specific events [17]. The work highlighted the limitations of existing methods,  
Figure 5: Anomalous frames identified and anomalous words localized by the algorithm. Currently, in the implementation, the anomalous event is highlight in test documents as shown above. From [16]. which treat any deviation from normal patterns as anomalies, often leading to ambiguity due to contextual variability. As shown in Figure 6, the proposed system uses weakly labeled videos--only as normal or anomalous--within a multiple instance learning (MIL) framework. Video segments are treated as \"instances\" within a \"bag\", enabling the algorithm to assign high anomaly scores to specific frames in anomalous videos. During testing, video segments are processed through a neural network, which calculates anomaly scores to detect unusual events. To evaluate their method, the authors introduced a large-scale anomaly detection dataset containing 1900 real-world surveillance videos spanning 128 h. This dataset, with 13 types of anomalies such as traffic accidents, thefts, and vandalism, is Backtracking anomaly detection module: Computes a similarity statistic (SSim) between the current frame and previous frames to detect anomalies such as stopped vehicles. In contrast to the dataset-centric approach highlighted earlier, this system was evaluated using the NVIDIA AI CITY Challenge test suite [19], achieving an F1 score of 0.5926 and an RMSE of 8.2386. The model processes frames at an average speed of 19 ms each, demonstrating its suitability for real-time applications. Alternatively, the work presented in [20] explores the application of video surveillance systems to detect traffic anomalies in smart cities. Unlike prior approaches that focus on real-time processing, this work highlights the long-term benefits of integrating video data into traffic management strategies, particularly in urban settings such as Kazan, Russia. This work targeted two specific traffic anomalies: illegal trajectories by vehicles or pedestrians and traffic congestion. To detect anomalies in trajectories, an unsupervised learning approach is employed, involving the extraction of object trajectories, the modeling of legitimate paths, and the identification of deviations as anomalies. For congestion detection, the authors propose four methods that compare real-time data--such as vehicle speed, travel time, and density--with historical records. Object detection and tracking are critical to both tasks, with CNNs like R-CNN [21], SSD [22], and YOLO used for detection, and algorithms such as boosting [23], multiple instance learning (MIL) [24], kernelized correlation filter (KCF) [25], and minimum output sum of squared error (MOSSE) [26] employed for tracking. YOLO proved to be the most effective for detection, offering high speed and accuracy, while KCF and MOSSE excelled in tracking anomalies in low-quality video scenarios. The proposed system was tested on datasets from intersections for trajectory anomaly detection and road cameras for congestion assessment. The results showed that the system accurately detected illegal trajectories and congestion, demonstrating practical applications in urban traffic management.