Hydrogeological Risk Analysis Using Computer Vision Techniques Maria Grazia Borzì1 , Ludovica Beritelli1 , Valerio Francesco Puglisi2 , Roberta Avanzato1 , Francesco Beritelli1 and Salvatore Bellino1 1 Department of Electrical, Electronic and Computer Engineering University of Catania, Catania, Italy 2 Department of Computer Science, University of Catania, Catania, Italy Abstract Flood events constitute one of the most serious natural threats, causing significant damage to the environment and endangering human life. In response to this issue, we propose an innovative system for automated video analysis of flood events and classification of criticality levels using computer vision. Our approach is based on the YOLOv8 neural architecture, known for its speed and effectiveness in detecting and classifying objects in complex scenes. The system is capable of classifying 5 levels of criticality, from level zero indicating no criticality to level 5 indicating maximum criticality, allowing rapid and accurate assessment of the situation. Experimental results were conducted by considering two real scenarios. The accuracy performance obtained on the 5 criticality classes averaged 98.02%. This study contributes to the advancement of natural disaster monitoring and prevention technologies by providing an efficient and reliable method to assess hydrogeological risk and protect communities from flooding. Keywords Hydrogeological risk, Computer vision, Image analysis, Recognition of critical flood levels 1. Introduction vegetation [21]. In the literature, computer vision applied to hydrogeo- Hydrogeological risk, combined with climate change and logical disruption has been present for several years; this rapid urbanization, poses a significant threat to the entire technology can be used as a means of support through: planet [1, 2]. While climate change is altering hydromete- orological patterns in terms of frequency and irregularity • Detecting anomalies: some computer vision-based [3, 4, 5, 6, 7, 8], rapid urbanization and inadequate urban software allows near real-time flood mapping using planning have increased land vulnerability to hydrological images captured by satellites or surveillance cam- disasters [3, 9, 10, 11, 12, 13]. Moreover, between 2000 and eras. 2012, the European Union recorded an average annual dam- • Prevention and early warning: image and data anal- age of €4.2 billion and estimated that it could increase to ysis can be used to develop forecasting models and €23.5 billion by 2050 [14, 15, 16]. early warning systems to alert authorities and local Finding a method to monitor and prevent such disasters communities to potential imminent hazards related therefore becomes essential in order to contain not only to hydrogeological disruption. human losses, but also environmental damage and economic • Emergency management: during hydrogeological losses. disruption events, computer vision can be used to Finding a method to monitor and prevent such disasters monitor the development of the situation in real therefore becomes essential in order to contain not only time, coordinate rescue operations, and assess the human losses, but also environmental damage and economic damage caused [22]. losses. In literature, various studies can be found that estimate In the study conducted in [23], a sensor system, called rainfall intensity using different types of signals, such as FloodEye, was introduced for monitoring water level during audio, image [17], and radio [18, 19, 20] signals, and artificial Catastrophic Water Floods (CWF). This system takes advan- intelligence techniques for the detection and classification tage of infrared image processing and is able to accurately of rainfall levels. monitor, without the need for preconfiguration, the water In addition to these works, further studies focus on the level rise in various situations, even at night, with a margin use of techniques based on computer vision, a field of artifi- of error of 1.9%. cial intelligence, that allows meaningful information to be The authors in [24], propose a methodology that uses gleaned from digital images and videos and actions to be validation data obtained through the use of computer vision taken or warnings to be formulated based on that informa- to predict flooding. The computer vision algorithm is used tion. High-resolution satellite images and aerial imagery are to estimate water levels from images that meet the require- critical for monitoring changing ground conditions, while ments of the proposed guidelines. The results show that computer vision techniques can be used to analyze such im- the accuracy of flood forecasting can be greatly improved ages and identify significant changes in landscape features, through the use of additional validation data. such as soil erosion, sediment accumulation, or changes in Finally, in [25], a technology was developed that can pro- vide accurate and timely estimates from flood hydrographs SYSYEM 2023: 9th Scholar’s Yearly Symposium of Technology, Engineering based on object-based image analysis (OBIA) and segmen- and Mathematics, Rome, December 3-6, 2023 tation algorithms. This technology was successfully tested $ borzi.m@studium.unict.it (M. G. Borzì); in the laboratory and in real situations during Hurricane beritelli.ludovica@gmail.com (L. Beritelli); valerio.puglisi@phd.unict.it Harvey. (V. F. Puglisi); roberta.avanzato@unict.it (R. Avanzato); The state of the art in flood monitoring and forecast- francesco.beritelli@unict.it (F. Beritelli); bellinosalvatore1@gmail.com (S. Bellino) ing includes the use of sensory systems such as FloodEye, © 2023 Copyright for this paper by its authors. Use permitted under Creative Commons License Attribu- tion 4.0 International (CC BY 4.0). computer vision and segmentation-based methodology to CEUR ceur-ws.org Workshop ISSN 1613-0073 Proceedings 34 Maria Grazia Borzì et al. CEUR Workshop Proceedings 34–39 Figure 1: Model confusion matrix containing two scenarios. improve flood forecasting, and object-based image analysis • Visibility of the surrounding environment before for accurate estimates of flood hydrographic data. the onset of flooding: this criterion ensures a clear This, study, on the other hand, proposes the development view of initial conditions, providing a solid reference a system capable of analyzing videos of flood events and point for assessing the evolution of events over time. classifying them according to different levels of criticality • Presence of landmarks: these are common objects through the use of convolutional neural networks, without such as cars, road signs, and other identifiable fea- performing pre-processing and segmentation. tures that serve as a visual scale to quantify the water This paper is structured as follows: Section 2 discusses the level during the weather phenomenon. methodology used. Then, in Section 3, the results obtained are reviewed and discussed. The choice therefore fell on two videos, which were di- vided into a series of frames, each classified with a level of criticality. The dataset used, therefore, for the training 2. Proposed method and validation phase consists of frames obtained from two different flood videos. This dataset contains 10200 frames, The paper describes a comprehensive approach for video divided into 7100 for the training set and 3300 for the test analysis of flood events by first performing a search for video set. The extracted frames were finally appropriately resized sources characterizing the event and then selecting suitable to meet the input size required by the neural network. sources for neural network training. Next, the methodol- ogy for classification of critical water levels is presented, followed by training of the YOLOv8 neural network for 2.2. Criticality Classification identification and classification of flood events according to The criticality classes were defined based on the height hazard levels. The study is conducted by considering two of the water relative to the surroundings, using reference flood scenarios. objects found within the different frames as a scaling factor. The five classes of criticality are as follows: 2.1. Data Collection • Criticality 0 (low): the water level remains within First, a vast amount of video documenting flood disasters safe limits and poses no threat to infrastructure or was collected, involving a diverse selection of sources from public safety. various corners of the globe in order to obtain a comprehen- • Criticality 1 (moderate): the water level is slightly sive overview of flood events. above the safe limit but still manageable. Although Second, a selection was made among the videos to meet road flooding may occur, there is no serious threat certain criteria necessary for proper training of the neural to public safety or property preservation. network: • Criticality 2 (medium): the water has reached a level that affects the manageability of roads and surround- • Timelapse video format: this format, characterized ing areas. by recording in regular intervals, provides a com- • Criticality 3 (high): water level reaches very high, plete and dynamic view of the evolution of the flood causing extensive flooding in roads and homes in and its impact on the surrounding environment. the affected area, thus threatening public safety. 35 Maria Grazia Borzì et al. CEUR Workshop Proceedings 34–39 Figure 2: Training and validation loss/accuracy Figure 3: Examples of images belonging to each criticality class - Scenario 1 • Criticality 4 (maximum): the water level is extremely ticularly effective neural architecture for class and bounding high, significantly endangering property and lives. box prediction, widely used for various purposes such as image classification, object detection and pose estimation. Fig. 3 and Fig. 4 show examples of images, for each The version employed in this study is YOLOv8 [26]. scenario, belonging to each criticality class. The neural network underwent a supervised training process using the training dataset described earlier, taking 2.3. Neural network training and testing special care to ensure a balanced distribution of different criticality stages among frames [27, 28]. YOLO (You Only Look Once) was chosen as the architecture for image classification and model training. YOLO is a par- 36 Maria Grazia Borzì et al. CEUR Workshop Proceedings 34–39 Figure 4: Examples of images belonging to each criticality class - Scenario 2 3. Experimental Results different and more complex situations. The neural network model trained with the set of images characterizing the two different flood scenarios demon- 5. Acknowledgement strated an excellent ability to recognize the level of crit- icality independently. In fact, the average accuracy level in This work was partially supported by the European classifying the five levels of criticality is 98.02%. Union under the Italian National Recovery and Re- In order to evaluate the performance of the model, it is silience Plan (NRRP) of NextGenerationEU, partnership on possible to visualize in Fig. 1 the confusion matrix related “Telecommunications of the Future” (PE00000001 - program to the validation dataset and in Fig. 2 the trends of loss and “RESTART”). accuracy for the training and validation phase of the model. In order to validate the proposed model, videos totally References unknown to the neural network were given in inference to the network model because they contained scenarios [1] B. Arshad, R. Ogie, J. Barthelemy, B. Pradhan, N. Ver- different from those in the training dataset. As can be seen staevel, P. Perez, Computer vision and iot-based sen- in Fig. 5 the trained network manages to classify criticality sors in flood monitoring and mapping: A systematic classes well on average even in totally unknown scenarios. review, Sensors 19 (2019) 5012. [2] M. Dilley, Natural disaster hotspots: a global risk anal- ysis, volume 5, World Bank Publications, 2005. 4. Conclusion [3] F. S. Hosseini, B. Choubin, A. Mosavi, N. Nabipour, This study focused on creating a system capable of analyz- S. Shamshirband, H. Darabi, A. T. Haghighi, Flash- ing videos of flood events and classifying them according flood hazard assessment using ensembles and to different levels of criticality using the YOLOv8 neural bayesian-based machine learning models: Application architecture. of the simulated annealing feature selection method, The use of an Artificial Intelligence model proved to be Science of the total environment 711 (2020) 135161. efficient in the assessment of hydrogeological risk, and the [4] G. Hennequin, Y. Ahmadian, D. B. Rubin, M. Lengyel, results obtained confirm the validity of the approach taken. K. D. Miller, The dynamical regime of sensory cortex: The main limitations of this study stem from the training stable dynamics around a single stimulus-tuned attrac- phase of the neural network. It was trained using images re- tor account for patterns of noise variability, Neuron lated to a few scenarios, which could affect the performance 98 (2018) 846–860. of the network in classifying criticality in other scenarios [5] C. Napoli, G. Pappalardo, E. Tramontana, A hy- not present in the training dataset. brid neuro-wavelet predictor for qos control and sta- To overcome these limitations and further improve the ac- bility 8249 LNAI (2013) 527 – 538. doi:10.1007/ curacy of the model, future research could extend the study 978-3-319-03524-6_45. by considering a wider variety of flood scenarios. Integrat- [6] J. M. Serago, R. M. Vogel, Parsimonious nonstation- ing data from different sources and incorporating additional ary flood frequency analysis, Advances in Water Re- information, such as meteorological and topographic data, sources 112 (2018) 1–16. could help create a more robust and generalizable model. [7] A. Alfarano, G. De Magistris, L. Mongelli, S. Russo, In addition, using active learning techniques could enable J. Starczewski, C. Napoli, A novel convmixer trans- the neural network to acquire knowledge from new sce- former based architecture for violent behavior de- narios, gradually improving its classification capabilities in tection 14126 LNAI (2023) 3 – 16. doi:10.1007/ 978-3-031-42508-0_1. 37 Maria Grazia Borzì et al. CEUR Workshop Proceedings 34–39 (a) (b) Figure 5: Examples of classification of frames related to scenarios unknown to the network (a) and (b). [8] I. Shkolnik, T. Pavlova, S. Efimov, S. Zhuravlev, Future [14] S. Zazo, P. Rodríguez-Gonzálvez, J.-L. Molina, changes in peak river flows across northern eurasia as D. González-Aguilera, C. A. Agudelo-Ruiz, inferred from an ensemble of regional climate projec- D. Hernández-López, Flood hazard assessment tions under the ipcc rcp8. 5 scenario, Climate dynamics supported by reduced cost aerial precision photogram- 50 (2018) 215–230. metry, Remote sensing 10 (2018) 1566. [9] V. Ponzi, S. Russo, A. Wajda, R. Brociek, C. Napoli, [15] V. Marcotrigiano, G. D. Stingi, S. Fregnan, P. Mag- Analysis pre and post covid-19 pandemic rorschach arelli, P. Pasquale, S. Russo, G. B. Orsi, M. T. Mon- test data of using em algorithms and gmm models, tagna, C. Napoli, C. Napoli, An integrated control volume 3360, 2022, pp. 55 – 63. plan in primary schools: Results of a field investi- [10] A. Ahmadalipour, H. Moradkhani, A. Castelletti, gation on nutritional and hygienic features in the N. Magliocca, Future drought risk in africa: Integrating apulia region (southern italy), Nutrients 13 (2021). vulnerability, climate change, and population growth, doi:10.3390/nu13093006. Science of the Total Environment 662 (2019) 672–686. [16] B. Jongman, S. Hochrainer-Stigler, L. Feyen, J. C. Aerts, [11] S. Russo, C. Napoli, A comprehensive solution for R. Mechler, W. W. Botzen, L. M. Bouwer, G. Pflug, psychological treatment and therapeutic path plan- R. Rojas, P. J. Ward, Increasing stress on disaster-risk ning based on knowledge base and expertise sharing, finance due to large floods, Nature Climate Change 4 volume 2472, 2019, pp. 41 – 47. (2014) 264–268. [12] L. Casagrande, J. Tomasella, R. C. dos Santos Alvalá, [17] R. Avanzato, F. Beritelli, A cnn-based differential im- M. J. Bottino, R. de Oliveira Caram, Early flood age processing approach for rainfall classification, Ad- warning in the itajaí-açu river basin using numeri- vances in Science, Technology and Engineering Sys- cal weather forecasting and hydrological modeling, tems Journal 5 (2020) 438–444. Natural hazards 88 (2017) 741–757. [18] F. Beritelli, G. Capizzi, G. Lo Sciuto, F. Scaglione, [13] G. Kubwarugira, M. Mayoussi, Y. El Khalki, Assessing D. Połap, M. Woźniak, A neural network pattern recog- flood exposure in informal districts: a case study of nition approach to automatic rainfall classification by bujumbura, burundi, Journal of Applied Water Engi- using signal strength in lte/4g networks, in: Rough neering and Research (2019). Sets: International Joint Conference, IJCRS 2017, Ol- 38 Maria Grazia Borzì et al. CEUR Workshop Proceedings 34–39 sztyn, Poland, July 3–7, 2017, Proceedings, Part II, Springer, 2017, pp. 505–512. [19] R. Avanzato, F. Beritelli, Hydrogeological risk man- agement in smart cities: A new approach to rainfall classification based on lte cell selection parameters, IEEE Access 8 (2020) 137161–137173. [20] G. Capizzi, G. L. Sciuto, C. Napoli, E. Tramontana, A multithread nested neural network architecture to model surface plasmon polaritons propagation, Mi- cromachines 7 (2016). doi:10.3390/mi7070110. [21] U. Iqbal, P. Perez, W. Li, J. Barthelemy, How computer vision can facilitate flood management: A systematic review, International Journal of Disaster Risk Reduc- tion 53 (2021) 102030. [22] G. Capizzi, G. Lo Sciuto, M. Woźniak, R. Damaševi- cius, A clustering based system for automated oil spill detection by satellite remote sensing, in: Artificial Intelligence and Soft Computing: 15th International Conference, ICAISC 2016, Zakopane, Poland, June 12- 16, 2016, Proceedings, Part II 15, Springer, 2016, pp. 613–623. [23] K. Hiroi, N. Kawaguchi, Floodeye: Real-time flash flood prediction system for urban complex water flow, in: 2016 IEEE SENSORS, IEEE, 2016, pp. 1–3. [24] P. K. Bhola, B. B. Nair, J. Leandro, S. N. Rao, M. Disse, Flood inundation forecasts using validation data gen- erated with the assistance of computer vision, Journal of Hydroinformatics 21 (2019) 240–256. [25] N. H. Jafari, X. Li, Q. Chen, C.-Y. Le, L. P. Betzer, Y. Liang, Real-time water level monitoring using live cameras and computer vision techniques, Computers & Geosciences 147 (2021) 104642. [26] G. Jocher, A. Chaurasia, J. Qiu, Ultralytics yolov8, 2023. URL: https://github.com/ultralytics/ultralytics. [27] G. Capizzi, G. L. Sciuto, C. Napoli, M. Woźniak, G. Susi, A spiking neural network-based long-term prediction system for biogas production, Neural Networks 129 (2020) 271–279. [28] F. Bonanno, G. Capizzi, G. Lo Sciuto, A neuro wavelet- based approach for short-term load forecasting in in- tegrated generation systems, in: 2013 International Conference on Clean Electrical Power (ICCEP), IEEE, 2013, pp. 772–776. 39