Basement water seepage disease detection method based on improved BiSeNet

By improving the BiSeNet model and adaptive lighting enhancement module, combined with multi-scale feature extraction and attention mechanism, the problems of limited computing power, insufficient practicality, high equipment cost and poor adaptability in the prior art are solved, and efficient, real-time and accurate basement seepage disease detection in resource-constrained and low-light environments are achieved.

CN119832383APending Publication Date: 2025-04-15CHINA FIRST HIGHWAY ENGINEERING CO LTD +2
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411802721.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-09
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

The existing basement seepage disease detection technology faces the problems of limited computing power, insufficient practicality, high equipment costs and poor adaptability in dim light environments, which leads to the inability to achieve efficient, real-time and accurate detection under resource constraints and low-light conditions.

Method used

The improved BiSeNet model is adopted, combining adaptive lighting enhancement module, spatial path branch, context path branch and unified attention fusion module to optimize the use of computing resources and adapt to low-light environments, and improve detection efficiency and accuracy.

Benefits of technology

The detection of basement seepage diseases that operate efficiently in resource-constrained environments is realized, which improves detection accuracy and detection accuracy under dark light conditions, reduces missed and missed detection phenomena, and reduces hardware requirements and detection equipment costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119832383A_ABST
    Figure CN119832383A_ABST
Patent Text Reader

Abstract

The invention relates to a basement water seepage disease detection method based on improved BiSeNet, and belongs to the technical field of constructional engineering. The method includes: acquiring an original basement water seepage image; inputting the original basement water seepage image into the trained basement water seepage disease detection model to obtain a thermodynamic diagram for identifying a water seepage source and an actual water seepage area; wherein the basement water seepage disease detection model is constructed based on improved BiSeNet and comprises a self-adaptive illumination enhancement module, an improved BiSeNet module, a water seepage source identification module and a water seepage area calculation module; the self-adaptive illumination enhancement module is used for preprocessing the original basement water seepage image; the improved BiSeNet module is used for identifying a predicted water seepage area map in the pre-processed basement water seepage image; the water seepage source identification module is used for outputting a thermodynamic diagram which identifies a water seepage source and has the same size as the original basement water seepage image; the water seepage area calculation module is used for obtaining the actual water seepage area. And efficient and accurate basement water seepage disease detection is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of construction engineering technology, and in particular to a basement water seepage disease detection method based on an improved BiSeNet (Bilateral Segmentation Network, a deep learning network for image semantic segmentation). Background Art

[0002] With the acceleration of urbanization and the increase in the use of underground space, basement water seepage has gradually become a hidden danger to building safety. The complex structure and insufficient light make it more difficult to accurately identify the source and area of ​​water seepage. Existing basement water seepage detection mainly uses the following four methods:

[0003] (1) Manual detection: Manual detection is still an important method for basement water seepage detection. Inspectors judge the water seepage situation by visual inspection, touch, or with the help of tools such as hygrometers and infrared imagers. Although this method can provide direct detection results, it has obvious defects in efficiency, accuracy and long-term performance, and cannot meet the needs of large-scale and long-term monitoring.

[0004] (2) Physical detection technology: mainly including resistance method, acoustic wave detection method and electromagnetic wave detection method. These methods indirectly infer the water seepage area by monitoring the changes in the physical properties of the basement wall or ground. However, these methods usually require expensive special equipment and have limited effects in environments with large humidity changes or complex wall materials;

[0005] (3) Image processing technology: With the development of computer vision, image processing has gradually been applied to basement water seepage disease detection. These methods extract the features of the water seepage area by taking images of the basement environment and using image enhancement, feature extraction and pattern recognition techniques. However, image processing methods are limited by image quality and lighting conditions, especially in dim and complex lighting conditions in underground environments.

[0006] (4) Deep learning technology: In recent years, image segmentation models based on deep learning (such as U-Net, Mask R-CNN, etc.) have shown high automated detection capabilities in disease detection. However, these models are usually complex in structure and require high computing resources, which are not suitable for field detection equipment with limited resources. In addition, existing models cannot maintain high detection accuracy in low-light environments.

[0007] In the field of basement water seepage detection, existing technical methods mainly face the following shortcomings or deficiencies:

[0008] (1) Computing power limitation: Although traditional deep learning network models (such as U-Net, Mask R-CNN, etc.) perform well in image segmentation and target detection, these models are usually complex in structure, with a large number of parameters and huge computational complexity. Basement water seepage detection equipment is usually deployed on-site. These devices have limited computing resources and cannot support the real-time operation of complex deep learning models. Existing technical methods cannot efficiently detect water seepage in an environment with limited computing resources, resulting in a significant reduction in detection efficiency and practicality;

[0009] (2) Lack of practicality: In actual projects, basement water seepage problems may require rapid response and timely processing. Traditional deep learning models are difficult to meet the requirements of real-time detection due to their high computational complexity and long inference time. This means that even if the model detects accurately, it cannot provide detection results in time due to large delays, which affects the decision-making speed and processing efficiency of project managers;

[0010] (3) High equipment cost: Due to the high hardware requirements of traditional models, high-performance computing equipment is usually required to support their operation. This not only increases the cost of detection equipment, but also may limit its flexibility in field deployment and wide application. Moreover, the training and reasoning process of the model requires a lot of time and power resources, making it difficult to apply traditional technical methods in field environments with limited energy;

[0011] (4) Poor adaptability to dim light environments: The basement environment of the continued construction project is usually dim, and the lighting conditions are complex and unstable. Existing deep learning models perform poorly in such low-light environments and cannot effectively detect water seepage diseases. Traditional models rely on image data with good lighting for training, and are difficult to adapt to environments with insufficient light and high noise, resulting in a significant decrease in detection accuracy in dim environments, increasing the risk of missed detection and false detection. Summary of the invention

[0012] In view of the above analysis, an embodiment of the present invention aims to provide a basement water seepage disease detection method based on an improved BiSeNet, so as to solve the technical problems of the existing method, namely, limited computing power, insufficient practicality, high equipment cost and poor adaptability in dim light environments, resulting in the inability to achieve high efficiency, real-time and limited accuracy under resource-constrained and low-light conditions.

[0013] The present invention provides a basement water seepage disease detection method based on improved BiSeNet, comprising the following steps:

[0014] Step S1, obtaining an original basement water seepage image;

[0015] Step S2, inputting the original basement water seepage image into a trained basement water seepage disease detection model to obtain a thermal map identifying the water seepage source and the actual area of ​​water seepage; wherein the basement water seepage disease detection model is constructed based on an improved BiSeNet, including an adaptive lighting enhancement module, an improved BiSeNet module, a water seepage source identification module and a water seepage area calculation module; the adaptive lighting enhancement module is used to preprocess the original basement water seepage image; the improved BiSeNet module is used to identify the predicted water seepage area map in the preprocessed original basement water seepage image; the water seepage source identification module is used to output a thermal map identifying the water seepage source with the same size as the original basement water seepage image; the water seepage area calculation module is used to obtain the actual area of ​​water seepage.

[0016] Furthermore, the improved BiSeNet module includes a spatial path branch, a context path branch and an FFM module;

[0017] The pre-processed basement water seepage image is input into the improved BiSeNet module to obtain a predicted water seepage area map, including:

[0018] Inputting the preprocessed basement water seepage image into the spatial path branch and the context path branch simultaneously;

[0019] The spatial path branch is constructed based on the STDC module, down-samples the pre-processed basement water seepage image, and outputs features consistent with the number of channels of the pre-processed basement water seepage image as spatial path features;

[0020] The context path branch extracts features from the preprocessed basement water seepage image through the first, second, third and fourth downsampling layers in sequence to obtain first, second, third and fourth context features, inputs the second and third context features into the first UAFM module to obtain the first UAFM feature; inputs the third and fourth context features into the second UAFM module to obtain the second UAFM feature; inputs the fourth context feature into the GAP module to perform global averaging on each channel of the fourth context feature to obtain the fifth context feature;

[0021] Inputting the spatial path feature, the first UAFM feature, the second UAFM feature and the fifth context feature into the FFM module for feature enhancement, and outputting a unified feature representation;

[0022] Prediction is performed based on the unified feature representation, and the predicted water seepage area map is output.

[0023] Further, the spatial path branch includes the first, second, third, fourth STDC modules and the Fusion feature fusion layer in sequence;

[0024] The first, second, third and fourth STDC modules are composed of convolutional layers, normalization layers and ReLU activation layers;

[0025] The convolution kernel size of the convolution layer of the first STDC module is 1×1; the convolution kernel size of the convolution layer of the second, third and fourth STDC modules is 3×3;

[0026] The preprocessed basement water seepage image is passed through the first STDC module to obtain a first spatial feature with a channel number of N / 2; wherein N is the channel number of the preprocessed basement water seepage image;

[0027] The first spatial feature is passed through the second STDC module to obtain a second spatial feature with a channel number of N / 4;

[0028] The second spatial feature is passed through the third STDC module to obtain a third spatial feature with a channel number of N / 8;

[0029] The third spatial feature is passed through the fourth STDC module to obtain a fourth spatial feature with a channel number of N / 8;

[0030] The fusion feature fusion layer fuses the fourth spatial feature with the first, second and third spatial features of the jump cascade to obtain the spatial path feature with N channels.

[0031] Furthermore, the first UAFM module uses the second context feature as a deep feature F high1 , the third context feature is used as the shallow feature F low1 ;

[0032] Use bilinear interpolation to convert F high1 Upsample to F low1 The same size, get the upsampled feature F up1 ;

[0033] Based on F up1 and F low1 Generate attention weight α1;

[0034] α1=Attention(F up1 ,F low1 )

[0035] F up1 and F low1 Based on the attention weight α, the first UAFM feature F is output. out1 :

[0036] F out1 =F up1α1+F low1 (1-α1)

[0037] The second UAFM module uses the third context feature as the deep feature F high2 , the fourth context feature is used as the shallow feature F low2 ;

[0038] Use bilinear interpolation to convert F high2 Upsample to F low2 The same size, get the upsampled feature F up2 ;

[0039] Based on F up2 and F low2 Generate attention weight α2;

[0040] α2=Attention(F up2 ,F low2 )

[0041] F up2 and F low2 Based on the attention weight α2, the second UAFM feature F is output. out2 :

[0042] F out2 =F up2 α2+F low2 ·(1-α2).

[0043] Furthermore, α1 and α2 are obtained through spatial attention; the calculation formula is as follows:

[0044] F cat =Concat(Mean(F up ),Max(F up ),Mean(F low ),Max(F low ))

[0045] α=Sigmoid(Conv(F cat ))

[0046] Among them, Mean(.) is average pooling; Max(.) is maximum pooling.

[0047] When calculating α1, F up 、F low F up1 、F low1 ;

[0048] When calculating α2, F up 、F low F up2、F low2 .

[0049] Furthermore, the first downsampling layer performs a downsampling operation on the input preprocessed basement water seepage image to reduce the input feature by 4 times to obtain a first context feature;

[0050] The second downsampling layer further downsamples the first context feature input, and further reduces the input feature by 8 times to obtain a second context feature;

[0051] The third downsampling layer further downsamples the second context feature input, and further reduces the input feature by 16 times to obtain a third context feature;

[0052] The fourth downsampling layer further downsamples the input third context feature, and further reduces the input feature by 32 times to obtain a fourth context feature.

[0053] Furthermore, the water seepage source identification module is used to output a thermal map identifying the water seepage source with the same size as the original basement water seepage image, including:

[0054] The first step is to use a convolution layer with a convolution kernel size of 1×1 to reduce the number of feature channels of the predicted water seepage area map while retaining the spatial resolution, and output the feature map F reduced ;

[0055] The second step is to use a convolution layer with a convolution kernel size of 3×3 to perform reduced Perform feature enhancement to further extract the seepage source features and output the feature map F enhanced ;

[0056] The third step is to use a convolution layer with a convolution kernel size of 1×1 to transform the feature map F enhanced Project to single channel output to generate heat map H;

[0057] Step 4: Based on a preset threshold, further optimize the thermal map H, where pixels greater than the preset threshold are marked as 1 to indicate a water seepage source; pixels less than or equal to the preset threshold are marked as 0 to indicate a non-water seepage area; and obtain the thermal map that identifies the water seepage source.

[0058] Furthermore, the water seepage area calculation module is used to obtain the actual water seepage area, including:

[0059] The water seepage area is calculated by counting the number of pixels with a value of 1 in the predicted water seepage area map to obtain a pixel area;

[0060] The pixel area is converted into an actual area to obtain the actual area of ​​the water seepage.

[0061] Furthermore, the adaptive illumination enhancement module is used to preprocess the original basement water seepage image, including sequentially performing illumination enhancement, contrast adjustment, color correction and image resolution processing on the original basement water seepage image to obtain a preprocessed basement water seepage image.

[0062] Furthermore, loading a training sample set to train the basement water seepage disease detection model includes:

[0063] Set batch size, momentum, learning rate, weight decay, and maximum number of iterations;

[0064] Poly is used to dynamically adjust the learning rate during training, and training is performed based on the cross entropy loss function;

[0065] When the loss function converges, a trained basement water seepage disease detection model is obtained;

[0066] The training sample set is obtained in the following way:

[0067] The data enhancement method is used to increase the amount of training samples for the collected basement water seepage sample images; the data enhancement method includes horizontal mirroring and vertical flipping;

[0068] Then, the training samples are processed with illumination enhancement, contrast enhancement, color correction and image resolution in turn to obtain the pre-processed basement water seepage image;

[0069] The preprocessed basement seepage sample images and corresponding sample labels constitute a training sample set; wherein the sample label is a label image of the same size as the sample image, in which the value of each pixel represents the category to which the pixel belongs, and the pixel value in the label image is 1 or 0, indicating seepage or no seepage.

[0070] Compared with the prior art, the present invention can achieve at least one of the following beneficial effects:

[0071] 1. The present invention optimizes the use of computing resources by improving the BiSeNet model, based on the STDC module and the improved UFAM module, so that the model can run efficiently in a resource-constrained environment, thereby improving detection efficiency and practicality.

[0072] 2. Aiming at the insufficient light in the basement environment, the present invention adds light enhancement, contrast adjustment and color correction functions to the adaptive light enhancement module. Through the network structure of the adaptive light enhancement module and the improved BiSeNet module, the model can better adapt to the dim and complex light environment of the basement, and improve the detection accuracy and precision under dark light conditions;

[0073] 3. By introducing multi-scale feature extraction and attention mechanism, the model performs better in capturing the global features and local details of the water seepage area, effectively reducing missed detection and false detection;

[0074] 4. The present invention integrates the water seepage source identification module and the water seepage area calculation module, so that the present invention can more accurately identify the water seepage source and calculate the water seepage area, reduce the risk of missed detection and false detection, and improve the accuracy and reliability of the detection results;

[0075] 5. The optimization of the basement water seepage disease detection model structure of the present invention reduces the reasoning time, so that the model can meet the requirements of real-time detection, quickly respond to water seepage problems, and improve the decision-making speed and processing efficiency of project managers;

[0076] 6. The basement water seepage disease detection model of the present invention reduces the hardware requirements and reduces the dependence on high-performance computing equipment, thereby reducing the cost of detection equipment and reducing the time and power resource consumption during training and reasoning.

[0077] In the present invention, the above-mentioned technical solutions can also be combined with each other to achieve more preferred combination solutions. Other features and advantages of the present invention will be described in the subsequent description, and some advantages can become obvious from the description, or can be understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained through the contents particularly pointed out in the description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0078] The drawings are only for the purpose of illustrating particular embodiments and are not to be considered limiting of the present invention. Like reference symbols denote like components throughout the drawings.

[0079] Figure 1 This is a flow chart of a basement water seepage disease detection method based on improved BiSeNet in an embodiment of the present invention;

[0080] Figure 2 Schematic diagram of a basement water seepage disease detection model based on improved BiSeNet in an embodiment of the present invention;

[0081] Figure 3 This is a schematic diagram of the improved BiSeNet module structure in an embodiment of the present invention;

[0082] Figure 4 Schematic diagram of STDC module in an embodiment of the present invention;

[0083] Figure 5 Schematic diagram of a unified attention fusion module in an embodiment of the present invention;

[0084] Figure 6 Schematic diagram of a spatial attention module in an embodiment of the present invention;

[0085] Figure 7 Schematic diagram of a channel attention module in an embodiment of the present invention;

[0086] Figure 8 Schematic diagram of FEM structure in an embodiment of the present invention. DETAILED DESCRIPTION

[0087] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings, wherein the accompanying drawings constitute a part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not used to limit the scope of the present invention.

[0088] Traditional basement water seepage detection models, such as the U-Net model, have a large amount of calculation due to their complex network structure, making it difficult to achieve real-time processing. For actual engineering applications, water seepage problems usually need to be discovered and located in a timely manner so that measures can be taken quickly. In the model design, the present invention simplifies the network structure and reduces the number of parameters, and adopts an improved BiSeNet model to greatly reduce the computing requirements. In this way, even in a field environment with limited equipment computing resources, water seepage disease detection can be completed in real time, ensuring that the model improves the operating speed while maintaining detection accuracy, and meets the real-time requirements of field detection.

[0089] Basements are usually in low-light environments. Low-light conditions significantly reduce the detection effect of traditional deep learning models, resulting in increased missed detections and false detections. To address this problem, the present invention introduces an adaptive light enhancement module that can automatically adjust image brightness and contrast to improve image quality in low-light environments. At the same time, the module can dynamically adapt to different lighting changes, allowing the model to maintain high detection accuracy in dim or unevenly lit environments, reducing dependence on on-site light source conditions and improving the robustness of water seepage detection.

[0090] Conventional deep learning models require high-performance computing equipment, but the equipment resources at actual engineering sites are usually limited, and high-cost computing equipment is difficult to be widely used. The present invention adopts a lightweight model structure in the design, and greatly reduces the model parameters and calculation amount by optimizing the network architecture and introducing technical means such as STDC modules. This improvement not only reduces the hardware requirements, but also enables the basement water seepage disease detection model to run smoothly on low-configuration devices, improves the flexibility and economy of on-site deployment, and provides conditions for wide application.

[0091] The present invention aims to improve the detection efficiency and accuracy of basement water seepage diseases by introducing an improved BiSeNet deep learning network, which can be widely used in the quality inspection and maintenance management of underground buildings.

[0092] A specific embodiment of the present invention discloses a basement water seepage disease detection method based on improved BiSeNet, such as Figure 1 Shown, including:.

[0093] like Figure 1 As shown, the present invention proposes a method for detecting water seepage in basement of a continued construction project based on an improved BiSeNet, comprising the following steps:

[0094] Step S1, obtaining an original basement water seepage image;

[0095] Step S2, inputting the original basement water seepage image into a trained basement water seepage disease detection model to obtain a thermal map identifying the water seepage source and the actual area of ​​water seepage; wherein the basement water seepage disease detection model is constructed based on an improved BiSeNet, including an adaptive lighting enhancement module, an improved BiSeNet module, a water seepage source identification module and a water seepage area calculation module; the adaptive lighting enhancement module is used to preprocess the original basement water seepage image; the improved BiSeNet module is used to identify the predicted water seepage area map in the preprocessed original basement water seepage image; the water seepage source identification module is used to output a thermal map identifying the water seepage source with the same size as the original basement water seepage image; the water seepage area calculation module is used to obtain the actual area of ​​water seepage.

[0096] Step S1, specifically.

[0097] The surveillance camera installed in the basement is used to collect video data, and the original basement water seepage image data is obtained by extracting video frames.

[0098] Exemplarily, the original basement water seepage image may also be captured by a camera.

[0099] Original basement water infiltration images may or may not include signs of water infiltration.

[0100] The function of step S1 is to obtain original basement water seepage image data to provide original input for subsequent basement water seepage disease detection.

[0101] Step S2 includes steps S21-S22.

[0102] Step S21: construct a basement water seepage disease detection model.

[0103] The present invention improves the backbone network of the BiSeNet network, and adds an adaptive illumination enhancement module, a water seepage source identification module and a water seepage area calculation module to the outside of the network to adapt to the basement environment with weak illumination.

[0104] like Figure 2 As shown in the figure, the basement water seepage disease detection model is built based on the improved BiSeNet, including an adaptive illumination enhancement module, an improved BiSeNet module, a parallel water seepage source identification module and a water seepage area calculation module;

[0105] (1) Adaptive Lighting Enhancement Module

[0106] The adaptive illumination enhancement module is used to preprocess the original basement water seepage image, including sequentially performing illumination enhancement, contrast adjustment, color correction and image resolution processing on the original basement water seepage image to obtain a preprocessed basement water seepage image.

[0107] The adaptive illumination enhancement module is designed to improve the performance of deep learning models in low-light environments. It is used to automatically adjust the brightness, contrast, and color of images during the image input stage and pre-process the input raw images to improve the performance of the model in dim environments.

[0108] This module includes three sub-steps: lighting enhancement, contrast map adjustment, and color correction:

[0109] Light Enhancement: Increase the brightness of the image to make it clearer in dim environments. By adjusting α and β, you can control the overall brightness of the image to adapt it to different lighting conditions.

[0110] I enhanced =α·I original +β Formula (1)

[0111] Among them, I enhanced is the enhanced image, I original is the original image, α is the brightness gain coefficient, and β is the brightness offset value.

[0112] Contrast adjustment: By enhancing the contrast of the image, the details in the image are made more obvious.

[0113]

[0114] Among them, I contrast is the image after contrast adjustment, μ is the mean of the original image, σ is the standard deviation of the original image, and γ is the contrast enhancement coefficient. i is the brightness value of the ith pixel in the original image, and N is the total number of pixels in the image.

[0115] Color Correction: Use to adjust the color of an image to suit dim lighting conditions.

[0116]

[0117] Among them, I color is the color corrected image, S and O are the scale and offset used to adjust the color respectively.

[0118] The adaptive illumination enhancement module is used to preprocess the original basement water seepage image, adjust the brightness and contrast of the image in a low-light environment, and enhance the details of the water seepage area in the image; the adaptive module obtains the preprocessed basement water seepage image as the input of the subsequent improved BiSeNet module.

[0119] (2) Improved BiSeNet module

[0120] The present invention adopts an improved BiSeNet module as a core network model for basement water seepage disease detection.

[0121] The improved BiSeNet module includes a spatial path branch, a context path branch and an FFM module;

[0122] The pre-processed basement water seepage image is input into the improved BiSeNet module to obtain a predicted water seepage area map, including:

[0123] Inputting the preprocessed basement water seepage image into the spatial path branch and the context path branch simultaneously;

[0124] The spatial path branch is constructed based on the STDC module, down-samples the pre-processed basement water seepage image, and outputs features consistent with the number of channels of the pre-processed basement water seepage image as spatial path features;

[0125] The context path branch extracts features from the preprocessed basement water seepage image through the first, second, third and fourth downsampling layers in sequence to obtain first, second, third and fourth context features, inputs the second and third context features into the first UAFM module to obtain the first UAFM feature; inputs the third and fourth context features into the second UAFM module to obtain the second UAFM feature; inputs the fourth context feature into the GAP module to perform global averaging on each channel of the fourth context feature to obtain the fifth context feature;

[0126] Inputting the spatial path feature, the first UAFM feature, the second UAFM feature and the fifth context feature into the FFM module for feature enhancement, and outputting a unified feature representation;

[0127] Prediction is performed based on the unified feature representation, and the predicted water seepage area map is output.

[0128] The improved BiSeNet module contains two branch networks: the spatial path branch (Spatial Path) and the context path branch (Context Path), as well as the FFM (Feature Fusion Module) module.

[0129] The spatial path branch retains rich spatial information by capturing more underlying features to address the problem of spatial information loss that may occur during semantic segmentation. At the same time, the context path branch obtains more semantic information by expanding the receptive field, thereby improving the semantic understanding ability of the model. The FFM module is used to fuse spatial features and semantic information.

[0130] The present invention improves the standard BiSeNet network. The main structure of the improved BiSeNet network is as follows: Figure 3 The standard BiSeNet network backbone network spatial path branch is a three-layer Conv+Bn+Relu structure, and the present invention uses the STDC (Short-Term Dense Concatenate Module, real-time semantic segmentation network) module to replace the spatial path branch of the backbone network of the BiSeNet network.

[0131] The spatial path branch includes the first, second, third, fourth STDC modules and the Fusion feature fusion layer in sequence;

[0132] The first, second, third and fourth STDC modules are composed of convolutional layers, normalization layers and ReLU activation layers;

[0133] The convolution kernel size of the convolution layer of the first STDC module is 1×1; the convolution kernel size of the convolution layer of the second, third and fourth STDC modules is 3×3;

[0134] The pre-processed basement water seepage image is passed through the first STDC module to obtain a first spatial feature with a channel number of N / 2; wherein N is the pre-processed basement water seepage image;

[0135] The first spatial feature is passed through the second STDC module to obtain a second spatial feature with a channel number of N / 4;

[0136] The second spatial feature is passed through the third STDC module to obtain a third spatial feature with a channel number of N / 8;

[0137] The third spatial feature is passed through the fourth STDC module to obtain a fourth spatial feature with a channel number of N / 8;

[0138] The fusion feature fusion layer fuses the fourth spatial feature with the first, second and third spatial features of the jump cascade to obtain the spatial path feature with N channels.

[0139] As a real-time semantic segmentation network, STDC enhances the feature expression capability by gradually reducing the dimension of feature graphs and aggregating information. In order to improve the real-time performance and adaptability of BiSeNet to complex environments, the present invention uses the STDC module to replace the original backbone network. Figure 4 As shown in the figure, the STDC module enriches features through jump connections (x1, x2, and x3 are jump-connected to the Fusion feature fusion layer respectively), so that the shallow layer (the layer close to the input end of STDC) has enough channels to encode more detailed information, thereby enhancing the expression of high-level (the layer close to the output end of STDC) information, reducing the computational complexity of the model, and improving the detection speed.

[0140] like Figure 4 As shown, the STDC backbone network. STDC is divided into multiple blocks, the first, second, third and fourth STDC modules, each module uses ConvX i (i=1, 2, 3, 4) represents the convolution operation of the i-th block. The output of the i-th block is calculated by the following formula:

[0141]

[0142] The input of the i-th STDC module is x i-1 , the output is x i .

[0143] The input x0 of the first STDC module is the preprocessed basement water seepage image.

[0144] The ConvX in each STDC module consists of three parts: a convolutional layer, a normalization layer, and a ReLU activation layer.

[0145] Although the number of channels of the features output by the third STDC module and the fourth STDC module is the same, after convolution by the fourth STDC module, the feature x3 output by the third STDC module and the feature x4 output by Block4 are different.

[0146] Fusion is a feature fusion layer that jumps and cascades feature x4 with features x1, x2, and x3, and finally outputs a result with 1 channel of N.

[0147] The STDC module concatenates feature x4 with features x1, x2, and x3 as output through a skip path, thereby enriching the feature information. Before cascading, the response maps of different blocks in the STDC module are downsampled using 3×3 average pooling to make them of the same size. The final output is as follows:

[0148] x output =F(x1,x2,…,x4) Formula (7)

[0149] Among them, x output is the output of the STDC module, F is the fusion operation of the Fusion feature fusion layer, and x1, x2,…, x4 are the feature maps of the first, second, third and fourth STDC modules.

[0150] Context path branching:

[0151] The first downsampling layer performs a downsampling operation on the input preprocessed basement water seepage image, reduces the input feature by 4 times, and obtains a first context feature;

[0152] The second downsampling layer further downsamples the first context feature input, and further reduces the input feature by 8 times to obtain a second context feature;

[0153] The third downsampling layer further downsamples the second context feature input, and further reduces the input feature by 16 times to obtain a third context feature;

[0154] The fourth downsampling layer further downsamples the input third context feature, and further reduces the input feature by 32 times to obtain a fourth context feature.

[0155] like Figure 3 As shown, the context path branch includes the first, second, third and fourth downsampling layers, and the GAP module in sequence, and the first, second, third and fourth downsampling layers are identified as 4×down, 8×down, 16×down and 32×down in sequence.

[0156] 4×down: downsample the preprocessed basement water seepage image, and the input feature map is reduced by 4 times; the first context feature is obtained;

[0157] 8×down: Continue downsampling the 4×down output result and reduce the 4×down output result by 8 times to obtain the second context feature;

[0158] 16×down: Continue downsampling the 8×down output result and reduce the 8×down output result by 16 times to obtain the third context feature;

[0159] 32×down: The 16×down output result is further downsampled and the 16×down output result is further reduced by 32 times; the fourth context feature is obtained.

[0160] The fourth context feature is input into the GAP (Global Average Pooling) layer, and each channel of the fourth context feature map is globally averaged, and the spatial dimension (i.e., width and height) of each channel is reduced to 1 to obtain the fifth context feature.

[0161] Unified Attention Fusion Module - UAFM Module:

[0162] The present invention introduces the UAFM module (Unified Attention Fusion Module) in the context path branch, further enhancing the representation capability of semantic information features and improving the detection accuracy of water seepage areas. The UFAM module in the present invention replaces the ARM (Attention Refinement Module) of the standard BiSeNet network.

[0163] The beneficial effect of replacing the original ARM with UAFM is that UAFM, as a unified attention fusion module, performs more refined fusion on multi-scale features. The UAFM module can more effectively combine feature maps from different levels and scales, and enhance the network's perception of local and global information, especially in tasks such as fine-grained segmentation and object recognition. Compared with the traditional ARM module, UAFM is more balanced when fusing information at different levels, avoiding excessive reliance on information at a single scale, and improving feature expression capabilities.

[0164] The basement environment is a scene with complex structure and easily affected by external factors. Problems such as insufficient lighting, water leakage and wall cracks make it challenging to accurately identify water seepage. To address the problem of low detection accuracy of basement water seepage, the present invention adopts a unified attention fusion module (UFAM) to enhance feature representation by fusing the attention mechanism of space and channel, thereby improving the recognition accuracy of the model.

[0165] The UAFM module is two parallel modules with completely identical structures, namely the first UFAM module and the second UFAM module.

[0166] The first UAFM module uses the second context feature as a deep feature F high1 , the third context feature is used as the shallow feature F low1 ;

[0167] Use bilinear interpolation to convert F high1 Upsample to Flow1 The same size, get the upsampled feature F up1 ;

[0168] Based on F up1 and F low1 Generate attention weight α1;

[0169] α1=Attention(F up1 ,F low1 ) Formula (8)

[0170] F up1 and F low1 Based on the attention weight α, the first UAFM feature F is output. out1 :

[0171] F out1 =F up1 α1+F low1 ·(1-α1) Formula (9)

[0172] The second UAFM module uses the third context feature as the deep feature F high2 , the fourth context feature is used as the shallow feature F low2 ;

[0173] Use bilinear interpolation to convert F high2 Upsample to F low2 The same size, get the upsampled feature F up2 ;

[0174] Based on F up2 and F low2 Generate attention weight α2;

[0175] α2=Attention(F up2 ,F low2 ) Formula (10)

[0176] F up2 and F low2 Based on the attention weight α2, the second UAFM feature F is output. out2 :

[0177] F out2 =F up2 α2+F low2 ·(1-α2) Formula (11)

[0178] like Figure 5 As shown in Figure 2, the UAFM module generates a weight α through the attention module and fuses the input features with α through Mul and Add operations. The input features are represented as F high and Flow , F high is the deep feature, F low It is the shallow feature output by the corresponding module of the encoder.

[0179] The UAFM module first uses a bilinear interpolation operation to convert F high Upsample to F low The same size, get the upsampled feature F up .

[0180] UP stands for upsampling, which is to enlarge the spatial resolution of the feature map (i.e. the height and width of the image) in some way to restore it to its original size or a target size. Bilinear interpolation is used here to perform upsampling by taking a weighted average of adjacent pixels above, below, left, and right.

[0181] The output of the first UAFM module and the second downsampling layer 8×down is used as F low , the output of the third downsampling layer 16×down is used as F high . F high Refers to the deep features, F low Refers to shallow features.

[0182] The output of the second UAFM module and the third downsampling layer 16×down is used as F low , the output of the fourth downsampling layer 32×down is used as F high

[0183] F high After upsampling (enlargement) to F low The smaller one is F. high .

[0184] Use bilinear interpolation to convert F high Upsample to obtain the upsampled feature F up .

[0185] F up =Upsample(F high ) Formula (12)

[0186] The attention module is based on F up and F low As input, generate the attention weight α. After obtaining the attention weight, up and F low Perform Mul operations (matrix multiplication operations) respectively. Finally, UAFM performs Add operations on the attention-weighted features and outputs the fused features.

[0187] The spatial attention module uses the spatial relationship to generate weights. The first UFAM module obtains the weight α1; the second UFAM module obtains the weight α2, which represents the importance of each pixel in the input feature. The attention module obtains the weight α.

[0188] like Figure 6 As shown, α1 and α2 are obtained through spatial attention; the calculation formula is as follows:

[0189] F cat =Concat(Mean(F up ),Max(F up ),Mean(F low ),Max(F low )) Formula (13)

[0190] α=Sigmoid(Conv(F cat )) Formula (14)

[0191] Among them, Mean(.) is average pooling; Max(.) is maximum pooling.

[0192] When calculating α1, F up 、F low F up1 、F low1 ;

[0193] When calculating α2, F up 、F low F up2 、F low2 .

[0194] like Figure 6 As shown, Spatial represents space, and the spatial attention module focuses on the importance of each pixel (spatial position), so the output weight is a single-channel matrix of size H×W.

[0195] F1=Mean(F up ) Formula (15)

[0196] F2=Max(F up ) Formula (16)

[0197] F3=Mean(F low ) Formula (17)

[0198] F4=Max(F low ) Formula (18)

[0199] Given input feature F up 、F low ∈R C×H×W, where C, H, and W are the number of channels, the height and width of the input feature map, respectively. First, four features are generated by average pooling and maximum pooling operations along the channel axis. The dimension of each feature is R 1×H×W Then, these four features are connected into a feature map. For the connected features, convolution and sigmoid operations are applied, and the final output weight α∈R 1×H×W .

[0200] like Figure 7 As shown, weights α1 and α2 can also be obtained through the channel attention module.

[0201] The core of the channel attention module is to use the relationship between channels to generate weights. For this weight, each channel of the input feature plays an important role. The proposed channel attention module compresses the spatial dimensions of the input features through average pooling and maximum pooling operations to generate more representative channel weights. In this process, by performing average pooling and maximum pooling operations on the input features, a channel weight with a dimension of R is generated. C×1×1 Then, these four features are concatenated along the channel axis, and convolution and sigmoid operations are applied to the concatenated features to generate weights α∈R C×1×1 The calculation formula is as follows:

[0202]

[0203] α=Sigmoid(Conv(F cat )) Formula (20)

[0204] Among them, AvgPool(.) is average pooling and MaxPool(.) is maximum pooling.

[0205] F1=AvgPool(F up ) Formula (21)

[0206] F2=MaxPool(F up ) Formula (22)

[0207] F3=AvgPool(F low ) Formula (23)

[0208] F4=MaxPool(F low ) Formula (24)

[0209] The channel attention module focuses on the importance of each channel in the feature map, so the output weight dimension is C×1×1.

[0210] In order to further enhance the feature extraction capability, the model designs a feature fusion module (FFM) to fuse spatial features and semantic information. This module downsamples the feature map of the context path to the same size as the feature map of the spatial path through bilinear interpolation, integrates these features through the feature fusion layer, and finally outputs a feature map that combines spatial and contextual information.

[0211] FEM (Feature Enhancement Module) module is a feature enhancement module.

[0212] like Figure 8 As shown, it is the FFM structure in the standard BiSeNet network, and the present invention does not make any improvements to this part.

[0213] The FFM module receives feature maps from two main paths of BiSeNet (spatial path branch and context path branch). The spatial path branch outputs spatial path features, and the context path branch outputs the first UAFM feature, the second UAFM feature, and the fifth context feature;

[0214] FFM performs feature enhancement on the received features. In the spatial path, the feature maps contain higher resolution spatial information but lack global context. FEM enhances these features to help the spatial path better capture important details. In the context path, the feature maps contain lower resolution global information but lack fine spatial structure. FEM enhances these features to ensure that context information can be better combined with spatial information.

[0215] The FEM module fuses the enhanced feature maps and outputs a unified feature representation.

[0216] The improved BiSeNet module ultimately achieves semantic segmentation, performs prediction based on the unified feature representation, and outputs a predicted water seepage area map in the image.

[0217] (3) Water seepage source identification module

[0218] The input of the water seepage identification module is the predicted water seepage area map of the improved BiSeNet module.

[0219] The water seepage source identification module is used to output a thermal map identifying the water seepage source with the same size as the original basement water seepage image, including:

[0220] The first step is to use a convolution layer with a convolution kernel size of 1×1 to reduce the number of feature channels of the predicted water seepage area map while retaining the spatial resolution, and output the feature map F reduced ;

[0221] The second step is to use a convolution layer with a convolution kernel size of 3×3 to perform reduced Perform feature enhancement to further extract the seepage source features and output the feature map F enhanced ;

[0222] The third step is to use a convolution layer with a convolution kernel size of 1×1 to transform the feature map F enhanced Project to single channel output to generate heat map F;

[0223] Step 4: Based on the preset threshold, further optimize the thermal map F, the pixel points greater than the preset threshold are marked as 1 to indicate the water seepage source; the pixel points less than or equal to the preset threshold are marked as 0 to indicate the non-water seepage area; and obtain the thermal map marked with the water seepage source.

[0224] The water seepage source identification module learns the characteristics of water seepage traces in the image, such as the expansion direction, density, brightness change, etc. of the water marks. By learning the water seepage characteristics in the image, a heat map is generated to show the specific location of the water seepage source. The darker the color, the more concentrated the water seepage points are.

[0225] The water seepage source identification module consists of a convolutional layer and an upsampling layer. First, the image output by the improved BiSeNet network passes through a 1×1 convolutional layer to reduce the number of feature channels while retaining the spatial resolution.

[0226] F reduced =Conv 1x1 (F fused ) Formula (25)

[0227] F fused For the image output by the improved BiSeNet network, Conv 1x1 is a convolution operation with a convolution kernel size of 1×1, F reduced is the feature graph.

[0228] Then, a 3×3 convolution kernel is used to enhance the feature map and further extract information related to the seepage source.

[0229] F enhanced =ReLU(Conv 3x3 (F reduced )) Formula (26)

[0230] ReLU is the activation function.

[0231] A 1×1 convolutional layer is used again to project the enhanced feature map to a single channel output for generating a heat map.

[0232] H=Sigmod(Conv 1x1 (F enhanced)) Formula (27)

[0233] Among them, Sigmod is the activation function.

[0234] The multi-channel feature map is compressed into a single-channel probability map. The higher the value, the greater the possibility of the seepage source.

[0235] In order to obtain clearer water seepage source detection results, the heat map can be further optimized through threshold processing:

[0236]

[0237] Among them, H threshold (x, y) is the binary heat map, indicating the exact location of the water seepage source. δ is the threshold.

[0238] The threshold δ can be determined as a fixed threshold through trial and error, or an adaptive threshold can be used according to the characteristics of the infiltration source in different scenarios.

[0239] The water seepage identification module outputs a heat map with the same size as the original image, where 0 represents the intact area and 1 represents the water seepage source.

[0240] Water seepage source identification module: uses thermal map generation technology to mark the source of water seepage, outputs the location information of the water seepage source, and is used to output a thermal map identifying the water seepage source with the same size as the original basement water seepage image.

[0241] (4) Seepage area calculation module

[0242] The input of the seepage area calculation module is the predicted seepage area map of the improved BiSeNet network.

[0243] The water seepage area calculation module is used to obtain the actual water seepage area, including:

[0244] The water seepage area is calculated by counting the number of pixels with a value of 1 in the predicted water seepage area map to obtain a pixel area;

[0245] The pixel area is converted into an actual area to obtain the actual area of ​​the water seepage.

[0246] The water seepage area calculation module further purifies the detected water seepage area and removes noise or false detection areas by performing morphological processing (such as corrosion, expansion, closing operations, etc.) on the water seepage area. By counting the number of pixels in the segmented water seepage area and combining it with the actual scale of the basement, the water seepage area can be accurately calculated.

[0247] The binary image of the water seepage area is obtained from the BiSeNet segmentation (that is, the prediction output of the improved BiSeNet network):

[0248]

[0249] Among them, B(x, y) is the segmentation result after binarization, and the pixel with a value of 1 represents the water seepage area.

[0250] In order to remove noise or small false positive areas, morphological operations (such as corrosion, dilation, etc.) are applied to optimize the segmented image. Then the water seepage area is calculated by counting the number of pixels with a value of 1 in the binary image:

[0251]

[0252] Where N is the number of pixels with a value of 1 in the binary image.

[0253] Convert pixel area to actual area A total :

[0254] A total =N×A pixel Formula (31)

[0255] Among them, A pixel The actual area corresponding to each pixel.

[0256] The seepage area calculation module is used to obtain the actual area of ​​seepage, and accurately calculate the area of ​​the seepage area through morphological operations and pixel statistics. Finally, the location of the seepage source and the seepage area data are output to provide visual results and quantitative data for engineering personnel.

[0257] Step S22, loading a training sample set to train the basement water seepage disease detection model, including:

[0258] Set batch size, momentum, learning rate, weight decay, and maximum number of iterations;

[0259] Poly is used to dynamically adjust the learning rate during training, and training is performed based on the cross entropy loss function;

[0260] When the loss function converges, a trained basement water seepage disease detection model is obtained;

[0261] The training sample set is obtained in the following way:

[0262] The data enhancement method is used to increase the amount of training samples for the collected basement water seepage sample images; the data enhancement method includes horizontal mirroring and vertical flipping;

[0263] Then, the training samples are processed with illumination enhancement, contrast enhancement, color correction and image resolution in turn to obtain the pre-processed basement water seepage image;

[0264] The preprocessed basement seepage sample images and corresponding sample labels constitute a training sample set; wherein the sample label is a label image of the same size as the sample image, in which the value of each pixel represents the category to which the pixel belongs, and the pixel value in the label image is 1 or 0, indicating seepage or no seepage.

[0265] The collected basement water seepage sample images include basement images under different humidity and lighting conditions, covering various manifestations of water seepage signs.

[0266] During training, the cross entropy loss function is used.

[0267]

[0268] N is the number of pixels, C is the number of categories, y i,c is the true label, is the predicted probability.

[0269] When the loss value decreases very little or tends to be stable for multiple consecutive iterations during training, it can be considered that the model has reached a convergence state.

[0270] Set a threshold ΔL, when the loss change of consecutive k iterations satisfies:

[0271] |L n -L n-1 |<ΔL Formula (33)

[0272] L n is the loss function of the nth iteration.

[0273] The training process of the basement water seepage disease detection model was carried out in the Windows 11+CUDA 10.1 system environment. The computer configuration was R5600 CPU, 16GB memory, and the graphics card was NVIDIA RTX307012GB memory GPU. A neural network program was written using the Paddle2.2 framework, and STDC was used as the backbone network in the experiment. The mini-batch stochastic gradient descent method was selected for training. In order to optimize the training effect of the network, the "poly" strategy was used to dynamically adjust the learning rate, and the power value was set to 0.9. Compared with the traditional learning rate update strategy, the "poly" strategy can more significantly accelerate the convergence of the network. The specific parameter settings are shown in Table 1.

[0274] Table 1: Model training parameter settings

[0275]

[0276]

[0277] Step 1: Build a database. Use surveillance cameras installed in the basement to collect video data, and extract video frames to obtain image data of the basement water seepage area. These data include basement images under different humidity and lighting conditions, covering various manifestations of water seepage signs.

[0278] Step 1-1: Image screening. The extracted image data is screened to remove duplicate, ambiguous or image data that seriously affects network training to ensure data quality. For example, manual screening is performed.

[0279] Step 1-2: Adaptive light enhancement. Considering the dim light conditions in the basement environment, the adaptive light enhancement module is used to compensate the image data for light. This module automatically adjusts the brightness and contrast based on the mean and standard deviation of the image. Light enhancement, contrast adjustment.

[0280] Step 1-3: Data enhancement. Due to the closed environment of the basement, the collected video data is limited, and the extracted image data is relatively small. In order to meet the demand for large data sets for neural network training, data enhancement methods are used to increase the amount of data. Specific enhancement techniques include horizontal mirroring, vertical flipping, brightness adjustment, and contrast enhancement. Increase the number of training samples.

[0281] Color Correction:

[0282] Step 1-4: Image resolution processing: The resolution of all images is uniformly processed to 1280×720.

[0283] Step 1-5: Add sample labels and divide the data set. The training sample set consisting of the processed image data and sample labels is randomly divided into a training set and a validation set in a ratio of 8:2.

[0284] Step 2: Basement water seepage disease detection model training.

[0285] Step 2-1: Feature extraction and fusion. First, the BiSeNet network extracts high-resolution detail information of the spatial path and semantic information of the context path from the input image. Through the feature fusion operation, the features of these two paths are combined to form a comprehensive feature map for water seepage detection, which improves the prediction output of the BiseNet network.

[0286] Step 2-2: The water seepage source identification module generates a heat map using the extracted features and automatically marks the location of the water seepage source. The heat map indicates the probability of the water seepage source through the intensity of different colors. The model automatically determines the starting location of the water seepage based on the high-heat area in the heat map. For areas in the heat map with intensity values ​​greater than the set threshold, they are considered to be water seepage sources and their precise locations are marked.

[0287] Step 2-3: The water seepage area calculation module optimizes the segmentation results through morphological processing (such as corrosion, expansion, etc.), removes noise and fills small holes. Then, the model calculates the number of valid pixels in the water seepage area and combines it with the actual scale of the basement to finally output the area of ​​the water seepage area. This process ensures accurate detection and area calculation of the water seepage area.

[0288] Step 3: In the application stage, the images in the actual basement scene are input into the trained basement water seepage disease detection model, and the model automatically performs water seepage detection.

[0289] Step 3-1: Locating the source of water seepage. The model first locates the source of water seepage through the heat map generation module based on the input pre-processed basement image. The basement water seepage disease detection model marks the high-probability area in the water seepage area in red, so that engineering personnel can intuitively see the starting point of water seepage. The heat map generated by the basement water seepage disease detection model shows the precise location of the water seepage source, helping engineering managers quickly find the specific point of basement water seepage.

[0290] Step 3-2: Calculation of water seepage area. After identifying the water seepage area, the system uses the water seepage area calculation module to perform pixel statistics based on the segmented area and output the area data of the water seepage area. By converting the pixel value into the actual area, the specific water seepage area is finally obtained to help assess the severity of the water seepage. This result is directly provided to the on-site engineering maintenance personnel, so that the engineering personnel can quickly decide on the next step of repair work.

[0291] Step 4: Evaluation and verification. In order to quantitatively analyze the segmentation effect of the algorithm, the mean intersection over union (mIoU), pixel accuracy (PA-PixelAccuracy) and Dice coefficient are used as evaluation indicators of the water seepage area segmentation model.

[0292] mIoU calculates the ratio of the intersection and union of the predicted results and the actual annotation results, calculates the IoU of each category, and takes the average value as mIoU. The calculation is as follows:

[0293]

[0294] Among them, k is the number of samples; TP is the number of pixels correctly classified as foreground, TN is the number of pixels incorrectly classified as foreground, FP is the number of pixels incorrectly classified as background, and FN is the number of pixels correctly classified as background.

[0295] Pixel accuracy: refers to the ratio of correctly predicted pixels to the total number of pixels. The calculation is as follows:

[0296]

[0297] Dice similarity: Dice similarity is also called F1 metric, which is determined by two parameters: precision and recall. It is used to calculate the similarity between two sets. The higher the Dice value, the more effective the experimental method. The calculation is as follows:

[0298]

[0299] The recall rate R refers to the ratio of the number of pixels correctly predicted as foreground to the total number of pixels actually being foreground. The precision P refers to the ratio of the number of pixels correctly predicted as foreground to the number of pixels predicted as foreground.

[0300] In summary, the basement water seepage disease detection method based on improved BiSeNet according to an embodiment of the present invention has the following beneficial effects:

[0301] 1. The present invention optimizes the use of computing resources by improving the BiSeNet model, based on the STDC module and the improved UFAM module, so that the model can run efficiently in a resource-constrained environment, thereby improving detection efficiency and practicality.

[0302] 2. Aiming at the insufficient light in the basement environment, the present invention adds light enhancement, contrast adjustment and color correction functions to the adaptive light enhancement module. Through the network structure of the adaptive light enhancement module and the improved BiSeNet module, the model can better adapt to the dim and complex light environment of the basement, and improve the detection accuracy and precision under dark light conditions;

[0303] 3. By introducing multi-scale feature extraction and attention mechanism, the model performs better in capturing the global features and local details of the water seepage area, effectively reducing missed detection and false detection;

[0304] 4. The present invention integrates the water seepage source identification module and the water seepage area calculation module, so that the present invention can more accurately identify the water seepage source and calculate the water seepage area, reduce the risk of missed detection and false detection, and improve the accuracy and reliability of the detection results;

[0305] 5. The optimization of the basement water seepage disease detection model structure of the present invention reduces the reasoning time, so that the model can meet the requirements of real-time detection, quickly respond to water seepage problems, and improve the decision-making speed and processing efficiency of project managers;

[0306] 6. The basement water seepage disease detection model of the present invention reduces the hardware requirements and reduces the dependence on high-performance computing equipment, thereby reducing the cost of detection equipment and reducing the time and power resource consumption during training and reasoning.

[0307] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by any technician familiar with the technical field within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention.

Claims

1. A basement water seepage disease detection method based on improved BiSeNet, characterized in that: The steps include: Step S1, obtaining an original basement water seepage image; Step S2, inputting the original basement water seepage image into a trained basement water seepage disease detection model to obtain a thermal map identifying the water seepage source and the actual area of ​​water seepage; wherein the basement water seepage disease detection model is constructed based on an improved BiSeNet, including an adaptive lighting enhancement module, an improved BiSeNet module, a water seepage source identification module and a water seepage area calculation module; the adaptive lighting enhancement module is used to preprocess the original basement water seepage image; the improved BiSeNet module is used to identify the predicted water seepage area map in the preprocessed original basement water seepage image; the water seepage source identification module is used to output a thermal map identifying the water seepage source with the same size as the original basement water seepage image; the water seepage area calculation module is used to obtain the actual area of ​​water seepage.

2. The method according to claim 1, characterized in that: The improved BiSeNet module includes a spatial path branch, a context path branch and an FFM module; The pre-processed basement water seepage image is input into the improved BiSeNet module to obtain a predicted water seepage area map, including: Inputting the preprocessed basement water seepage image into the spatial path branch and the context path branch simultaneously; The spatial path branch is constructed based on the STDC module, down-samples the pre-processed basement water seepage image, and outputs features consistent with the number of channels of the pre-processed basement water seepage image as spatial path features; The context path branch extracts features from the preprocessed basement water seepage image through the first, second, third and fourth downsampling layers in sequence to obtain first, second, third and fourth context features, inputs the second and third context features into the first UAFM module to obtain the first UAFM feature; inputs the third and fourth context features into the second UAFM module to obtain the second UAFM feature; inputs the fourth context feature into the GAP module to perform global averaging on each channel of the fourth context feature to obtain the fifth context feature; Inputting the spatial path feature, the first UAFM feature, the second UAFM feature and the fifth context feature into the FFM module for feature enhancement, and outputting a unified feature representation; Prediction is performed based on the unified feature representation, and the predicted water seepage area map is output.

3. The method according to claim 2, characterized in that: The spatial path branch includes the first, second, third, fourth STDC modules and the Fusion feature fusion layer in sequence; The first, second, third and fourth STDC modules are composed of convolutional layers, normalization layers and ReLU activation layers; The convolution kernel size of the convolution layer of the first STDC module is 1×1; the convolution kernel size of the convolution layer of the second, third and fourth STDC modules is 3×3; The preprocessed basement water seepage image is passed through the first STDC module to obtain a first spatial feature with a channel number of N / 2; wherein N is the channel number of the preprocessed basement water seepage image; The first spatial feature is passed through the second STDC module to obtain a second spatial feature with a channel number of N / 4; The second spatial feature is passed through the third STDC module to obtain a third spatial feature with a channel number of N / 8; The third spatial feature is passed through the fourth STDC module to obtain a fourth spatial feature with a channel number of N / 8; The fusion feature fusion layer fuses the fourth spatial feature with the first, second and third spatial features of the jump cascade to obtain the spatial path feature with N channels.

4. The method according to claim 2, characterized in that: The first UAFM module uses the second context feature as a deep feature F high1 , the third context feature is used as the shallow feature F low1 ; Use bilinear interpolation to convert F high1 Upsample to F low1 The same size, get the upsampled feature F up1 ; Based on F up1 and F low1 Generate attention weight α1; α1=Attention(F up1 ,F low1 ) F up1 and F low1 Based on the attention weight α, the first UAFM feature F is output. out1 : F out1 =F up1 ·α1+F low1 ·(1-α1) The second UAFM module uses the third context feature as the deep feature F high2 , the fourth context feature is used as the shallow feature F low2 ; Use bilinear interpolation to convert F high2 Upsample to F low2 The same size, get the upsampled feature F up2 ; Based on F up2 and F low2 Generate attention weight α2; α2=Attention(F up2 ,F low2 ) F up2 and F low2 Based on the attention weight α2, the second UAFM feature F is output. out2 : F out2 =F up2 ·α2+F low2 ·(1-α2)。 5. The method according to claim 4, characterized in that: α1 and α2 are obtained through spatial attention; the calculation formula is as follows: F cat =Concat(Mean(F up ),Max(F up ),Mean(F low ),Max(F low )) α=Sigmoid(Conv(F cat )) Among them, Mean(.) is average pooling; Max(.) is maximum pooling. When calculating α1, F up 、F low F up1 、F low1 ; When calculating α2, F up 、F low F up2 、F low2 .

6. The method according to claim 2, characterized in that: The first downsampling layer performs a downsampling operation on the input preprocessed basement water seepage image, reduces the input feature by 4 times, and obtains a first context feature; The second downsampling layer further downsamples the first context feature input, and further reduces the input feature by 8 times to obtain a second context feature; The third downsampling layer further downsamples the second context feature input, and further reduces the input feature by 16 times to obtain a third context feature; The fourth downsampling layer further downsamples the input third context feature, and further reduces the input feature by 32 times to obtain a fourth context feature.

7. The method according to claim 1, characterized in that: The water seepage source identification module is used to output a thermal map identifying the water seepage source with the same size as the original basement water seepage image, including: The first step is to use a convolution layer with a convolution kernel size of 1×1 to reduce the number of feature channels of the predicted water seepage area map while retaining the spatial resolution, and output the feature map F reduced ; The second step is to use a convolution layer with a convolution kernel size of 3×3 to perform reduced Perform feature enhancement to further extract the seepage source features and output the feature map F enhanced ; The third step is to use a convolution layer with a convolution kernel size of 1×1 to transform the feature map F enhanced Project to single channel output to generate heat map H; Step 4: Based on a preset threshold, further optimize the thermal map H, where pixels greater than the preset threshold are marked as 1 to indicate a water seepage source; pixels less than or equal to the preset threshold are marked as 0 to indicate a non-water seepage area; and obtain the thermal map that identifies the water seepage source.

8. The method according to claim 7, characterized in that: The water seepage area calculation module is used to obtain the actual water seepage area, including: The water seepage area is calculated by counting the number of pixels with a value of 1 in the predicted water seepage area map to obtain a pixel area; The pixel area is converted into an actual area to obtain the actual area of ​​the water seepage.

9. The method according to claim 1, characterized in that: The adaptive illumination enhancement module is used to preprocess the original basement water seepage image, including sequentially performing illumination enhancement, contrast adjustment, color correction and image resolution processing on the original basement water seepage image to obtain a preprocessed basement water seepage image.

10. The method according to claim 1, characterized in that: Loading a training sample set to train the basement water seepage disease detection model includes: Set batch size, momentum, learning rate, weight decay, and maximum number of iterations; Poly is used to dynamically adjust the learning rate during training, and training is performed based on the cross entropy loss function; When the loss function converges, a trained basement water seepage disease detection model is obtained; The training sample set is obtained in the following way: The data enhancement method is used to increase the amount of training samples for the collected basement water seepage sample images; the data enhancement method includes horizontal mirroring and vertical flipping; Then, the training samples are processed with illumination enhancement, contrast enhancement, color correction and image resolution in turn to obtain the pre-processed basement water seepage image; The preprocessed basement seepage sample images and corresponding sample labels constitute a training sample set; wherein the sample label is a label image of the same size as the sample image, in which the value of each pixel represents the category to which the pixel belongs, and the pixel value in the label image is 1 or 0, indicating seepage or no seepage.

Citation Information

Cited By

  • Dam water seepage monitoring method based on remote sensing image

    CN120912928A