Urban flood ponding depth detection method based on multi-scale target detection network
Through the method based on the multi-scale object detection network, traffic cones and shared bicycles are selected as references to build a target detection network with characteristic pyramid structure and transition module, solving the problems of high cost, low efficiency and low accuracy in traditional detection methods, and achieving high-precision water accumulation depth detection.
Patent Information
- Application Number
- CN202510603197.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-12
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2045-05-12
AI Technical Summary
Traditional urban flood water accumulation detection methods have problems such as high detection cost, low efficiency and low accuracy, especially in complex scenarios, which lacks the ability to extract multi-scale target features, resulting in the inability to accurately fit the detection frame and the reference object, affecting the accuracy of the calculation of water accumulation depth.
Using a method based on a multi-scale object detection network, a target detection network including a backbone feature extraction network, a strengthened feature extraction network and a detection head is constructed by selecting traffic cones and shared bicycles as references, a target detection network is strengthened, a feature pyramid structure and transition module are introduced, a multi-scale feature extraction and fusion is realized, and a deep learning technology is used for water accumulation depth detection.
It significantly improves the accuracy and flexibility of object detection in complex scenarios, reduces detection costs, realizes pixel-level bonding between the detection frame and the reference object, and improves the accuracy and real-timeness of water accumulation depth detection.
Smart Images

Figure CN120451509A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of target detection and deep learning technology, and in particular to a method for detecting urban flood water depth based on a multi-scale target detection network. Background Art
[0002] With global warming and accelerated urbanization, urban flooding caused by extreme rainfall events is becoming increasingly frequent and detrimental. The depth of road waterlogging directly impacts traffic safety, drainage system efficiency, and the accuracy of disaster emergency response, making it a key monitoring indicator for urban safety management. In urban environments with complex infrastructure and spatial structures, the dynamic changes in water depth in flood-prone areas such as low-lying roads, bridges, culverts, and underground spaces necessitate efficient, real-time automated detection technologies. In recent years, densely deployed surveillance camera networks in urban areas have provided massive amounts of video image data, laying the foundation for the development of non-contact water depth detection technology based on computer vision. Intelligently analyzing surveillance video images to extract characteristic changes in flooded scenes and convert them into actual water depth values has become a key technical approach to addressing the challenges of urban waterlogging monitoring.
[0003] There are three main traditional methods for detecting urban flooding and waterlogging: manual field observation, fixed-point water level sensors, and visual inspection methods based on traditional image processing. However, these methods face significant technical bottlenecks and scenario limitations in practical application. Manual measurement relies on on-site observation by patrol personnel and is intuitive and low-cost. However, it is limited by high manpower input, low monitoring frequency, and high operational risks in extreme weather, making it difficult to achieve real-time, global monitoring of water depth. Contact water level sensors, while capable of providing single-point, high-precision measurement data, face challenges such as high equipment deployment costs, susceptibility to damage from water impact, and difficult maintenance. Grid coverage is particularly difficult to achieve in large urban areas or complex terrain, and they cannot capture the spatial correlation of water distribution. Early visual inspection methods based on traditional image processing attempted to achieve non-contact detection by analyzing features such as water surface reflections and edge contours. However, due to their reliance on manually designed fixed features and thresholds, detection accuracy dropped significantly in complex scenarios such as lighting changes, obstruction by debris, and water surface fluctuations. Furthermore, it was difficult to establish a quantitative relationship between the degree of waterlogging and actual water depth, severely limiting the practicality of the technology.
[0004] In recent years, advances in object detection technology have opened up new avenues for urban flood depth detection: detecting changes in flood depth by detecting and locating reference objects in images, calculating their pixel heights, and mapping pixel heights to actual physical heights. Compared to traditional image processing visual detection methods that rely on manually designed features and threshold settings, object detection technology, powered by deep learning, possesses autonomous feature learning and extraction capabilities. It can autonomously learn multi-level visual features from a large number of urban scene images without human intervention. Using a convolution-pooling-activation architecture, it fits complex functional relationships between features, enabling autonomous detection of reference objects in urban flooding scenarios. However, traditional object detection networks are limited by single-scale feature extraction and relatively simple feature fusion mechanisms. Consequently, they are unable to adequately represent multi-scale objects (reference objects with varying visual sizes due to varying distances) in complex scenes. This results in limited object detection accuracy and scale adaptability, as well as inaccurate alignment of detection boxes with reference objects, which in turn affects the accuracy of flood depth calculation. Summary of the Invention
[0005] In view of this, the purpose of the present invention is to propose a method for detecting urban flood water depth based on a multi-scale target detection network to solve the problems of high detection cost, low efficiency and low accuracy of existing methods.
[0006] To achieve the above object, the present invention adopts the following technical solutions:
[0007] A method for detecting urban flood water depth based on a multi-scale object detection network includes the following specific steps:
[0008] Step 1: Selection of urban flood water depth reference objects;
[0009] In the flood detection area, in response to the multi-dimensional detection needs, two objects (traffic cones and shared bicycles) perpendicular to the ground and relatively fixed in height are selected as reference objects for depth detection, and the actual height H of the reference objects is recorded. r Traffic cones are 70cm orange traffic cones that comply with the national standard GB / T 24725-2009. Shared bicycles are standard shared bicycles with the top of the handlebar stem as the height reference point and the vertical height of the handlebar center being 105cm.
[0010] Step 2: Construct a reference object detection network for urban flood areas;
[0011] This target detection network is composed of the backbone feature extraction network, the enhanced feature extraction network and the detection head in sequence;
[0012] Furthermore, the backbone feature extraction network consists of three shallow feature extraction modules and three deep feature extraction modules, which are used to perform preliminary feature extraction on the input image; the shallow feature extraction module consists of 3×3 convolution, batch normalization layer and SiLu activation function layer. During the shallow feature extraction process, the height and width of the feature map are continuously compressed and the number of channels are continuously expanded through layer-by-layer convolution operations, converting the shallow spatial information of the feature map into deep semantic information; the deep feature extraction module consists of a multi-branch stacking structure and SiLu activation function layer. The multi-branch stacking structure contains three branches, which perform 3×3 convolution operations on the input feature map once, three times and five times respectively, and concatenate the convolution results according to the channel dimension to obtain a feature map that integrates multi-receptive field feature information;
[0013] Furthermore, the enhanced feature extraction network takes the output feature maps of the three deep feature modules in the backbone feature extraction network as input and performs deep feature extraction on the preliminary features generated by them. To address the problems of weak multi-scale target feature extraction and poor feature fusion effect of traditional methods, a feature pyramid structure and a transition module are introduced into the enhanced feature extraction network. Multi-scale feature extraction and fusion are achieved through a series architecture consisting of the feature pyramid structure and the transition module, and three feature maps containing deeper semantic information are output: the feature pyramid structure performs pooling downsampling on the input feature map with sizes of 5×5, 9×9, and 13×13, respectively, and splices the multi-scale pooling results according to the channel dimension to expand the receptive field of the detection network. The spliced results are then subjected to 3×3 convolution and batch normalization operations, and finally spliced with the input feature map through the residual link idea to alleviate the network degradation problem; the transition module consists of two branches: pooling downsampling and convolution downsampling. The pooling downsampling consists of a 2×2 maximum pooling layer and a 3×3 convolution layer, and the convolution downsampling consists of two 3×3 convolution layers. Finally, the output feature maps of the two downsampling branches are stacked to achieve the purpose of feature fusion. The design of the feature pyramid and transition module uses multi-scale pooling to expand the receptive field, residual connections to preserve original feature information, and dual-branch downsampling to enhance feature interaction. This enables cross-layer fusion of shallow high-resolution detail features and deep semantic abstract features, constructing a hierarchical and highly robust feature representation space.
[0014] Furthermore, the detection head is composed of 3×3 convolution and 1×1 convolution, and its main function is to generate the target detection frame based on the feature map output by the feature extraction network. Specifically, the three feature maps of different scales obtained after processing by the enhanced feature extraction network will be input into three detection heads with the same structure but different parameter configurations. Each detection head first performs local feature aggregation on the input feature map through 3×3 convolution, retaining the spatial position and contextual information of the target, and then uses 1×1 convolution to adjust the feature channel to realize the conversion of image features to detection parameters. The final output includes the detection result of the target category probability and the detection frame coordinate information;
[0015] Step 3: Train the reference object detection network model;
[0016] The training process of the reference object detection model in flooded areas mainly includes four steps: model pre-training, multi-source dataset construction, model training optimization and performance testing.
[0017] Furthermore, the model pre-training steps are as follows: pre-training the backbone feature extraction network through the ImageNet large-scale general dataset, so that it can learn general visual features such as edges and textures to improve the convergence efficiency of subsequent training; further, the dataset construction steps include: collecting urban scene images including traffic cones and shared bicycles through web crawlers and field photography, constructing the dataset after data enhancement processing such as rotation, scaling, and shearing, and finally normalizing the images in the dataset and dividing them into training set, validation set and test set in a ratio of 9:1:1; further, model training During the process, CIoULoss was used as the localization loss function for the true box and the predicted box, and CrossEntrophyLoss was used as the loss function for target category prediction. The network parameters were updated using the stochastic gradient descent algorithm, with an initial learning rate of 0.01, a momentum of 0.937 to accelerate convergence, a weight decay of 0.0005, and a minimum learning rate of 0.00001 to prevent model overfitting. Furthermore, in the model testing phase, an independent test set was used to evaluate the model's performance indicators such as detection accuracy and recall rate, and the model hyperparameters were fine-tuned based on the test results.
[0018] Step 4: Obtain the reference object detection results and calculate the reference object pixel height;
[0019] The image sequences of reference objects in the same monitoring area, both in the dry state and in the water-filled state, are fed into the trained reference object detection model. The model outputs a set of detection result images containing a detection frame. The optimized model has high-precision detection capabilities and can achieve pixel-level alignment of the detection frame and the reference object edge. The pixel height of the detection frame is calculated separately: the reference object height when dry is recorded as H1, and the reference object height when water is recorded as H2;
[0020] Step 5: Quantitative calculation of water depth;
[0021] According to the data obtained in the above steps: the actual height of the reference object H r , the reference pixel height H1 under the condition of no water, the reference pixel height H2 under the condition of water, the water depth can be calculated, and the water depth D can be expressed as:
[0022]
[0023] Compared with the prior art, the present invention has the following advantages:
[0024] This system abandons traditional contact-based water level sensors and adopts video-based visual detection technology. It quantifies water depth by analyzing pixel height changes of fixed reference objects within the water. This effectively addresses the high maintenance costs, poor deployment flexibility, and low real-time monitoring efficiency of traditional detection methods, significantly reducing infrastructure investment and labor costs for urban flood monitoring.
[0025] By introducing a feature pyramid structure and transition modules into the object detection network architecture, a multi-level feature fusion mechanism is constructed to enhance object detection capabilities in complex scenarios. By fusing shallow high-resolution features with deep semantic features, the network can accurately capture the changes in the visual features of objects of different scales in flooded scenes, significantly improving the detection accuracy of objects of varying scales in complex scenes. This allows for pixel-level alignment of the detection frame with the edge of the target reference object, thereby improving the accuracy of water depth detection and providing a reliable data foundation for accurately detecting the pixel height of the reference object. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 This is a schematic diagram of the overall process of the urban flood water depth detection method based on the multi-scale target detection network provided by the present invention;
[0027] Figure 2 A schematic diagram of the reference object detection network structure in an urban flood scenario constructed by the present invention;
[0028] Figure 3 Schematic diagram of the water depth calculation process of the present invention. DETAILED DESCRIPTION
[0029] The present invention mainly realizes the detection of urban flood water depth based on multi-scale target detection. The specific implementation method adopted by the present invention will be described in detail below with reference to the accompanying drawings.
[0030] Specifically, the flow chart of the urban flood water depth detection method based on multi-scale target detection is as follows: Figure 1As shown in the figure, the method includes the following four steps: S1: Select reference objects for urban flooding water depth detection. S2: Build a reference object detection network for urban flooding areas. S3: Train a reference object detection model. S4: Obtain reference object detection results and calculate the reference object pixel height. S5: Quantitatively calculate the water depth based on the mapping relationship between the reference object pixel height change and the actual height.
[0031] For S1: Select reference objects for urban flood water depth detection;
[0032] In the task of urban flood water depth detection, the reference object is equivalent to the benchmark and scale for measuring the depth of water. Therefore, the reference object should be selected with the characteristics of fixed height, relatively fixed position, and perpendicular to the ground. It should also be an object that is relatively common in urban scenes. In view of this, the present invention selects traffic cones and shared bicycles, two objects with fixed height and common in cities, as reference objects. The actual height is recorded as H r The height configuration of the two is as follows: traffic cones are 70cm orange traffic cones that comply with the national standard GB / T24725-2009; shared bicycles are standard shared bicycles with the top of the handlebar riser as the height reference point and the vertical height of the handlebar center being 105cm.
[0033] For S2: Construct a reference object detection network model for urban flood areas;
[0034] In the present invention, the urban flood area reference object target detection network architecture is as follows Figure 2 As shown in the figure, the overall structure can be divided into three parts: the backbone feature extraction network, the enhanced feature extraction network, and the detection head. Specifically, the backbone feature extraction network consists of three shallow feature extraction modules and three deep feature extraction modules. The enhanced feature extraction network consists of three feature pyramid structures and a transition module, corresponding to the three deep feature extraction modules in the backbone feature extraction network.
[0035] Shallow feature extraction module: The image resolution input to the reference object detection network is 640×640 RGB three-channel data. As the network's input layer, the shallow feature extraction module consists of a standard processing unit consisting of a 3×3 convolution, a batch normalization layer, and a SiLu activation function layer. The three shallow modules use convolution kernel strides of 1, 2, and 2, respectively, with output channels of 32, 64, and 64. The first module maintains spatial resolution through convolution with a stride of 1 to achieve the initial feature map. The next two modules compress the image spatial size through downsampling operations with a stride of 2 (the feature map size is halved in turn), and simultaneously encode basic visual features such as edges and textures into the channel dimension, providing basic feature input for subsequent deep feature extraction.
[0036] Deep feature extraction module: The structure and parameter configuration of the three deep feature extraction modules are consistent, except that the shapes of the input and output feature maps are different. The following takes the first deep feature extraction module as an example to illustrate its structure and function: Figure 2 As shown in the lower left, this module takes as input the 160×160 resolution, 64-channel feature map output by the third shallow feature extraction module. It consists of a cascade of multi-branch stacking modules, batch normalization (BN) layers, and SiLu activation layers. The multi-branch stacking module contains three parallel convolutional branches: the first branch downsamples the input feature map to 80×80 spatial resolution through a single 3×3 convolution with a stride of 2, extracting basic geometric features such as edges and corners. The second branch integrates mid-level visual features such as texture and shape through three consecutive 3×3 convolutions with a stride of 2, outputting an 80×80 composite feature map. The third branch performs five consecutive 3×3 convolutions with a stride of 1, expanding the receptive field while maintaining the original 160×160 resolution, capturing fine-grained texture and local contextual features. The output feature maps of the three branches are size-aligned and concatenated along the channel dimension to form a multi-scale feature representation that combines details from the original resolution with semantic information from the downsampled image. Batch normalization and SiLu activation are then performed to enhance model robustness. The three deep feature extraction modules use progressively increasing convolution complexity and downsampling steps to make the output feature map sizes 80×80, 40×40, and 20×20, respectively, and the number of channels is expanded to 64, 256, and 512 respectively. This design constructs a feature processing idea of "detail preservation-middle-level abstraction-semantic enhancement" through a multi-branch parallel extraction mechanism, which not only retains the subtle contour information of the reference object but also extracts the overall structural features of the reference object. Its channel splicing operation significantly increases feature diversity, providing rich multi-dimensional features for the subsequent cross-scale fusion of the feature pyramid, and improving the detection robustness and positioning accuracy of multi-scale targets in complex urban flooding scenarios from the underlying architecture.
[0037] Feature pyramid structure: such as Figure 2 As shown in the middle, the output feature maps of the three deep feature extraction modules are input into three feature pyramid modules with exactly the same structure, with the first feature pyramid module ( Figure 2Taking the upper middle part as an example, the input feature map first undergoes a 3×3 convolution with a stride of 2 for feature enhancement, and then passes through a parallel three-branch pooling layer, performing 5×5, 9×9, and 13×13 pooling operations on the input feature map respectively to extract multi-receptive field features from the input feature map; the feature maps under different receptive fields are spliced according to the channel dimension, and then undergo 3×3 convolution and batch normalization to achieve feature fusion and standardization. Finally, the module superimposes the input feature map and the processed output feature map through residual connection, while retaining the original spatial information and enhancing the multi-scale feature expression capability: on the one hand, the cross-scale pooling operation enables a single feature position to simultaneously contain contextual information of different receptive fields, effectively solving the problem of insufficient multi-target feature extraction of traditional networks; on the other hand, the residual connection mechanism alleviates the degradation of deep networks and ensures the information integrity of multi-scale features during cross-layer fusion.
[0038] Transition Module: The transition module uses the output feature maps of the corresponding feature pyramid module as input and constructs a two-branch differential downsampling architecture to enhance multi-scale feature fusion capabilities. The pooling downsampling branch cascades a 2×2 max pooling layer and a 3×3 convolutional layer, first compressing the spatial resolution using max pooling and then extracting abstract semantic information through convolution. The convolutional downsampling branch uses two 3×3 convolutional layers in succession, gradually reducing the resolution while expanding the receptive field by stacking convolution kernels, preserving detailed features such as edges and textures. The feature maps output by the two branches are size-aligned and stacked according to the channel dimension to form a fusion feature that combines the semantic features of the pooling branch with the detailed features of the convolutional branch. This design, through a differential downsampling strategy, makes the transition module the core module for multi-scale feature fusion, effectively improving the detection accuracy and feature robustness of target reference objects of varying sizes in complex scenes, and addressing the technical problem that traditional single downsampling methods struggle to balance semantic abstraction and detail preservation.
[0039] Detection head: The three detection heads are the final layers of the entire reference object detection network, responsible for multi-scale feature integration and detection frame generation. The detection head consists of a 3×3 convolution and a 1×1 convolution with a stride of 1. The 3×3 convolution performs local feature aggregation on the input feature map, retaining the spatial position and contextual information of the target. The feature channel is then adjusted using a 1×1 convolution. The output feature map contains information about the prior frame and is divided into seven channels, which record the confidence level of the target in the prior frame, the probability that the target type in the prior frame is a traffic cone, the probability that the target type in the prior frame is a shared bicycle, the coordinates of the center point of the prior frame, and the height and width of the prior frame. The generated prior frame is processed by non-maximum suppression (NMS). By setting the intersection-over-union (IoU) threshold, the prediction frame with the highest confidence at the corresponding scale of each detection head is selected to suppress duplicate detections. The three detection heads input feature maps of different resolutions (80×80, 40×40, and 20×20) respectively to form a multi-scale detection system: the high-resolution branch focuses on the positioning of smaller and farther targets, while the medium and low-resolution branches are adapted to the positioning and recognition of medium and large targets, and finally output a prediction box containing target category, location, and scale information.
[0040] For S3: train the reference object detection model;
[0041] The core process of training the reference object detection model includes: pre-training the backbone of the model (the backbone feature extraction network) on a large-scale public dataset; collecting reference object image data in flood scenarios and performing data preprocessing and enhancement; training the model on the training set; and finally using an independent test set to evaluate the model accuracy.
[0042] Model pre-training: To address the overfitting problem that may result from the large parameter scale of the target detection network and the limited sample size of the flood scene reference dataset, the model's backbone feature extraction network is pre-trained using the public dataset ImageNet. During the training process, the model's enhanced feature extraction part and detection head are frozen, and only the parameters of the backbone network are updated. This allows it to learn cross-domain common low-level visual features such as image edges, textures, and basic geometric shapes, forming initial network parameters with general feature extraction capabilities.
[0043] Data collection: By combining web crawlers with field photography, we acquired multivariate image data covering different light intensities, water depths, and reference distances in urban scenes. To improve data diversity and model generalization capabilities, we performed multi-dimensional data enhancement on the original images, including geometric transformations such as random rotation, scaling, and center shearing, brightness and contrast adjustment, and photometric transformations such as Gaussian noise addition. At the same time, we superimposed interference factors of flood scenes such as water surface reflections and raindrop blur. The enhanced images were then manually annotated using the LabelImg tool. Minimum bounding rectangle detection frames were defined for traffic cones (based on the top tip) and shared bicycles (based on the top of the handlebar stem), converted to XML format, and the coordinate position, width, and height of the detection frames were recorded.
[0044] Model training: The labeled data was divided into training, validation, and test sets in a 9:1:1 ratio. The training set images were fed into the reference object detection model for training. During training, CIoULoss was used as the localization loss function for the ground-truth and predicted bounding boxes, and CrossEntrophyLoss was used as the loss function for object category prediction. The network parameters were updated using the SGD stochastic gradient descent algorithm, with an initial learning rate of 0.01, a momentum of 0.937 to accelerate convergence, a weight decay of 0.0005, and a minimum learning rate of 0.00001 to prevent overfitting. A freeze-thaw training strategy was used to accelerate training and reduce training resources. The training was frozen for 50 epochs, during which the parameters of the model's backbone feature extraction network were frozen and only the parameters of the enhanced feature extraction network were updated. The training was then thawed for 150 epochs, during which the parameters of the entire model network were updated.
[0045] Model accuracy evaluation: After obtaining the trained model, use independent test set data to verify the end-to-end performance of the trained model. The model is tested and evaluated by calculating indicators such as the intersection of the predicted box and the true annotated box, detection precision and recall rate, and further fine-tuning the model hyperparameters and training strategy based on the test results to achieve higher detection accuracy.
[0046] For S4: obtain the reference object detection result and calculate the reference object pixel height;
[0047] like Figure 3 As shown in the upper part, the surveillance video stream of the urban flood-prone area containing the reference object is framed, and data is collected every 60 frames to obtain image data before and during the flood. The water-free image before the flood is recorded as t0, and the water-filled image during the flood is recorded as tn; the acquired image is input into the reference object detection model to obtain the target detection results and calculate the pixel height of the reference object detection frame at each moment: H1Pixels when there is no water and H2Pixels during the flood.
[0048] For S5: Quantitatively calculate the depth of accumulated water based on the mapping relationship between the pixel height change of the reference object and the actual height;
[0049] According to the data obtained in the above steps: the actual height of the reference object H r , the reference pixel height H1 under water-free conditions and the reference pixel height H2 under water conditions are used to calculate the water depth D according to the following formula:
[0050]
[0051] The above specific embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit the same. Those skilled in the art should understand that the above embodiments do not limit the present invention in any form, and any similar technical solutions obtained by equivalent replacement or equivalent transformation are within the scope of protection of the present invention.
Claims
1. A method for detecting urban flood water depth based on a multi-scale object detection network, characterized by: The method includes the following specific steps: Step 1: Select reference objects for depth detection; In the flood detection area, in response to the multi-dimensional detection needs, traffic cones and shared bicycles are selected as reference objects for depth detection, which are perpendicular to the ground and relatively fixed in height. The actual height H of the reference objects is recorded. r ; Step 2: Build a reference object detection network; The urban flood area reference object detection network consists of a backbone feature extraction network, an enhanced feature extraction network, and a detection head. Step 3: Train the reference object detection network model; The training process of the reference object detection model in flooded areas includes four steps: model pre-training, multi-source data collection, model training optimization, and performance testing: Step 4: Obtain target detection results and calculate the pixel height of the reference object; The image sequences of reference objects in the same monitoring area in the dry and flooded states are input into the trained flood area reference object detection model. The flood area reference object detection model will output a set of detection result images containing detection frames. The improved and trained flood area reference object detection model has high-precision detection capabilities and achieves pixel-level alignment between the detection frame and the reference object edge. The pixel height of the detection frame is calculated separately: the reference object height when dry is recorded as H1, and the reference object height when flooded is recorded as H2. Step 5: Quantitative calculation of water depth; According to the data obtained in step 4: the actual height of the reference object H r , the reference pixel height H1 under the condition of no water, the reference pixel height H2 under the condition of water, and the water depth D are expressed as:
2. The method for detecting urban flood water depth based on a multi-scale target detection network according to claim 1, characterized in that: In step 2, the backbone feature extraction network is used to perform preliminary feature extraction on the input image. It consists of three shallow feature extraction modules and three deep feature extraction modules. The shallow feature extraction module consists of a 3×3 convolution, a batch normalization layer, and a SiLu activation function layer. During the shallow feature extraction process, the height and width of the feature map are continuously compressed and the number of channels is continuously expanded through layer-by-layer convolution operations, converting the shallow spatial information of the feature map into deep semantic information. The deep feature extraction module consists of a multi-branch stacking structure and a SiLu activation function layer. The multi-branch stacking structure contains three branches, which perform 3×3 convolution operations on the input feature map once, three times, and five times respectively. The convolution results are concatenated according to the channel dimension to obtain a feature map that integrates multi-scale feature information. The enhanced feature extraction network takes the output feature maps of the three deep feature modules in the backbone feature extraction network as input, realizes deeper feature extraction through the architecture composed of feature pyramid structure and transition module, and outputs three feature maps containing deeper semantic information: Among them, the feature pyramid structure performs pooling downsampling of the input feature maps with sizes of 5×5, 9×9 and 13×13 respectively, splices the multi-scale pooling results according to the channel dimension to expand the receptive field of the detection network, and performs 3×3 convolution and batch normalization operations on the splicing results, and finally splices them with the input feature map through the residual link idea to slow down the detection. Solve the problem of network degradation; the transition module consists of two branches: pooling downsampling and convolution downsampling. Pooling downsampling consists of a 2×2 maximum pooling layer and a 3×3 convolution layer, and convolution downsampling consists of two 3×3 convolution layers. Finally, the output feature maps of the two downsampling branches are stacked to achieve the purpose of feature fusion. The design of the feature pyramid and transition module expands the receptive field through multi-scale pooling, retains the original feature information through residual connections, and enhances feature interaction through dual-branch downsampling. This achieves cross-layer fusion between shallow high-resolution detail features and deep semantic abstract features, and constructs a hierarchical and highly robust feature representation space. The detection head consists of 3×3 convolution and 1×1 convolution, and generates the target detection frame based on the feature map output by the feature extraction network; the three feature maps of different scales obtained after processing by the enhanced feature extraction network will be input into three detection heads with exactly the same structure respectively; each detection head first performs local feature aggregation on the input feature map through 3×3 convolution to retain the spatial position and contextual information of the target, and then uses 1×1 convolution to adjust the feature channel to achieve dimensional conversion of the detection parameters, that is, the final output includes the detection result of the target category probability and the key information of the center coordinate of the detection frame.
3. The urban flood water depth detection method based on a multi-scale target detection network according to claim 1 is characterized by: In step 3, the backbone feature extraction network is first pre-trained using the ImageNet large-scale general dataset to enable it to learn general visual features of edges and textures to improve the convergence efficiency of subsequent training. In the data collection phase, urban scene images containing traffic cones and shared bicycle targets are collected through web crawlers and field photography, and a dataset is constructed after data enhancement processing such as rotation, scaling, and cropping. In the model training phase, the data is divided into training set, validation set, and test set in a 9:1:1 ratio. Finally, an independent test set is used to evaluate the model's detection accuracy and recall performance indicators, and the model hyperparameters are fine-tuned based on the test results.
4. The method for detecting urban flood water depth based on a multi-scale target detection network according to claim 1, characterized in that: The large-scale dataset Imagenet is used to pre-train the backbone feature extraction network of the target detection model to generate pre-trained weights with basic image representation capabilities.
5. The method for detecting urban flood water depth based on a multi-scale target detection network according to claim 1, characterized in that: In the training set preprocessing step, multi-dimensional data enhancement technology is used to enhance the image to improve the robustness of the model to the changing environment in flood scenes.
6. The method for detecting urban flood water depth based on a multi-scale target detection network according to claim 1, characterized in that: The configuration of the model training stage is as follows: CIoULoss is used as the positioning loss function for the true box and the predicted box, and CrossEntrophyLoss is used as the loss function for target category prediction; the network parameters are updated using the stochastic gradient descent algorithm, the initial learning rate is set to 0.01, the momentum is 0.937 to accelerate convergence, the weight decay is 0.0005, and the minimum learning rate is set to 0.00001 to prevent model overfitting; the training process adopts a freeze-thaw training strategy to speed up the training speed. During the freeze training, the model backbone feature extraction network parameters are frozen, and only the enhanced feature extraction network parameters are updated. During the thaw training, the entire model network parameters are updated.
7. The method for detecting urban flood water depth based on a multi-scale target detection network according to claim 1, characterized in that: A feature pyramid structure is introduced to expand the model's receptive field and extract multi-scale features, enabling the model to detect targets of different scales in complex urban backgrounds. At the same time, a transition module is introduced to achieve multi-scale feature fusion, and the semantic consistency of features of different resolutions is optimized through bidirectional feature interaction, thereby improving the model's detection accuracy for multi-scale targets and achieving pixel-level fit between the detection frame and the reference object.
8. The method for detecting urban flood water depth based on a multi-scale target detection network according to claim 1, characterized in that: After obtaining the reference object target detection results, the actual height of the reference object in a normal waterless state and the corresponding original pixel height are recorded, and the pixel height changes of the same reference object during floods are extracted. By establishing a proportional relationship between the reference object pixel height change and the original pixel height, combined with the actual physical height of the reference object, the water depth is obtained by proportional conversion.
Citation Information
Patent Citations
Target detection method based on mixed feature pyramid fusion network
CN118071995A
Urban ponding depth estimation method and system based on multi-reference object system
CN118691838A
Commutator inner side image defect detection method based on fusible feature pyramid
WO2024208100A1