School of Computer Science, University of Nottingham, Nottingham NG7 2RD, UK.
Sensors (Basel). 2023 Jan 10;23(2):798. doi: 10.3390/s23020798.
There is great interest in automatically detecting road weather and understanding its impacts on the overall safety of the transport network. This can, for example, support road condition-based maintenance or even serve as detection systems that assist safe driving during adverse climate conditions. In computer vision, previous work has demonstrated the effectiveness of deep learning in predicting weather conditions from outdoor images. However, training deep learning models to accurately predict weather conditions using real-world road-facing images is difficult due to: (1) the simultaneous occurrence of multiple weather conditions; (2) imbalanced occurrence of weather conditions throughout the year; and (3) road idiosyncrasies, such as road layouts, illumination, and road objects, etc. In this paper, we explore the use of a focal loss function to force the learning process to focus on weather instances that are hard to learn with the objective of helping address data imbalances. In addition, we explore the attention mechanism for pixel-based dynamic weight adjustment to handle road idiosyncrasies using state-of-the-art vision transformer models. Experiments with a novel multi-label road weather dataset show that focal loss significantly increases the accuracy of computer vision approaches for imbalanced weather conditions. Furthermore, vision transformers outperform current state-of-the-art convolutional neural networks in predicting weather conditions with a validation accuracy of 92% and an F1-score of 81.22%, which is impressive considering the imbalanced nature of the dataset.
人们对自动检测道路天气并了解其对交通网络整体安全的影响非常感兴趣。例如,这可以支持基于路况的维护,甚至可以作为在恶劣气候条件下协助安全驾驶的检测系统。在计算机视觉领域,之前的工作已经证明了深度学习在从户外图像预测天气条件方面的有效性。然而,由于以下原因,使用真实的道路图像训练深度学习模型来准确预测天气条件具有挑战性:(1)多种天气条件同时发生;(2)天气条件在全年的分布不平衡;(3)道路特征,如道路布局、照明和道路物体等。在本文中,我们探索使用焦点损失函数来迫使学习过程关注那些难以学习的天气实例,以帮助解决数据不平衡问题。此外,我们还探索了基于像素的动态权重调整的注意力机制,以使用最先进的视觉转换器模型处理道路特征。使用新的多标签道路天气数据集进行的实验表明,焦点损失显著提高了计算机视觉方法对不平衡天气条件的准确性。此外,视觉转换器在预测天气条件方面的表现优于当前最先进的卷积神经网络,验证准确率为 92%,F1 得分为 81.22%,考虑到数据集的不平衡性质,这一结果令人印象深刻。