Abstract:
In vehicle accident detection, the imbalance between the small number of accident vehicles and the large number of normal vehicles can lead to difficulties in accurately identifying accident vehicles, increasing the risk of misclassifying them as normal vehicles. Therefore, a vehicle accident detection algorithm based on SMOTE-LSTM is proposed. To address the data imbalance between accident and normal samples, the synthetic minority over-sampling technique (SMOTE) is employed to randomly insert samples between accident data points, increasing their quantity and achieving data balance between the two categories. Furthermore, when oversampling accident data, the optimal number of neighbors is selected by comparing the detection accuracy under different neighbor counts to improve the recognition rate of accident samples while minimizing noise interference. On this basis, long short-term memory (LSTM) networks are employed to accurately capture the temporal features of data when vehicle accidents occur. Additionally, a Dropout layer is introduced to reduce overfitting and enhance the model's generalization ability, ensuring accurate accident detection. To minimize the misclassification of accident vehicles as normal, class weights are incorporated into the loss function, adjusting the weights to make the model more focused on accident sample detection. Finally, six groups of comparative experiments were conducted on a collected vehicle driving state time-series dataset. The first three groups did not use the SMOTE-LSTM-based algorithm, performing vehicle accident detection under balanced, mildly imbalanced, and moderately imbalanced conditions by increasing the number of normal samples. The latter three groups employ the SMOTE-LSTM-based algorithm to address mild, moderate, and severely imbalanced conditions. Experimental results show that, with the proposed method, the values of Precision, Recall, F1-score, G-mean, and AUC are significantly improved. Specifically, under mildly class imbalance, these five evaluation metrics increase by 56.2%, 2.5%, 38.7%, 5.8%, and 5.4%, respectively. Under moderate class imbalance, the improvements are 75%, 14.1%, 59%, 8.2%, and 7.8%. The results demonstrate that the proposed algorithm effectively addresses the class imbalance issue in vehicle accident detection, significantly enhancing all evaluation metrics. Particularly in mildly and moderately imbalanced scenarios, the algorithm effectively enhances the recognition ability of the minority class, exhibiting strong robustness and better classification performance.