Waterlogging intelligent identification method suitable for urban low-light environment and related equipment
By employing illumination normalization, multi-level feature extraction, content-style decoupling, and a hollow spatial pyramid module to process low-light images, the problem of difficult urban nighttime flood identification was solved, achieving highly accurate and adaptive flood identification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-12
- Publication Date
- 2026-03-27
AI Technical Summary
Existing technologies struggle to identify urban flooding at night or in dimly lit conditions, resulting in a significant drop in image quality and consequently, a decline in recognition performance, which limits their practical application value.
A low-light image is processed using an illumination normalization module. Through multi-level progressive feature extraction, content-style decoupling, convolutional block attention, and a hole spatial pyramid module, combined with a decoder for progressive upsampling, binary classification of water and non-water areas is achieved.
It significantly improves the recognition accuracy and adaptability in complex and dynamic lighting environments, solves the performance bottleneck of existing technologies in low-light scenarios, and enhances the accuracy and practical application value of waterlogging identification.
Smart Images

Figure CN121746915A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and in particular to an intelligent method and related equipment for identifying urban flooding in low-light environments. Background Technology
[0002] With the frequent occurrence of extreme weather events, urban flooding has caused enormous losses to social operations and people's lives and property. Identifying urban waterlogging and flooding conditions based on street surveillance videos, drone images, and crowdsourced images is currently the most effective, commonly used, and timely means of assessing urban flooding disasters.
[0003] Existing research and mature software can effectively extract water bodies from images. These methods and models achieve satisfactory results in terms of both accuracy and efficiency. However, most studies overlook a crucial fact: urban flooding events mostly occur at night or in dimly lit conditions. This environment leads to a significant deterioration in image quality, and classical methods struggle to maintain good performance in such scenarios, greatly limiting their practical application value.
[0004] At night or during heavy rainfall, urban street environments become extremely complex, with highly variable lighting conditions significantly increasing the difficulty of image recognition. First, uniform natural daylight is rare, often resulting in images that are generally dim. Second, artificial light sources (such as streetlights, vehicle headlights, and building lighting) vary in intensity, location, and angle, and may change dynamically. This causes dramatic fluctuations in water surface reflections, leading to vastly different lighting conditions at different times and locations, posing a significant challenge to the learning process of artificial intelligence. Summary of the Invention
[0005] The main objective of this invention is to provide a method, device, electronic device, storage medium, and program product for intelligent identification of urban flooding in low-light environments, aiming to solve at least one problem of the prior art.
[0006] To achieve the above objectives, one aspect of this invention proposes an intelligent method for identifying urban flooding in low-light environments, the method comprising: Acquire low-light images of a preset urban area, and use an illumination normalization module to perform illumination normalization processing on the low-light images to obtain a normalized output image; Based on the normalized output image, the feature extraction module extracts multiple layers of features through multi-level progressive downsampling operations to obtain an intermediate feature map; The intermediate feature map is decomposed into content features and style features using a content-style decoupling module. Then, the style features are removed from the content features by minimizing the orthogonal loss function to obtain decoupled content features. The decoupled content features are enhanced by using a convolutional block attention module to obtain enhanced content features. Based on enhanced content features, the hollow spatial pyramid module is used to capture multi-scale contextual information through parallel convolution to obtain target features; Based on the target features, the decoder is used to perform progressive upsampling to output a segmentation mask, and binary classification of water areas and non-water areas is completed to obtain the waterlogging identification results of the preset urban area.
[0007] In some embodiments, performing illumination normalization processing on a low-light image to obtain a normalized output image includes the following steps: The low-light image is normalized to zero mean and unit variance to obtain the parameterized normalization result. Based on low-light images, a pre-defined lightweight illumination estimation network is used to estimate and adjust illumination, resulting in a spatially adaptive illumination attention map. The lightweight illumination estimation network consists of a first convolutional layer, a ReLU activation function, a second convolutional layer, and a Sigmoid activation function connected in sequence. The parameterized normalization result is multiplied element-wise with the spatial adaptive illumination attention map to obtain the normalized output image.
[0008] In some embodiments, the intermediate feature map is decomposed into content features and style features, and then the style features are removed from the content features by minimizing the orthogonal loss function to obtain decoupled content features, including the following steps: The intermediate feature map is subjected to feature compression and activation processing to obtain a preliminary content mapping; Based on the initial content mapping, the spatial attention module constructs the dependencies between spatial locations using average pooling, max pooling, concatenation, convolution, and the Sigmoid function, generating an attention map with enhanced morphological structure. Element-wise multiplication is performed on the initial content mapping and the attention map with enhanced morphological structure to obtain content features; Based on the intermediate feature map, a style encoder is used to perform a nonlinear transformation to obtain global information; Global information is aggregated through global average pooling to generate the first-style encoding vector; Global information is aggregated through global standard deviation pooling to generate a second-style encoding vector; Style features are obtained by concatenating the first style encoding vector and the second style encoding vector; Flatten the content features into a first feature matrix, and copy and expand the style features into a second feature matrix; An orthogonal loss function is constructed based on the Frobenius inner product of the first and second feature matrices. The decoupled content features are obtained by minimizing the orthogonal loss function.
[0009] In some embodiments, feature enhancement is performed on the decoupled content features to obtain enhanced content features, including the following steps: Based on the decoupled content features, a one-dimensional channel attention map is obtained through channel attention module processing; Element-wise multiplication of the decoupled content features with the one-dimensional channel attention map yields preliminary enhanced features; Based on the initial enhanced features, a two-dimensional spatial attention map is obtained through processing by the spatial attention module; The enhanced content features are obtained by performing element-wise multiplication of the preliminary enhanced features with the two-dimensional spatial attention map.
[0010] In some embodiments, based on enhanced content features, the target features are obtained by capturing multi-scale contextual information through parallel convolution using a dilated spatial pyramid module, including the following steps: Based on dilated convolution, a predetermined number of zero values are inserted between the continuous weights of the convolution kernel to expand the size of the convolution kernel, resulting in a dilated convolution layer; wherein, the predetermined number is the dilation rate of the dilated convolution minus one. Based on enhanced content features, the dilated spatial pyramid module employs multi-parallel dilated convolutional layers with different sampling rates, which are then processed through independent branches and fused together. The final output is then used as the target feature.
[0011] In some embodiments, the decoder includes multiple transposed convolutional layers. Based on target features, the decoder performs progressive upsampling to output a segmentation mask, including the following steps: Based on the target features, the decoder performs progressive upsampling through multiple layers of transposed convolutional layers, and the segmentation mask is obtained based on the output of the top transposed convolutional layer in the decoder. The transposed convolutional layer is based on a deformable convolutional configuration. The input of each transposed convolutional layer includes the result of a skip connection between the output of the previous transposed convolutional layer and the output of the corresponding layer of the encoder. The input of the lowest transposed convolutional layer in the decoder is the target feature. The encoder includes a feature extraction module, a content-style decoupling module, and a convolutional block attention module.
[0012] In some embodiments, the method utilizes a neural network model and further includes the following steps: The original network model is configured based on the sequentially connected illumination normalization module, encoder, void space pyramid module and decoder; The encoder includes a feature extraction module, a content-style decoupling module, and a convolutional block attention module. Skip connections are configured in the same hierarchical structure as the encoder and decoder. Based on a dataset of urban low-light environment images with and without water zones labeled with real binary classification, the original network model is trained for prediction. Based on the binary classification prediction results of the original network model and the true binary classification labels, a multi-objective hybrid loss function is constructed. The parameters of the original network model are adjusted using the hybrid loss function to obtain a neural network model.
[0013] To achieve the above objectives, another aspect of the present invention proposes an intelligent waterlogging identification device suitable for urban low-light environments, the device comprising: The first module is used to acquire low-light images of a preset urban area, and to perform illumination normalization processing on the low-light images using an illumination normalization module to obtain a normalized output image. The second module is used to extract multi-layer features based on the normalized output image by using the feature extraction module through multi-level progressive downsampling operations to obtain an intermediate feature map; The third module is used to decompose the intermediate feature map into content features and style features using the content-style decoupling module, and then remove the style features from the content features by minimizing the orthogonal loss function to obtain the decoupled content features; The fourth module is used to enhance the decoupled content features using the convolutional block attention module, resulting in enhanced content features. The fifth module is used to capture multi-scale contextual information through parallel convolution based on enhanced content features, utilizing the dilated spatial pyramid module to obtain target features; The sixth module is used to perform progressive upsampling output segmentation mask based on target features using a decoder, and complete the binary classification of water areas and non-water areas to obtain the waterlogging identification results of the preset urban area.
[0014] In some embodiments, the apparatus further includes a seventh module for performing the following operations: The original network model is configured based on the sequentially connected illumination normalization module, encoder, void space pyramid module and decoder; The encoder includes a feature extraction module, a content-style decoupling module, and a convolutional block attention module. Skip connections are configured in the same hierarchical structure as the encoder and decoder. Based on a dataset of urban low-light environment images with and without water zones labeled with real binary classification, the original network model is trained for prediction. Based on the binary classification prediction results of the original network model and the true binary classification labels, a multi-objective hybrid loss function is constructed. The parameters of the original network model are adjusted using the hybrid loss function to obtain a neural network model.
[0015] To achieve the above objectives, another aspect of the present invention provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the aforementioned method.
[0016] To achieve the above objectives, another aspect of the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the aforementioned method.
[0017] To achieve the above objectives, another aspect of the present invention provides a computer program product, including a computer program that, when executed by a processor, implements the aforementioned method.
[0018] The embodiments of the present invention include at least the following beneficial effects: The present invention provides a method, device, electronic device, storage medium, and program product for intelligent identification of urban flooding in low-light environments. This scheme acquires low-light images of a preset urban area, performs illumination normalization processing on the low-light images using an illumination normalization module, and obtains a normalized output image. Based on the normalized output image, a feature extraction module extracts multiple layers of features through multi-level progressive downsampling operations to obtain an intermediate feature map. A content-style decoupling module decomposes the intermediate feature map into content features and style features, and then removes the style features from the content features by minimizing an orthogonal loss function to obtain decoupled content features. A convolutional block attention module enhances the decoupled content features to obtain enhanced content features. Based on the enhanced content features, a dilated spatial pyramid module captures multi-scale contextual information through parallel convolution to obtain target features. Based on the target features, a decoder performs progressive upsampling to output a segmentation mask, completing binary classification of water areas and non-water areas to obtain the flooding identification result for the preset urban area. This invention first improves the quality of low-light images through illumination normalization, providing a stable foundation for subsequent recognition. Then, by utilizing a content-style decoupling module, style features affected by illumination and reflection are separated and removed from the essential content features of the water body, significantly enhancing the model's robustness in complex, dynamic lighting environments. Furthermore, a convolutional block attention mechanism enhances the model's ability to perceive key water features and contexts at different scales. Finally, by capturing multi-scale contextual information through parallel convolution and performing progressive upsampling, the invention effectively addresses the bottleneck of significant performance degradation in low-light scenarios such as urban nighttime and heavy rainfall, greatly improving the accuracy, adaptability, and practical application value of urban flooding recognition. Attached Figure Description
[0019] Figure 1 This is a schematic diagram of an implementation environment for an intelligent waterlogging identification method suitable for urban low-light environments provided in an embodiment of the present invention; Figure 2 This is a flowchart illustrating an intelligent waterlogging identification method suitable for urban low-light environments provided by an embodiment of the present invention. Figure 3 This is a schematic diagram of ResNet-50 provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the architecture principle of intelligent waterlogging identification in urban low-light environments provided by an embodiment of the present invention; Figure 5 This is a schematic diagram of the structural principle of the hollow space pyramid provided in an embodiment of the present invention; Figure 6 This is a schematic diagram illustrating the architecture principle of the encoder and decoder provided in an embodiment of the present invention. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of this invention; they are merely examples of apparatuses and methods consistent with some aspects of the embodiments of this invention as detailed in the appended claims.
[0021] It is understood that the terms “first,” “second,” etc., used in this invention may be used herein to describe various concepts, but unless specifically stated otherwise, these concepts are not limited by these terms. These terms are used only to distinguish one concept from another. For example, first information may also be referred to as second information without departing from the scope of embodiments of the invention, and similarly, second information may also be referred to as first information. Depending on the context, the words “if,” “when,” or “in response to determination” as used herein may be interpreted as “when…” or “when…” or “in response to determination.”
[0022] The terms “at least one,” “multiple,” “each,” “any,” etc., used in this invention, “at least one” includes one, two, or more than two; “multiple” includes two or more than two; “each” refers to each of the corresponding multiple; and “any” refers to any one of the multiple.
[0023] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein is for the purpose of describing embodiments of the invention only and is not intended to limit the invention.
[0024] Existing research and mature software can effectively extract water bodies from images. These methods and models achieve satisfactory results in terms of both accuracy and efficiency. However, most studies overlook a crucial fact: urban flooding events mostly occur at night or in dimly lit conditions. This environment leads to a significant deterioration in image quality, and classical methods struggle to maintain good performance in such scenarios, greatly limiting their practical application value.
[0025] In view of this, this invention provides a method and related equipment for intelligent identification of urban flooding in low-light environments. The method involves acquiring low-light images of a preset urban area, normalizing these images using an illumination normalization module to obtain a normalized output image, extracting multiple layers of features using a feature extraction module through multi-level progressive downsampling to obtain an intermediate feature map, decomposing the intermediate feature map into content features and style features using a content-style decoupling module, and then removing style features from the content features by minimizing an orthogonal loss function to obtain decoupled content features, enhancing the decoupled content features using a convolutional block attention module to obtain enhanced content features, capturing multi-scale contextual information using a dilated spatial pyramid module through parallel convolution to obtain target features, and performing progressive upsampling of a decoder to output a segmentation mask to complete binary classification of water and non-water areas, thus obtaining the flooding identification result for the preset urban area. This invention first improves the quality of low-light images through illumination normalization, providing a stable foundation for subsequent recognition. Then, by utilizing a content-style decoupling module, style features affected by illumination and reflection are separated and removed from the essential content features of the water body, significantly enhancing the model's robustness in complex, dynamic lighting environments. Furthermore, a convolutional block attention mechanism enhances the model's ability to perceive key water features and contexts at different scales. Finally, by capturing multi-scale contextual information through parallel convolution and performing progressive upsampling, the invention effectively addresses the bottleneck of significant performance degradation in low-light scenarios such as urban nighttime and heavy rainfall, greatly improving the accuracy, adaptability, and practical application value of urban flooding recognition.
[0026] It is understood that the intelligent waterlogging identification method for urban low-light environments provided by this invention can be applied to any computer device with data processing and computing capabilities, and this computer device can be various terminals or servers. When the computer device in the embodiment is a server, the server is an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. Optionally, the terminal can be a smartphone, tablet, laptop, or desktop computer, but it is not limited to these.
[0027] like Figure 1 The diagram shown is a schematic representation of an implementation environment provided by an embodiment of the present invention. (Refer to...) Figure 1 The implementation environment includes at least one terminal 102 and a server 101. The terminal 102 and the server 101 can be connected via a network, either wirelessly or via a wired connection, to complete data transmission and exchange.
[0028] Server 101 can be a standalone physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.
[0029] Additionally, server 101 can also be a node server in a blockchain network. Blockchain is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms.
[0030] Terminal 102 can be a smartphone, tablet computer, laptop computer, desktop computer, smart speaker, smartwatch, etc., but is not limited to these. Terminal 102 and server 101 can be directly or indirectly connected via wired or wireless communication, and this embodiment of the invention does not impose any limitations.
[0031] For example, based on Figure 1The implementation environment shown in this embodiment of the invention provides a smart waterlogging identification method suitable for urban low-light environments. The following description uses the application of this smart waterlogging identification method suitable for urban low-light environments in server 101 as an example. It can be understood that this smart waterlogging identification method suitable for urban low-light environments can also be applied to terminal 102.
[0032] Reference Figure 2 , Figure 2 This is an optional flowchart of an intelligent waterlogging identification method for urban low-light environments provided by an embodiment of the present invention. The executing entity of this intelligent waterlogging identification method for urban low-light environments can be any of the aforementioned computer devices (including servers or terminals). Figure 2 The method may include, but is not limited to, steps S100 to S600.
[0033] Step S100: Obtain a low-light image of a preset urban area, and use an illumination normalization module to perform illumination normalization processing on the low-light image to obtain a normalized output image. It should be noted that in some embodiments, performing illumination normalization processing on the low-light image to obtain a normalized output image may include the following steps: performing zero-mean unit variance normalization processing on the low-light image to obtain a parameterized normalization result; based on the low-light image, using a preset lightweight illumination estimation network to perform illumination estimation and adjustment to obtain a spatially adaptive illumination attention map; wherein, the lightweight illumination estimation network includes a first convolutional layer, a ReLU activation function, a second convolutional layer, and a Sigmoid activation function connected in sequence; performing element-wise multiplication of the parameterized normalization result and the spatially adaptive illumination attention map to obtain a normalized output image.
[0034] For example, in some specific implementations, in the illumination adaptive normalization module, the original input image The image is converted into a normalized output image through the combined processing of the following two sub-processes. First, in the parametric image normalization process, the original input image is... After zero-mean, unit variance normalization, the global illumination intensity bias is eliminated using the following mathematical formula: (1) (2) (3) (4) in, Indicates the channel index (for RGB images, ); It is a very small constant used to ensure the stability of square root operations; and These are learnable affine parameters, whose dimension and number of channels are... To maintain consistency, Equations 1 and 2 dynamically calculate the global mean and standard deviation based on the statistical characteristics of the input samples. Equation 3 performs zero-mean unit variance normalization. Equation 4 scales and translates the standardized features of the normalized image. These operations enable the model to adaptively adjust the numerical distribution of each channel according to the needs of downstream segmentation tasks, avoiding information loss that may result from simple normalization.
[0035] Secondly, illumination estimation and adjustment. To more accurately handle non-uniform illumination variations in the spatial domain, this module runs a lightweight illumination estimation network. This network employs a two-layer convolutional neural network structure: the first layer uses a 3×3 convolution to process the input image. from Each channel is mapped to 16 feature channels, followed by a ReLU activation function to introduce non-linearity; the next layer then uses a 3×3 convolution to map the 16 feature channels back to their original paths. Each channel is followed by a Sigmoid activation function to ultimately generate a spatially adaptive illumination attention map with a value range of [0,1]. This lighting diagram It encodes an estimate of the degree to which each pixel location in the image is affected by illumination. The larger the value, the more abundant the illumination in that area, and the smaller the value, the more insufficient the illumination or the area is in shadow.
[0036] Finally, the final output of the lighting adaptive normalization module is generated by modulation fusion from the aforementioned two sub-processes, specifically by normalizing the parameterized results. With illumination diagram Perform element-wise multiplication: (4) In this operation, for the estimated well-lit area ( The normalized features are fully preserved; and for areas with insufficient illumination (A≈0), the mechanism adaptively enhances the detail representation of dark areas.
[0037] Step S200: Based on the normalized output image, the feature extraction module extracts multiple layers of features through multi-level progressive downsampling operations to obtain an intermediate feature map; For example, in some specific implementations, for the feature extraction module, a ResNet-50 pre-trained on ImageNet can be used as the backbone feature extraction network, which can generate feature vectors of a fixed size. After the image is input into the ResNet-50 after illumination normalization, its visual attributes will be represented by the output feature vectors.
[0038] ResNet-50 is another model based on convolutional neural networks, whose structure includes 48 convolutional layers, 1 max-pooling layer, and 1 average-pooling layer. For example... Figure 3 As shown, ResNet-50 is divided into five stages: the first stage can be considered as the input preprocessing layer, and the subsequent four stages consist of bottleneck modules with similar structures. Specifically, the second stage contains three bottleneck modules, and the remaining three stages contain four, six, and three bottleneck modules, respectively. Each bottleneck module contains two different block structures: convolutional blocks and identity blocks.
[0039] The core innovation of this model lies in the use of residual units—through the identity mapping in the residual units, the input feature map can be directly passed to the output without convolutional transformation. This mechanism ensures that even as the network depth increases, the training error will not rise accordingly, and the network can autonomously learn and select gradient propagation paths. It is precisely for this reason that ResNet-50 successfully solves the gradient vanishing problem in extremely deep neural networks.
[0040] Step S300: The intermediate feature map is decomposed into content features and style features using the content-style decoupling module. Then, the style features are removed from the content features by minimizing the orthogonal loss function to obtain the decoupled content features. It should be noted that in some embodiments, step S300 may include the following steps: performing feature compression and activation processing on the intermediate feature map to obtain a preliminary content map; based on the preliminary content map, constructing the spatial location dependency relationship through the spatial attention module using average pooling, max pooling, concatenation, convolution, and the Sigmoid function to generate an attention map with enhanced morphological structure; performing element-wise multiplication on the preliminary content map and the attention map with enhanced morphological structure to obtain content features; based on the intermediate feature map, performing nonlinear transformation using a style encoder to obtain global information; aggregating the global information through global average pooling to generate a first style encoding vector; aggregating the global information through global standard deviation pooling to generate a second style encoding vector; concatenating the first style encoding vector and the second style encoding vector to obtain style features; flattening the content features into a first feature matrix and copying and expanding the style features into a second feature matrix; constructing an orthogonal loss function based on the Frobenius inner product of the first feature matrix and the second feature matrix, and obtaining decoupled content features by minimizing the orthogonal loss function.
[0041] For example, in some specific embodiments, the intermediate feature map Content features and style features are extracted separately, and then an orthogonal loss function is constructed. By minimizing this orthogonal loss, the statistical independence of content features and style features is ensured across channels, thus achieving decoupling between the two. Finally, the decoupled content feature map is input into a lightweight feature enhancement module to recover some detailed information.
[0042] The first step is content feature extraction. First, a 1×1 convolutional layer is used to perform feature compression and activation processing on the feature map, resulting in a preliminary content mapping. ,in This represents the ReLU activation function. Subsequently, the spatial attention module calculates the dependencies between spatial locations, generating an attention map that enhances morphological structure. The specific calculation process is as follows: (6) (7) (8) in, Indicates average pooling. `[;]` represents max pooling, `[;]` represents concatenation along the channel dimension, and `σ` is the sigmoid function. Finally, the output content features are obtained through multiplication of the content map and the attention map. Here This represents element-wise multiplication. This operation can effectively enhance the response of key spatial locations (such as water boundaries) while suppressing irrelevant background noise.
[0043] The second step is style feature extraction. This involves addressing the input features... A nonlinear transformation is performed using a style encoder E_style consisting of two consecutive 3×3 convolutional layers (both containing ReLU activation functions): (10) Global average pooling ( This process aggregates global information using global standard deviation pooling to generate style encoding vectors. and : (11) (12) Style features are constructed by concatenating these two vectors: (13) Finally, content-style feature decoupling is implemented. To achieve complete decoupling of the two feature spaces and eliminate redundant information, this invention introduces an orthogonal constraint loss function as a regularization term. This constraint enforces requirements on content features at the batch dimension. Arbitrary channels and style features Maintaining statistical independence across any dimension. In the spatial dimension, Flattened into a matrix At the same time Copy and expand into a matrix Orthogonal loss Defined as the Frobenius inner product of two feature matrices, i.e.: (14) in Let Frobenius norm be represented. Minimize. It will make By approximating the zero matrix, orthogonality between features is mathematically enforced, achieving complete feature separation. This loss function is jointly optimized with the main segmentation loss during training. By minimizing the orthogonal loss function and adjusting the network parameters, a clean content feature map (i.e., decoupled content features) freed from style information can be obtained.
[0044] Step S400: Use the convolutional block attention module to enhance the decoupled content features to obtain enhanced content features; It should be noted that in some embodiments, step S400 may include the following steps: based on the decoupled content features, a one-dimensional channel attention map is obtained by processing through the channel attention module; the decoupled content features and the one-dimensional channel attention map are multiplied element-wise to obtain preliminary enhanced features; based on the preliminary enhanced features, a two-dimensional spatial attention map is obtained by processing through the spatial attention module; the preliminary enhanced features and the two-dimensional spatial attention map are multiplied element-wise to obtain enhanced content features.
[0045] For example, in some specific embodiments, the present invention introduces a lightweight convolutional block attention module to further enhance feature representation capabilities. This module comprises two sequentially connected sub-modules: a channel attention module and a spatial attention module. Given an input content feature map... This module calculates a one-dimensional channel attention map. Attention map in two-dimensional space The optimized features are generated based on the following formula:
[0046]
[0047] in This represents element-wise multiplication: channel attention values are broadcast along the spatial dimension, while spatial attention values are broadcast along the channel dimension. Through the synergistic effect of channel attention and spatial attention, this module enables the network to adaptively focus on key feature channels and spatial regions related to water preparation and segmentation, while suppressing interference from irrelevant background and illumination noise, thereby effectively improving the feature representation capability.
[0048] Step S500: Based on the enhanced content features, the target features are obtained by capturing multi-scale contextual information through parallel convolution using the dilated spatial pyramid module. It should be noted that in some embodiments, step S500 may include the following steps: based on dilated convolution, inserting a preset number of zero values between the continuous weights of the convolution kernel to expand the size of the convolution kernel and obtain a dilated convolution layer; wherein, the preset number is the dilation rate of the dilated convolution minus one; based on enhanced content features, using the dilated spatial pyramid module, multi-path parallel dilated convolution layers with different sampling rates are processed through independent branches and then fused, and the final output result is used as the target feature.
[0049] For example, in some specific implementations, for the hollow space pyramid module, unlike traditional convolution operations, the dilation rate is... Dilated convolutions insert between consecutive weights in the convolution kernel. This allows for the generation of zero values, thus achieving the desired result without increasing the number of parameters or computational complexity. The effective size of the convolution kernel is expanded to Two-dimensional and three-dimensional dilated convolutions follow similar operational logic. Dilated convolutions provide an effective mechanism for controlling the receptive field, achieving an optimal balance between precise localization (small receptive field) and contextual fusion (large receptive field).
[0050] The dilated spatial pyramid pooling module employs multi-path parallel dilated convolutional layers with different sampling rates. Features extracted at each sampling rate are processed through independent branches and then fused to generate the final output.
[0051] Compared with traditional pooling layers, the hollow spatial pyramid pooling has three major advantages: (1) it generates fixed-length feature vectors; (2) it preserves spatial structure information; and (3) it can achieve accurate and efficient classification of regions of any scale by resampling single-scale convolutional features.
[0052] This invention integrates a hollow spatial pyramid pooling module into the deepest layer of the encoder. By deploying convolutional layers with different dilation rates in parallel, this module can capture multi-scale contextual information while maintaining resolution, effectively detecting water targets of different scales. This feature is crucial for handling diverse targets in urban scenes, ranging from narrow streams to large-scale flooded areas.
[0053] Step S600: Based on the target features, the decoder is used to perform progressive upsampling to output a segmentation mask, and the binary classification of water areas and non-water areas is completed to obtain the waterlogging identification result of the preset urban area. It should be noted that the decoder includes multiple transposed convolutional layers. In some embodiments, based on the target features, the decoder performs progressive upsampling to output a segmentation mask, which may include the following steps: based on the target features, the decoder performs progressive upsampling through multiple transposed convolutional layers, and the segmentation mask is obtained based on the output of the top transposed convolutional layer in the decoder; wherein, the transposed convolutional layers are obtained based on deformable convolution configuration, and the input of each transposed convolutional layer includes the result of a skip connection between the output of the previous transposed convolutional layer and the output of the corresponding layer of the encoder. The input of the bottom transposed convolutional layer in the decoder is the target features, and the encoder includes a feature extraction module, a content-style decoupling module, and a convolutional block attention module.
[0054] For example, in some specific implementations, for the decoder (progressive upsampling module), the model of the present invention takes the feature map output by the dilated spatial pyramid module as input and progressively reconstructs the feature map in a coarse-to-fine manner. At each level, the present invention uses a multi-channel transposed convolutional layer to upsample the feature map to achieve a finer level. Subsequently, deformable convolution operations are performed on the upsampled feature map to improve the accuracy of boundary segmentation. This progressive upsampling strategy can effectively alleviate the problem of detail loss that may be caused by single-step upsampling.
[0055] During progressive upsampling, the output of the deformable convolution is skipped to the feature maps of the same downsampling stage, and the final output of the upsampling at that level is obtained by element-wise summation. These local skip connections construct multiple short paths from input to output, effectively mitigating the vanishing and exploding gradient problems. Simultaneously, the skip connections effectively integrate the rich detail features (such as edges and textures) from the encoder feature decoupling stage with the corresponding decoder layer, compensating for information loss during downsampling and ensuring the complete recovery of boundary details.
[0056] To improve the quality and discriminative power of the hidden layer feature maps, this model employs a deep supervision strategy during the upsampling process. This not only optimizes the main loss function related to the output layer, but also... Simultaneously optimize the auxiliary loss function related to the hidden layer. From a mechanistic perspective, this strategy, in addition to requiring each hidden layer to learn the convolutional kernel parameters and weights, introduces an auxiliary objective to guide that layer to achieve accurate label prediction. Its mathematical expression can be stated as:
[0057] Among them, the kth balance parameter This reflects the trade-off between the output target and the corresponding auxiliary target.
[0058] It should be noted that the method in this embodiment of the invention is implemented using a neural network model. In some embodiments, the method may further include the following steps: configuring an original network model based on a sequentially connected illumination normalization module, encoder, hollow spatial pyramid module, and decoder; wherein, the encoder includes a feature extraction module, a content-style decoupling module, and a convolutional block attention module, and skip connections are configured in the same hierarchical structure in the encoder and decoder; performing prediction training on the original network model based on a dataset of urban low-light environment images labeled with real binary classification labels for water areas and non-water areas; constructing a multi-objective hybrid loss function based on the binary classification prediction results of the original network model and the real binary classification labels, and using the hybrid loss function to adjust the parameters of the original network model to obtain a neural network model.
[0059] For example, in some specific implementations, the global loss function corresponding to the hybrid loss function is defined as follows:
[0060]
[0061]
[0062]
[0063]
[0064]
[0065] in This represents the adaptive weights of the loss function for each component, where, and These represent the probability of the i-th pixel predicted by the model (after processing by the Sigmoid activation function) and the true label (0 or 1), respectively. For smoothing terms. Weighted graph. By analyzing the estimated input illumination map (Originally obtained from the illumination normalization module) It is generated through a nonlinear transformation, which assigns higher weights to low-illumination regions, thereby effectively alleviating the problem of dark area samples being overwhelmed by other samples. It is a balancing factor. This represents the focusing parameter at training step t, which is updated based on the proportion of misclassified hard samples in each batch. Specifically, the higher the proportion of misclassified hard samples, the better. The value will increase accordingly. and These represent the model prediction probability and the true label (0 or 1) for the i-th pixel, respectively. This is the boundary weight map of the pixel, and β is a hyperparameter that controls the weight decay rate.
[0066] To explain in detail the principle of the technical solution of the present invention, the overall process of the present invention will be described below with reference to some specific embodiments. It is easy to understand that the following is an explanation of the technical principle of the present invention and should not be regarded as a limitation of the present invention.
[0067] Given the relevant drawbacks of existing technologies, such as Figure 4 As shown, this invention provides a smart method for identifying urban flooding under low light conditions, comprising the following steps: S1: Illumination normalization module.
[0068] Given a low-light image, The image is converted into a normalized output image through the combined processing of the following two sub-processes. First, in the parametric image normalization process, the original input image is... After zero-mean, unit variance normalization, the global illumination intensity bias is eliminated using the following mathematical formula: (1) (2) (3) (4) in, Indicates the channel index (for RGB images, ); It is a very small constant used to ensure the stability of square root operations; and These are learnable affine parameters, whose dimension and number of channels are... To maintain consistency, Equations 1 and 2 dynamically calculate the global mean and standard deviation based on the statistical characteristics of the input samples. Equation 3 performs zero-mean unit variance normalization. Equation 4 scales and translates the standardized features of the normalized image. These operations enable the model to adaptively adjust the numerical distribution of each channel according to the needs of downstream segmentation tasks, avoiding information loss that may result from simple normalization.
[0069] Secondly, illumination estimation and adjustment. To more accurately handle non-uniform illumination variations in the spatial domain, this module runs a lightweight illumination estimation network. This network employs a two-layer convolutional neural network structure: the first layer uses a 3×3 convolution to process the input image. from Each channel is mapped to 16 feature channels, followed by a ReLU activation function to introduce non-linearity; the next layer then uses a 3×3 convolution to map the 16 feature channels back to their original paths. Each channel is followed by a Sigmoid activation function to ultimately generate a spatially adaptive illumination attention map with a value range of [0,1]. This lighting diagram It encodes an estimate of the degree to which each pixel location in the image is affected by illumination. The larger the value, the more abundant the illumination in that area, and the smaller the value, the more insufficient the illumination or the area is in shadow.
[0070] Finally, the final output of the lighting adaptive normalization module is generated by modulation fusion from the aforementioned two sub-processes, specifically by normalizing the parameterized results. With illumination diagram Perform element-wise multiplication: (4) In this operation, for the estimated well-lit area ( The normalized features are fully preserved; and for areas with insufficient illumination (A≈0), the mechanism adaptively enhances the detail representation of dark areas.
[0071] S2: Encoder.
[0072] This invention uses a ResNet-50 pre-trained on ImageNet as the backbone feature extraction network (e.g., Figure 3 As shown in the diagram, this network can generate feature vectors of a fixed size. After an image is input into the ResNet-50 after illumination normalization, its visual attributes are represented by the output feature vectors.
[0073] ResNet-50 is another model based on convolutional neural networks, whose structure includes 48 convolutional layers, 1 max-pooling layer, and 1 average-pooling layer. For example... Figure 3 As shown, ResNet-50 is divided into five stages: the first stage can be considered as the input preprocessing layer, and the subsequent four stages consist of bottleneck modules with similar structures. Specifically, the second stage contains three bottleneck modules, and the remaining three stages contain four, six, and three bottleneck modules, respectively. Each bottleneck module contains two different block structures: convolutional blocks and identity blocks.
[0074] The core innovation of this model lies in the use of residual units—through the identity mapping in the residual units, the input feature map can be directly passed to the output without convolutional transformation. This mechanism ensures that even as the network depth increases, the training error will not rise accordingly, and the network can autonomously learn and select gradient propagation paths. It is precisely for this reason that ResNet-50 successfully solves the gradient vanishing problem in extremely deep neural networks.
[0075] For intermediate feature maps Content features and style features are extracted separately, and then an orthogonal loss function is constructed. By minimizing this orthogonal loss, the statistical independence of content features and style features is ensured across channels, thus achieving decoupling between the two. Finally, the decoupled content feature map is input into a lightweight feature enhancement module to recover some detailed information.
[0076] The first step is content feature extraction. First, a 1×1 convolutional layer is used to perform feature compression and activation processing on the feature map, resulting in a preliminary content mapping. ,in This represents the ReLU activation function. Subsequently, the spatial attention module calculates the dependencies between spatial locations, generating an attention map that enhances morphological structure. The specific calculation process is as follows: (6) (7) (8) Where [;] represents the concatenation operation along the channel dimension, and σ is the Sigmoid function. Finally, the output content features are obtained through the multiplication operation between the content map and the attention map: Here This represents element-wise multiplication. This operation can effectively enhance the response of key spatial locations (such as water boundaries) while suppressing irrelevant background noise.
[0077] The second step is style feature extraction. This involves addressing the input features... A nonlinear transformation is performed using a style encoder E_style consisting of two consecutive 3×3 convolutional layers (both containing ReLU activation functions): (10) Global average pooling and global standard deviation pooling operations are used to aggregate global information and generate style encoding vectors. and : (11) (12) Style features are constructed by concatenating these two vectors: (13) Finally, content-style feature decoupling is implemented. To achieve complete decoupling of the two feature spaces and eliminate redundant information, this invention introduces an orthogonal constraint loss function as a regularization term. This constraint enforces requirements on content features at the batch dimension. Arbitrary channels and style features Maintaining statistical independence across any dimension. In the spatial dimension, Flattened into a matrix At the same time Copy and expand into a matrix Orthogonal loss Defined as the Frobenius inner product of two feature matrices, i.e.: (14) in Let Frobenius norm be represented. Minimize. It will make By approximating the zero matrix, orthogonality between features is mathematically enforced, achieving complete feature separation. This loss function is jointly optimized with the main segmentation loss during training. By minimizing the orthogonal loss function and adjusting the network parameters, a clean content feature map, free of style information, can ultimately be obtained.
[0078] This invention introduces a lightweight convolutional block attention module to further enhance feature representation capabilities. This module comprises two sequentially connected sub-modules: a channel attention module and a spatial attention module. Given an input feature map... This module calculates a one-dimensional channel attention map. Attention map in two-dimensional space The optimized features are generated based on the following formula:
[0079]
[0080] in This represents element-wise multiplication: channel attention values are broadcast along the spatial dimension, while spatial attention values are broadcast along the channel dimension. Through the synergistic effect of channel attention and spatial attention, this module enables the network to adaptively focus on key feature channels and spatial regions related to water preparation and segmentation, while suppressing interference from irrelevant background and illumination noise, thereby effectively improving the feature representation capability.
[0081] S3: Hollow Space Pyramid (Pooling).
[0082] like Figure 5 As shown, unlike traditional convolution operations, the dilation rate is... Dilated convolutions insert between consecutive weights in the convolution kernel. This allows for the generation of zero values, thus achieving the desired result without increasing the number of parameters or computational complexity. The effective size of the convolution kernel is expanded to For example, for a one-dimensional input signal and a filter of length K The output of dilated convolution Defined as: Among them, the rate parameter This corresponds to the sampling step size of the input signal in this invention. Standard convolution is a rate... A special case of dilated convolution. Two-dimensional and three-dimensional dilated convolutions follow similar operational logic. Dilated convolutions provide an effective mechanism for controlling the receptive field, achieving an optimal balance between precise localization (small receptive field) and contextual fusion (large receptive field).
[0083] The dilated spatial pyramid pooling module employs multi-path parallel dilated convolutional layers with different sampling rates. Features extracted at each sampling rate are processed through independent branches and then fused to generate the final output.
[0084] Compared with traditional pooling layers, the hollow spatial pyramid pooling has three major advantages: (1) it generates fixed-length feature vectors; (2) it preserves spatial structure information; and (3) it can achieve accurate and efficient classification of regions of any scale by resampling single-scale convolutional features.
[0085] This invention integrates a hollow spatial pyramid pooling module into the deepest layer of the encoder. By deploying convolutional layers with different dilation rates in parallel, this module can capture multi-scale contextual information while maintaining resolution, effectively detecting water targets of different scales. This feature is crucial for handling diverse targets in urban scenes, ranging from narrow streams to large-scale flooded areas.
[0086] S4: Decoder.
[0087] The model of this invention uses the feature map output by the hollow spatial pyramid module as input and reconstructs the feature map step by step in a coarse-to-fine manner. At each upsampling level, a multi-channel transposed convolutional layer is used to upsample the feature map to a finer scale, and then deformable convolution is used to improve the boundary segmentation accuracy of the upsampled feature map (e.g., ...). Figure 6 (As shown on the right). This progressive upsampling strategy can effectively mitigate the loss of detail that may result from single-step upsampling.
[0088] During progressive upsampling, the output of the deformable convolution is skip-connected to the feature maps from the downsampling stage at the same level. These connections are then element-wise summed to form the final upsampled output for that level. These local skip connections construct multiple short paths from input to output, effectively mitigating the vanishing and exploding gradient problems. Simultaneously, the skip connections fuse the rich detail features (such as edges and textures) extracted during the encoder's feature decoupling stage with the corresponding decoder layer depth, compensating for information loss during downsampling and ensuring the complete reconstruction of boundary details.
[0089] Furthermore, this invention uses 6411 images collected from various websites and offline sources to extract waterlogging data, and compares them with DUPNet, DeepLabV3+, and Unet algorithms.
[0090] Experimental Setup: The AdamW optimizer was used, which introduces weight decay correction compared to the standard Adam, helping to improve the model's generalization ability. The initial learning rate was set to 3e-5, and the weight decay coefficient was set to 1e-4. The learning rate scheduling adopted the OneCycleLR strategy, dynamically adjusting the learning rate within one cycle, first increasing it to the maximum value (maximum learning rate = initial learning rate * 5 = 1.5e-4) and then decreasing it, which effectively accelerates convergence and helps the model escape sharp local optima. The cycle length was set to the total number of training epochs, and the warm-up phase (pct_start) was set to the first 30% of the iteration steps. The maximum number of training epochs was set to 60. If the validation set IoU did not improve for 8 consecutive epochs, training was terminated early to prevent overfitting and save computational resources. To further improve training efficiency and reduce memory usage, Automatic Mixed Precision (AMP) was enabled. Precision training uses FP16 precision in forward and backward propagation and FP32 precision to maintain sovereign weights in the optimizer update phase, which greatly accelerates the training process while ensuring numerical stability.
[0091] Experimental results: The waterlogging extraction accuracy of the method proposed in this invention (evaluation indicators include IOU, F1_Score, precision, and recall) is higher than that of the other three methods, as shown in Table 1 below.
[0092] Table 1
[0093] In summary, this invention addresses the challenge of urban flooding detection under low light conditions by employing various strategies to resolve issues such as high false positive rates, unclear boundaries, and missed detection rates under low light conditions. Compared to other artificial intelligence methods, this invention can effectively improve the accuracy of flooding time-based detection.
[0094] Compared with the prior art, the present invention has at least the following beneficial effects: (1) A novel intelligent water body extraction algorithm is proposed. Based on the ResNet50 framework, it combines the CBAM attention mechanism, ASPP multi-scale feature fusion, deformable convolution and depth supervision module. It can automatically extract water bodies in low-light images and has high recognition accuracy. (2) This application proposes a multi-objective loss function, which includes enhanced Dice loss. Adaptive Focal Loss Boundary perception loss Orthogonal constraint loss of features It performs best in multiple metrics such as global recognition accuracy, boundary discrimination, intersection-over-union ratio, F1 score, and recall.
[0095] This invention also provides an intelligent waterlogging identification device suitable for urban low-light environments, which can implement the above-described method. The device may include: The first module is used to acquire low-light images of a preset urban area, and to perform illumination normalization processing on the low-light images using an illumination normalization module to obtain a normalized output image. The second module is used to extract multi-layer features based on the normalized output image by using the feature extraction module through multi-level progressive downsampling operations to obtain an intermediate feature map; The third module is used to decompose the intermediate feature map into content features and style features using the content-style decoupling module, and then remove the style features from the content features by minimizing the orthogonal loss function to obtain the decoupled content features; The fourth module is used to enhance the decoupled content features using the convolutional block attention module, resulting in enhanced content features. The fifth module is used to capture multi-scale contextual information through parallel convolution based on enhanced content features, utilizing the dilated spatial pyramid module to obtain target features; The sixth module is used to perform progressive upsampling output segmentation mask based on target features using a decoder, and complete the binary classification of water areas and non-water areas to obtain the waterlogging identification results of the preset urban area.
[0096] In some embodiments, the apparatus may further include a seventh module for performing the following operations: The original network model is configured based on the sequentially connected illumination normalization module, encoder, void space pyramid module and decoder; The encoder includes a feature extraction module, a content-style decoupling module, and a convolutional block attention module. Skip connections are configured in the same hierarchical structure as the encoder and decoder. Based on a dataset of urban low-light environment images with and without water zones labeled with real binary classification, the original network model is trained for prediction. Based on the binary classification prediction results of the original network model and the true binary classification labels, a multi-objective hybrid loss function is constructed. The parameters of the original network model are adjusted using the hybrid loss function to obtain a neural network model.
[0097] It is understood that the content of the above method embodiments is applicable to the present device embodiments. The specific functions implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0098] This invention also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the method described above. This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.
[0099] It is understood that the content of the above method embodiments is applicable to this device embodiment. The specific functions implemented by this device embodiment are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0100] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.
[0101] It is understood that the content of the above method embodiments is applicable to this storage medium embodiment. The specific functions implemented in this storage medium embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.
[0102] This invention also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.
[0103] It is understood that the content of the above method embodiments is applicable to the embodiments of this program product. The specific functions implemented by the embodiments of this program product are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0104] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0105] The present invention provides a method, device, electronic device, storage medium, and program product for intelligent identification of urban flooding in low-light environments. It acquires low-light images of a preset urban area, performs illumination normalization processing on the low-light images using an illumination normalization module to obtain a normalized output image. Based on the normalized output image, a feature extraction module extracts multiple layers of features through multi-level progressive downsampling operations to obtain an intermediate feature map. A content-style decoupling module decomposes the intermediate feature map into content features and style features, and then removes the style features from the content features by minimizing an orthogonal loss function to obtain decoupled content features. A convolutional block attention module enhances the decoupled content features to obtain enhanced content features. Based on the enhanced content features, a dilated spatial pyramid module captures multi-scale contextual information through parallel convolution to obtain target features. Based on the target features, a decoder performs progressive upsampling to output a segmentation mask, completing binary classification of water areas and non-water areas to obtain the flooding identification result for the preset urban area. This invention first improves the quality of low-light images through illumination normalization, providing a stable foundation for subsequent recognition. Then, by utilizing a content-style decoupling module, style features affected by illumination and reflection are separated and removed from the essential content features of the water body, significantly enhancing the model's robustness in complex, dynamic lighting environments. Furthermore, a convolutional block attention mechanism enhances the model's ability to perceive key water features and contexts at different scales. Finally, by capturing multi-scale contextual information through parallel convolution and performing progressive upsampling, the invention effectively addresses the bottleneck of significant performance degradation in low-light scenarios such as urban nighttime and heavy rainfall, greatly improving the accuracy, adaptability, and practical application value of urban flooding recognition.
[0106] The preferred embodiments of the present invention have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present invention. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and spirit of the present invention should be within the scope of the claims of the present invention.
Claims
1. A method for intelligent identification of urban flooding in low-light environments, characterized in that, The method includes the following steps: A low-light image of a preset urban area is obtained, and the low-light image is processed by an illumination normalization module to obtain a normalized output image. Based on the normalized output image, the feature extraction module extracts multiple layers of features through multi-level progressive downsampling operations to obtain an intermediate feature map. The intermediate feature map is decomposed into content features and style features using a content-style decoupling module. Then, the style features are removed from the content features by minimizing the orthogonal loss function to obtain decoupled content features. The decoupled content features are enhanced by using a convolutional block attention module to obtain enhanced content features. Based on the enhanced content features, the target features are obtained by using the hollow spatial pyramid module to capture multi-scale contextual information through parallel convolution. Based on the target features, a progressive upsampling output segmentation mask is used by the decoder to complete the binary classification of water areas and non-water areas, thereby obtaining the waterlogging identification result of the preset urban area.
2. The method according to claim 1, characterized in that, The step of performing illumination normalization processing on the low-light image to obtain a normalized output image includes the following steps: The low-light image is subjected to zero-mean unit variance normalization to obtain the parameterized normalization result; Based on the low-light image, a preset lightweight illumination estimation network is used to estimate and adjust the illumination to obtain a spatially adaptive illumination attention map. The lightweight illumination estimation network includes a first convolutional layer, a ReLU activation function, a second convolutional layer, and a Sigmoid activation function connected in sequence. The parameterized normalization result is multiplied element-wise with the spatial adaptive illumination attention map to obtain the normalized output image.
3. The method according to claim 1, characterized in that, The step of decomposing the intermediate feature map into content features and style features, and then removing the style features from the content features by minimizing the orthogonal loss function to obtain decoupled content features, includes the following steps: The intermediate feature map is subjected to feature compression and activation processing to obtain a preliminary content mapping; Based on the initial content mapping, the spatial attention module constructs the dependencies between spatial locations using average pooling, max pooling, concatenation, convolution, and the Sigmoid function, generating an attention map with enhanced morphological structure. The content features are obtained by performing element-wise multiplication on the preliminary content mapping and the attention map of the enhanced morphological structure. Based on the intermediate feature map, a nonlinear transformation is performed using a style encoder to obtain global information; The global information is aggregated by global average pooling to generate a first style encoding vector; The global information is aggregated by global standard deviation pooling to generate a second-style encoding vector; The style feature is obtained by concatenating the first style encoding vector and the second style encoding vector; The content features are flattened into a first feature matrix, and the style features are copied and expanded into a second feature matrix; An orthogonal loss function is constructed based on the Frobenius inner product of the first feature matrix and the second feature matrix, and the decoupled content features are obtained by minimizing the orthogonal loss function.
4. The method according to claim 1, characterized in that, The process of enhancing the decoupled content features to obtain enhanced content features includes the following steps: Based on the decoupled content features, a one-dimensional channel attention map is obtained through channel attention module processing; The decoupled content features are multiplied element-wise with the one-dimensional channel attention map to obtain preliminary enhanced features; Based on the aforementioned preliminary enhancement features, a two-dimensional spatial attention map is obtained through processing by the spatial attention module. The enhanced content features are obtained by performing element-wise multiplication on the preliminary enhanced features and the two-dimensional spatial attention map.
5. The method according to claim 1, characterized in that, The process of obtaining target features by capturing multi-scale contextual information through parallel convolution using the dilated spatial pyramid module based on the enhanced content features includes the following steps: Based on dilated convolution, a predetermined number of zero values are inserted between the consecutive weights of the convolution kernel to expand the size of the convolution kernel, thereby obtaining a dilated convolution layer; wherein, the predetermined number is the dilation rate of the dilated convolution minus one. Based on the enhanced content features, the dilated convolutional layers with different sampling rates are processed through independent branches and then fused using the dilated spatial pyramid module, and the final output is used as the target feature.
6. The method according to claim 1, characterized in that, The decoder includes multiple transposed convolutional layers. The step of progressively upsampling and outputting a segmentation mask based on the target features using the decoder includes the following steps: Based on the target features, the decoder performs progressive upsampling through multiple layers of transposed convolutional layers, and the segmentation mask is obtained based on the output of the topmost transposed convolutional layer in the decoder. The transposed convolutional layer is based on a deformable convolutional configuration. The input of each transposed convolutional layer includes the result of a skip connection between the output of the previous transposed convolutional layer and the output of the corresponding level of the encoder. The input of the bottom transposed convolutional layer in the decoder is the target feature. The encoder includes the feature extraction module, the content-style decoupling module, and the convolutional block attention module.
7. The method according to claim 1, characterized in that, The method is implemented using a neural network model and further includes the following steps: The original network model is configured based on the sequentially connected illumination normalization module, encoder, void space pyramid module and decoder; The encoder includes the feature extraction module, the content-style decoupling module, and the convolutional block attention module. The encoder and the decoder are configured with skip connections at the same hierarchical level. The original network model is trained for prediction based on a dataset of urban low-light environment images with and without water areas labeled with real binary classification labels. Based on the binary classification prediction results of the original network model and the true binary classification labels, a multi-objective hybrid loss function is constructed. The parameters of the original network model are adjusted using the hybrid loss function to obtain the neural network model.
8. A smart waterlogging identification device suitable for urban low-light environments, characterized in that, The device includes: The first module is used to acquire low-light images of a preset urban area, and to perform illumination normalization processing on the low-light images using an illumination normalization module to obtain a normalized output image. The second module is used to extract multiple layers of features based on the normalized output image by using the feature extraction module through multi-level progressive downsampling operations to obtain an intermediate feature map. The third module is used to decompose the intermediate feature map into content features and style features using the content-style decoupling module, and then remove the style features from the content features by minimizing the orthogonal loss function to obtain decoupled content features; The fourth module is used to enhance the decoupled content features using the convolutional block attention module to obtain enhanced content features; The fifth module is used to capture multi-scale contextual information through parallel convolution based on the enhanced content features to obtain target features; The sixth module is used to perform progressive upsampling and output a segmentation mask based on the target features using a decoder, and complete the binary classification of water areas and non-water areas to obtain the waterlogging identification result of the preset urban area.
9. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method according to any one of claims 1 to 7.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 7.