{'fraction_non_alphanumeric': 0.03702466083004745, 'fraction_numerical': 0.022388558444162265, 'mean_word_length': 4.788781431334622, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Crowdsourced-based Deep Convolutional Networks for Urban Flood Depth Mapping

Successful flood recovery and evacuation require access to reliable flood depth information. Most existing flood mapping tools do not provide real-time flood maps of inundated streets in and around residential areas. In this paper, a deep convolutional network is used to determine flood depth with high spatial resolution by analyzing crowdsourced images of submerged traffic signs. Testing the model on photos from a recent flood in the U.S. and Canada yields a mean absolute error of 6.978 in., which is on par with previous studies, thus demonstrating the applicability of this approach to low-cost, accurate, and real-time flood risk mapping.


Introduction
Flood patterns have been altered in many parts of the world due to the change in climate and the resulting change in hydrological cycles (Bowes et al., 2021;Alfieri et al 2017;Ward et al 2014;Arnell and Gosling 2016). Between 2015 and 2020, an annual average of 16.2 climate disasters were reported in the United States (Smith, 2021). In November 2021, for example, a major rainfall event spurred a series of floods in northern parts of the U.S. state of Washington and southern parts of the Canadian province of British Columbia. In British Colombia, this flood caused record-breaking insured damage of $450 million (Insurance Bureau of Canada, 2021). Moreover, at least 500 people were displaced, as estimated by the Center for Western Weather and Water Extremes (CW3E) (2021). The current practice of flood mapping involves logging the variation in flood depth at the location of preinstalled stream gauges primarily in riverine areas. However, it is equally important to identify and map flood-inundated roads in and around residential areas because disruptions in the road network can severely hamper access to shelters and the movement of goods and services during and after a flood event (Arabi et al., 2021), as well as compromise the safe evacuation of residents and motorists (Gebrehiwot et al., 2019). A significant number of flood-related deaths belong to motorists who attempt to cross inundated roads while underestimating flood depth and water velocity (Federal Emergency Management Agency, 2007;Sharif et al., 2012). Data from the U.S. state of Texas between 1959 and 2019, for example, reveals that there were 570 vehicle-related flood fatalities during this period, accounting for 58% of total flood fatalities (Han and Sharif, 2020). In Texas alone, it is estimated that 93% of flood-related fatalities occur as a result of walking or driving through flooded roads (Sharif et al., 2015). Flood risk management has gained increasing interest in recent decades due to the emergence of advanced technologies including light detection and ranging (LiDAR), synthetic-aperture radar (SAR), and satellite imagery (Mishra et al., 2022). However, the high operational cost, adverse weather conditions, and variations in surface topography limit the application of these technologies (Stone et al., 2000;Cross et al., 2020;Forati and Ghose, 2022;Kamari and Ham, 2021). In addition, most such tools and resulting data are not readily available to the public during a flood event. Current public resources for acquiring immediate flood depth information use data transmitted by stream gauges near rivers and coastal areas (Lo et al., 2015). These gauges need to be frequently calibrated and maintained. Moreover, due to their limited number, resulting flood depth data lacks spatial granularity sufficient for decision-making along local evacuation roads and in residential areas. Recent advancements in artificial intelligence (AI) and image processing have provided new opportunities for estimating flood depth from user-contributed photos. In this research, photos depicting submerged stop signs are of interest because stop signs (and in general, traffic signs) have standardized shapes, colors, and sizes, and are omnipresent in many residential neighborhoods, making them ideal measurement benchmarks. A deep learning model is utilized to detect stop signs in street photos and measure the length of the visible part of the submerged pole. Next, flood depth at the location of the stop sign is calculated by comparing the pole length before and after the flood. Using this approach, users (i.e., residents, search and rescue teams) can rapidly estimate water levels in their surroundings, and use this information to identify safe transit routes. The method is generalizable to a wide range of stop sign images regardless of the geographical region, as long as the shape, color, and dimensions of these signs are standardized by corresponding traffic authorities.

Methods of implementation
According to the Manual on Uniform and Traffic Control Devices (MUTCD) (Federal Highway Administration, 2004), regulatory stop signs in the U.S. have standardized width and height of 30 inches on single-lane roads and 36 inches on multi-lane roads and expressways. The scope of the research presented in this paper is residential areas, and therefore, stop signs with 30 inches height and width are of interest. Due to their standardized size, stop signs can be used as a benchmark for measuring flood depth if both pre-and post-flood photos of the same stop sign are available during analysis. In a nutshell, given the height of a stop sign in an image measured in pixels ( ) and in inches, a ratio of pixels to inches can be calculated, and subsequently applied to the pole length in pixels ( ) to calculate the same length in inches ( Figure 1). By subtracting the visible parts of the pole in pre-and post-flood photos, flood depth is approximated at the location of the stop sign. For visual recognition of stop signs and their poles in pre-and post-flood photos, the You-Only-Look-Once (YOLO) model is utilized which is a fast object detector that predicts bounding boxes and class probabilities in one round of image evaluation using a single neural network (Redmon et al., 2016). Compared to other object detection models, YOLO can perform in realtime, as measured by the number of frames per second (FPS), with relatively high accuracy and less computation cost. For example, RetinaNet-101-500 (Lin et al., 2017), R-FCN, SSD321 (Liu et al., 2016) The architecture of the YOLOv4 model is illustrated in Figure 2. The cross-stage-partial-connections (CSP) network along with the Darknet-53 (Wang et al., 2020) serve as the backbone of the model for extracting essential features from the input image. The neck comprises a spatial pyramid pooling network (SPP) (He et al., 2015) that runs from bottom to top, as well as a path aggregation network (PANet) (Liu et al., 2018) that runs from top to bottom. The neck enables the collection of feature maps from the last three stages of the backbone. The head of the YOLOv4 model is similar to that of the YOLOv3 model which outputs the coordinates, and the width and height of predicted bounding boxes using the feature pyramid network (FPN) (Lin et al., 2017). The input of the model is a single image with the resolution of 320 × 320 × 3 (height × width × RGB channel), while the output consists of predicted bounding boxes over two classes, namely stop sign and pole.

Model development
The model is trained on the in-house training set over 4,000 iterations using a learning rate of 0.001 with a batch size of 1 and subdivision of 64. The Adaptive Moment Estimation (Adam) method (Kingma and Ba, 2014) is used to accelerate model optimization by choosing a separate learning rate for each parameter (Ruder, 2016). As a validated algorithm for first-order gradient-based optimization of stochastic objective functions, Adam Optimizer works best for sparse input data and has low computation cost and high productivity (Sharma et al., 2019).

Model validation
Five-fold cross validation (Lyons et al., 2018;Fetanat et al., 2021) is implemented to validate the model and avoid overfitting on the training set. Using this approach, the training set is randomly split into two subsets (containing 80% and 20% of the training data, respectively) for five times. The model is then trained on the larger subset and validated on the smaller subset for five rounds, and mAP is measured as the aggregate of class-specific average precision (AP) values (Turpin and Scholer, 2006). The AP for each class is calculated using intersection over union (IoU), which computes the overlap between predicted bounding boxes and groundtruth bounding boxes (Nath and Behzadan, 2020). If IoU is above a predefined threshold (typically 50%), the detection is marked as correct; otherwise, it is marked as incorrect (Zhu et al., 2021). The optimum number of iterations is determined as the average of the optimum number of iterations (corresponding to the highest mAP) for each validation set. Five-fold cross validation yields an average IoU of 82.26%, AP of 97.37% and 96.70% over the two classes (stop sign and pole), and mAP and average iteration numbers of 97.04% and ~3,000. The model is then re-trained one last time with the optimum iteration number to ensure that it has not overfitted on the training set, and is sufficiently generalizable to the unseen test set.

Techniques to overcome challenging cases
Model training on street view images poses unique challenges that need to be addressed to improve the outcome. One such issue occurs when the model detects more than one stop sign in the input image, with one appearing closer to the viewpoint and other(s) at a farther distance, as shown in Figure 3(a). While the object detection model is robust enough to detect multiple stop signs, the problem arises since each photo bears only a single geolocation tag which, by default, is used to map the detected stop sign. In the presence of multiple detected stop signs, however, this one-to-one correspondence will no longer be valid. To remedy this problem, when multiple stop signs are detected, the largest stop sign (appearing closest to the camera viewpoint) is selected as the target output. Among detected poles, the one with the closest center of x coordinates to the center of x coordinates of the candidate stop sign is then selected as the target pole. Another challenge is reflection in water, which is a common problem in object detection. Simple solutions for reflection removal are based on the analysis of multiple input images, including pairs of images that are taken from different orientations, or with different polarizations (Sarel and Irani, 2004;Kong et al., 2013). By comparison, single-image reflection removal is more challenging. Wan et al. (2016) proposed a multi-scale depth of field (DoF) strategy to classify edge pixels and remove reflection in the image background. Fan et al.
(2017) addressed the reflection issue using a deep learning model that extracts edge information to identify low-level vision tasks, and demonstrated high quality layer separation. Specifically in the post-flood image dataset, there are several cases where the stop sign is reflected in water, as shown in Figure 3(b). To remedy this, the strategy is to not label the reflected stop sign and pole, thus forcing the model to learn from the difference between color intensity of pixels in actual and reflected objects.   Table 1) A commonly used metric for describing the discrepancy in flood depth estimation is mean absolute error (MAE) (Chaudhary et al., 2019;Cohen et al., 2019;Park et al., 2021;Alizadeh and Behzadan, 2020;Alizadeh et al., 2021). As shown in Equation (1), the MAE for pole length estimation ( ! ) can be calculated as the average of the absolute difference between detected pole length ( ′) and ground-truth pole length ( ) over photos (including pre-and post-flood photos). The model obtains ! of 3.916 in. and 6.769 in. for pole length estimation in pre-and post-flood photos of the test set, respectively. The MAE for flood depth estimation ( " ) can be calculated using Equation (2) as the average of the sum of the absolute values of the difference between ground-truth pole length ( ) and detected pole length ( ′) in pre-and post-flood photos over pairs of photos.
While MAE can be used as one descriptor of the reliability of the model, it must be noted that the main benefit of using the approach presented in this paper is the high granularity (spatial resolution) of datapoints for flood depth mapping considering the large number of stop signs mounted in various roads and streets in residential areas.

Conclusions
The scientific community agrees that climate change is leading to more severe flooding events in various parts of the world (Alfieri et al., 2017;Ward et al., 2014;Arnell and Gosling, 2016). Despite the importance of reliable flood depth data to many stages of flood mitigation (ranging from evacuation to recovery), most existing flood mapping techniques only estimate flood inundation over large areas (e.g., regional) leaving it primarily to the decision-maker to interpret and/or extrapolate results for door-to-door applications that require highly granular (i.e., street-level) flood depth data. In this paper, a deep neural network, namely YOLOv4, was adopted using the transfer learning technique on an in-house dataset of crowdsourced stop signs photos. The model was trained on pre-flood (334 photos from the Microsoft COCO dataset, and 61 webmined photos of other traffic signs with zero label) and post-flood (270 web-mined photos, 71 web-mined photos of other traffic signs with zero label, and 64 synthetic photos) photos of stop signs. To address the overfitting problem on the training set, the optimum number of iterations was obtained using 5-fold cross validation. The trained model was then used to estimate flood depth at the location of the stop sign, by comparing the visible parts of the pole length in pre-and post-flood photos. Testing the model on 11 sample photos from the 2021 Pacific Northwest flood yielded an MAE of 6.978 in. for flood depth estimation which is on par with error values reported in previous studies. Since stop signs have standardized shapes, colors, and sizes, and are mounted in many road intersections, this approach can be generalized to any geographical location with regulated and standardized stop signs to help estimate flood depth at the street level, providing that enough crowdsourced data is available. In summary, the main contributions of this research are: (1) an in-house image dataset of submerged stop signs which was used for training, validation, and testing of the deep convolutional networks; (2) the generalizability of the proposed method to other regions since traffic signs (an in particular, stop signs) are omnipresent and easily recognizable in many parts of the world; and (3) the ability to generate high spatial resolution flood maps by significantly increasing the number of datapoints where floodwater depth estimation can be calculated.