This repository was created by Salvatore Ventre for the thesis work related to the Artificial Vision subject at the University of Salerno.
Academic Year: 2021-2022
In order to ensure the safety of travelers, it becomes essential to know in real time the weather conditions on the road they are traveling, so as to inform travelers of any potential danger situations. This is typically done through dedicated weather stations. However, such stations are expensive and are not always able to characterize the state of the road surface. On the other hand, many of the roads are already monitored by surveillance cameras, which can be used for artificial vision applications. Therefore, in recent years there has been a growing interest in artificial intelligence algorithms that can exploit existing cameras to detect the presence of rain, snow or fog.
In this thesis a system for monitoring the weather through the video analysis will be realized, evaluating the goodness of the proposed solution and considering the actual applicability in a real context. Following the general line of work in the literature, the idea is to use a classifier, training it on a dataset of images prepared for the purpose.
Chosen model, MobileNetV2, is trained and tested on dataset based on three publicly available datasets:
- Five-Class Weathrer image dataset (IEEE Dataport);
- Road CCTV images with associated weather data;
- Weather Dataset - Kaggle.
To reduce the number of erroneous image classifications, it is performed a data augmentation (Rotation, Flip, Translation, Contrast and CutOut) that helped the work of the model and in addition gave more robustness to the trained model because they simulate conditions that may occur in the reality but are not represented in the data. To evaluate the model the chosen method is cross validation: three partition were created and each one contains different samples. Also, the prediction errors were analyzed by hard mining techniques, that show errors caused by different factors and it was used the Grad-CAM for data interpretability, highlighting with a localization map, the important regions used for predictions.
For more information, read the thesis report.