SwiNight: Class Imbalanced Night-Time Accident Detection with Swin Transformer
摘要
Night-time accident detection is a challenging task due to the scarcity of anomalous frames in the dataset. In this paper, we present a dataset of night-time accidents. We propose a Swin Transformer-based model for detecting accidents, specifically addressing the issue of dataset imbalance using relevant loss functions. The performance of the model is evaluated using different loss functions. Our experiments demonstrate that the focal loss function outperforms the others, achieving an F1-Score of 0.710 and an accuracy of \(79.77\%\) . Experiments also reveal that the Swin Transformer delivers superior performance compared to a Vision Transformer.