Bridge apparent disease detection method and system based on morphology-texture decoupling and double-flow fusion

CN123033148APending Publication Date: 2026-11-03西安市市政设施管理中心
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611474207.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-21
Publication Date
2026-11-03

AI Technical Summary

Technical Problem

问题一:病害目标与背景伪纹理高度相似,造成误检

Benefits of technology

1、本发明通过骨干网络特征提取、形态-纹理解耦注意力模块MTDA的解耦处理、双流自适应门控融合模块DAGF的融合处理以及检测头输出的完整技术链路,可直接应用于无人机桥梁表观病害检测场景,且不依赖特定骨干网络结构,具有良好的通用性。相比传统方法,本发明从特征解耦、双流自适应融合与DiceIoU边界框回归损失三个层面,同时降低背景伪纹理干扰造成病害目标误检与极小病害目标漏检两项风险,使整体检测精度显著提升。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123033148A_ABST
    Figure CN123033148A_ABST
Patent Text Reader

Abstract

The application discloses a bridge apparent disease detection method and system based on morphology-texture decoupling and double-flow fusion. The method acquires a UAV bridge apparent disease image and extracts a multi-scale feature map. The feature map is input into a morphology-texture decoupling attention module MTDA, projected to a morphology subspace and a texture subspace through two independent 1*1 convolution, and morphology features and texture features are obtained. The morphology features are multiplied by multi-scale attention weights to obtain morphology enhanced features. The texture features are subjected to operation to suppress background pseudo-texture response, and texture suppression features are obtained. Orthogonal regularization constraints are applied to the above two features, so that they tend to be orthogonal, and are input into a double-flow adaptive gate fusion module DAGF as morphology flow and texture flow. Through dynamic weighted fusion of learnable gate weights, a fusion feature map is obtained. The fusion feature map is input into a detection head to finally obtain a disease position and a category. The DiceIoU bounding box regression loss function has a gradient boundedness. The system can be deployed on a UAV edge device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the interdisciplinary technical field of computer vision, deep learning and intelligent detection of transportation infrastructure, and specifically relates to a method and system for detecting bridge surface defects based on morphology-texture decoupling and dual-stream fusion. Background Technology

[0002] As a critical node in transportation infrastructure, timely detection of surface defects in bridges is crucial for ensuring bridge safety. With the development of drone technology, using drones equipped with imaging equipment and intelligent systems to inspect bridge surface defects has become an important technical means. However, existing deep learning-based methods for detecting bridge surface defects still face the following three core challenges when processing images acquired by drones: Problem 1: The diseased target is highly similar to the background pseudo-texture, causing false detection.

[0003] On the concrete surface of bridges, defects such as cracks and spalling exhibit high similarity to background features like joints, construction joints, stains, repair marks, and shadows. Conventional convolutional neural networks simultaneously encode both defect targets and background information in the same feature space, leading to easy coupling between their feature responses. This makes it difficult for the network to distinguish between genuine cracks and pseudo-textures such as crack-like joints or stains. This interference is a significant reason for the high false detection rate in bridge surface defect detection.

[0004] While existing attention mechanisms can enhance the response of certain channels or spatial locations, they are essentially still being enhanced within the same coupled feature space. They do not effectively separate the morphology of the disease from the background pseudo-texture at the feature layer, thus making it difficult to eliminate the interference of the background pseudo-texture at its source.

[0005] Question 2: Multi-scale feature fusion does not distinguish between the contributions of morphological features and texture features, and morphological features are easily contaminated by background pseudo-textures.

[0006] Traditional Feature Pyramid Networks (FPNs) and their variants fuse features from different levels through channel concatenation (Concat) or element-wise addition (Add). However, these fusion methods do not distinguish the contributions of features from different sources. Since morphological features and texture features contribute differently to the disease detection task, this indiscriminate fusion method leads to useful morphological features being diluted by a large number of irrelevant background pseudo-textures, thereby weakening the ability to detect even very small disease targets.

[0007] Question 3: Minimal defects have weak optimization signals in traditional bounding box regression loss, which can easily lead to missed detections and inaccurate localization.

[0008] Conventional bounding box regression loss functions, such as the CIoU bounding box regression loss function, typically use geometric quantities such as the distance between the center points of the predicted and ground truth bounding boxes and the aspect ratio, and normalize them using a larger scale, such as the diagonal of the smallest bounding rectangle covering both boxes. For extremely small lesions with a width of only 1-2 pixels, this normalization method significantly reduces the contribution of their positional and dimensional deviations to the loss, resulting in weak gradient signals during backpropagation. Especially when the initial overlap between the predicted and ground truth bounding boxes is very low, traditional bounding box regression loss functions struggle to provide stable and effective gradient signals, easily leading to missed detections and inaccurate localization. Summary of the Invention

[0009] To address the problems existing in the prior art, the present invention aims to propose a method and system for detecting bridge apparent diseases based on morphological-textural decoupling and dual-stream fusion. The full English title of the method is Morphological-Textural Decoupled and Dual-Stream Fused YOLO for Bridge Apparent Disease Detection, abbreviated as MTDDF-YOLO. This invention aims to solve the core problems of false detection of disease targets and avoiding missed detection of extremely small disease targets by effectively decoupling the morphology of bridge apparent diseases from the background pseudo-texture at the feature level. Simultaneously, this invention has a small scale and low computational overhead, making it feasible for deployment on UAV-borne edge devices.

[0010] To achieve the above objectives, the present invention adopts the following technical solution: On the one hand, this invention provides a method for detecting apparent defects in bridges based on morphology-texture decoupling and dual-stream fusion, comprising: Acquire images of bridge surface defects collected by drones; Feature extraction is performed on the bridge surface defect images to obtain multi-scale feature maps; To address the problem that bridge surface damage images often exhibit highly similar morphological features to background pseudo-textures, making them difficult to distinguish using conventional networks, this invention inputs the multi-scale feature map into the morphology-texture decoupled attention module (MTDA). Two independent 1×1 convolutions project the input features into the morphological and texture subspaces, yielding morphological and texture features. The morphological features are then multiplied by the multi-scale morphological attention weights to obtain morphological enhancement features. Finally, background pseudo-texture responses in the texture features are actively suppressed to obtain texture suppression features. The morphological enhancement features and texture suppression features output by the morphological-texture decoupled attention module MTDA are used as morphological stream and texture stream, respectively, and input into the dual-stream adaptive gated fusion module DAGF. The morphological enhancement features and texture suppression features are dynamically weighted and fused through learnable gate weights to obtain a fused feature map. The fused feature map is input into the detection head, and bounding box regression and classification are performed respectively to output the location and category of the bridge's apparent defects; wherein, the loss function of the bounding box regression is the complete bounding box regression loss function.

[0011] Preferably, the morphology-texture decoupling attention module MTDA further includes: applying orthogonal regularization constraints to the morphology enhancement features and the texture suppression features, so that they tend to be approximately orthogonal in the feature space; the orthogonal regularization constraints are implemented through regularization loss, which is constructed using the square of cosine similarity.

[0012] Preferably, the texture features are used to generate channel attention weights through Global Average Pooling (GAP), a first multilayer perceptron (MLP_1), and a sigmoid function. and apply to the texture features The operation actively suppresses the background pseudo-texture response, resulting in texture suppression features.

[0013] Preferably, the morphological features are processed using 3×3 dilated convolution kernels with dilation rates of 1, 3, and 5, respectively, to obtain morphological features at three different scales. The morphological features at these three scales are then concatenated along the channel dimension and subjected to 1×1 convolution and a sigmoid function to generate multi-scale morphological attention weights. The multi-scale morphological attention weights The morphological features are multiplied element by element to obtain the morphological enhancement features.

[0014] Preferably, the dual-stream adaptive gated fusion module DAGF performs global context encoding on the morphological enhancement features and the texture suppression features through global average pooling (GAP), and generates gate weights using a second multilayer perceptron (MLP_2) and a Softmax function, so as to dynamically adjust the fusion ratio of the morphological enhancement features and the texture suppression features according to the gate weights.

[0015] Preferably, a Dice coefficient is introduced, and a DiceIoU bounding box regression loss function is constructed based on the Dice coefficient. The complete bounding box regression loss function is a linear combination of the CIoU bounding box regression loss function and the DiceIoU bounding box regression loss function.

[0016] More preferably, the gradient of the DiceIoU bounding box regression loss function with respect to the intersection-union ratio (IoU) of the predicted box and the ground truth box is bounded in the IoU range [0,1], with the upper bound being 2.

[0017] Preferably, the bridge surface defects include at least one of cracks, spalling, exposed reinforcement, and honeycomb pitting; the background pseudo-texture includes at least one of concrete joints, construction joints, repair marks, and stains.

[0018] On the other hand, the present invention provides a bridge appearance defect detection system based on morphology-texture decoupling and dual-stream fusion, for implementing the method described herein, the system comprising: The image acquisition module is used to receive images of bridge surface defects collected by drones; The backbone network is used to extract features from the bridge's apparent defects images to obtain multi-scale feature maps; The morphology-texture decoupling attention module (MTDA) is used to decouple the morphology of the disease from the pseudo-texture of the background in the multi-scale feature map; multiply the morphological features by the multi-scale morphological attention weights to obtain morphological enhancement features; and apply a morphological attention weight to the texture features. The operation actively suppresses background pseudo-texture responses, resulting in texture suppression features; The dual-stream adaptive gated fusion module (DAGF) is used to dynamically weight and fuse the morphological enhancement features and the texture suppression features to obtain a fused feature map. The detection head is used to perform bounding box regression and classification on the fused feature map, and output the location and category of the disease target.

[0019] Compared with the prior art, the present invention has the following advantages: 1. This invention utilizes a complete technical chain, including backbone network feature extraction, decoupling processing of the morphology-texture decoupling attention module MTDA, fusion processing of the dual-stream adaptive gating fusion module DAGF, and detection head output. It can be directly applied to UAV bridge surface defect detection scenarios and does not rely on a specific backbone network structure, exhibiting good versatility. Compared to traditional methods, this invention reduces the risks of false detection of defects due to background pseudo-texture interference and missed detection of extremely small defects from three levels: feature decoupling, dual-stream adaptive fusion, and DiceIoU bounding box regression loss, significantly improving overall detection accuracy.

[0020] 2. By using the Morphology-Texture Decoupling Attention Module (MTDA), the morphology of the disease and the background pseudo-texture are explicitly decoupled at the feature level, and through... This invention actively suppresses background pseudo-texture responses. Compared to existing attention mechanisms that only enhance feature responses, this invention weakens background pseudo-texture interference at its source, improving the ability to identify disease targets. Simultaneously, orthogonal regularization constraints prevent the morphological and texture branches from degenerating into learning similar or repetitive features. Based on the dual-branch structure, this further strengthens the functional differentiation between the two branches, prompting the morphological branch to focus on learning disease morphology, and the texture branch to concentrate on suppressing background pseudo-texture responses.

[0021] 3. The Dual-Stream Adaptive Gated Fusion (DAGF) module enables dynamic weighted fusion of morphological enhancement and texture suppression features with minimal parameter count. Compared to the fixed Concat or Add operations in traditional FPN, the DAGF learns to dynamically adjust the feature fusion ratio by adjusting the gating weights, thus improving the effectiveness of dual-stream fusion.

[0022] 4. By constructing the DiceIoU bounding box regression loss function and linearly combining it with the CIoU bounding box regression loss function, a complete bounding box regression loss function is formed, balancing convergence speed and the localization sensitivity of minimal defects. The DiceIoU bounding box regression loss function possesses gradient boundedness, with an upper bound of 2. This property alleviates the problem of weak gradients and weak optimization signals for minimal defects during the regression process.

[0023] 5. This invention maintains a small scale and low computational overhead, and is feasible for real-time inference on UAV edge devices. Compared to solutions with the same level of accuracy, this invention is more suitable for deployment in mobile or low-power scenarios such as bridge surface defect inspection. Attached Figure Description

[0024] Figure 1 This is a diagram of the overall structure of MTDDF-YOLO.

[0025] Figure 2 Structure diagram of the MTDA (Metamorphic-Texture Decoupled Attention Module).

[0026] Figure 3 This is a structural diagram of the dual-stream adaptive gating fusion module DAGF. Detailed Implementation

[0027] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments.

[0028] The method of this invention is based on an improvement of YOLOv8n. It achieves the detection of bridge surface defects by introducing the morphology-texture decoupled attention module MTDA, the dual-stream adaptive gating fusion module DAGF, and the DiceIoU bounding box regression loss function.

[0029] like Figure 1 As shown in the figure, this embodiment provides a bridge appearance defect detection method based on morphology-texture decoupling and dual-stream fusion. Its overall structure mainly consists of three parts: backbone network, neck network and detection head.

[0030] The backbone network is used to extract features from the input UAV bridge surface defect images to obtain multi-scale feature maps. In this embodiment, the backbone network uses an improved cross-stage partial connection structure (CSP) for feature extraction, and after the feature extraction stages corresponding to the three feature levels P3, P4, and P5, a morphology-texture decoupling attention module (MTDA) is introduced. Here, P3, P4, and P5 represent three feature levels of the backbone network with different resolutions. Specifically, P3 represents a high-resolution, shallow feature level; P4 represents a medium-resolution, intermediate feature level; and P5 represents a low-resolution, deep feature level.

[0031] In this embodiment, the multi-scale feature map refers to multiple feature maps output from the same input bridge appearance defect image after passing through the feature extraction stages corresponding to the P3, P4, and P5 feature levels in the backbone network. Specifically, the feature extraction stage corresponding to the P3 feature level outputs a high-resolution feature map; the feature extraction stage corresponding to the P4 feature level outputs a medium-resolution feature map; and the feature extraction stage corresponding to the P5 feature level outputs a low-resolution feature map.

[0032] In this embodiment, each morphology-texture decoupling attention module (MTDA) receives the feature map output from the current feature level and uses it as input feature F. On the one hand, it outputs morphology enhancement features and texture suppression features, which are input to the neck network as morphology stream and texture stream, respectively. On the other hand, it outputs features... It continues to participate in the forward propagation of the backbone network in subsequent stages, thereby ensuring that the backbone information of the backbone network is not interrupted.

[0033] The neck network is used to fuse the morphological and texture flows at each feature level. In this embodiment, the neck network uses a dual-stream adaptive gated fusion module (DAGF) instead of the traditional channel splicing operation in the fusion nodes corresponding to each feature level. The DAGF dynamically weights and fuses the morphological enhancement features and texture suppression features from the MTDA using learnable gated weights to obtain a fused feature map. Simultaneously, the DAGF preserves the cross-level connections of upsampling and downsampling in the Feature Pyramid Network (FPN) and Path Aggregation Network (PAN) structures.

[0034] The detection head is used to perform bounding box regression and classification on the fused feature map, outputting the location and category of the bridge's apparent defects. In this embodiment, the loss function for bounding box regression is the complete bounding box regression loss function, which is a linear combination of the CIoU bounding box regression loss function and the DiceIoU bounding box regression loss function.

[0035] The following is combined with Figure 2 The morphology-texture decoupling attention module MTDA is described in detail.

[0036] In this embodiment, the feature map output by the backbone network at a certain feature level serves as the input feature of the morphology-texture decoupled attention module (MTDA) corresponding to that feature level. Bridge surface defects include at least one of cracks, spalling, exposed reinforcement, and honeycomb pitting; background pseudo-textures include at least one of concrete joints, construction joints, repair marks, and stains. Based on this, defect morphology refers to the shape, outline, and spatial distribution characteristics of the bridge surface defects in the image. Decoupling refers to separating the defect morphology from the background pseudo-texture in the feature map.

[0037] In this embodiment, the MTDA projects the input features to the morphological subspace and the texture subspace through two independent 1×1 convolutions to obtain morphological features and texture features; the morphological features are multiplied by the multi-scale morphological attention weights to obtain morphological enhancement features; and the background pseudo-texture response in the texture features is actively suppressed to obtain texture suppression features.

[0038] It should be noted that the MTDA achieves decoupling between the morphology of the lesion and the pseudo-texture of the background by projecting the input features to the morphological subspace and the texture subspace. This decoupling process does not directly apply computation to the abstract subspace, but rather generates morphological enhancement features and texture suppression features through structural morphological and texture branches, respectively. Then, during training, orthogonal regularization constraints are applied to the morphological enhancement features and the texture suppression features to make them approximately orthogonal in the feature space, thereby achieving decoupling between the morphology of the lesion and the pseudo-texture of the background at the feature level.

[0039] The MTDA consists of three parts: a feature decomposition layer, a two-branch attention transformation layer, and a cross-branch regularization layer.

[0040] (1) Eigenvalue decomposition layer In this embodiment, the feature decomposition layer is used to project the input features onto the morphological subspace and the texture subspace through two independent 1×1 convolutions to obtain morphological features and texture features. The projection process can be represented as follows: Where F represents the input feature, and its shape is C×H×W, where C is the number of channels, H is the height, and W is the width; and These represent two independent 1×1 convolutions, each with C' output channels, where C' = C / 2; BN represents batch normalization. This represents the GELU activation function; Indicates morphological characteristics, The texture features are represented by the shape C'×H×W.

[0041] Through the above projection, the input feature F is mapped to morphological features. and texture features The aforementioned This will enter the morphological branch, the... We will then proceed to the texture branch for subsequent dual-branch attention transformation.

[0042] (2) Two-branch attention transformation layer In this embodiment, the dual-branch attention transformation layer includes a morphological branch and a texture branch. The morphological branch multiplies the morphological features by multiplying them with multi-scale morphological attention weights to obtain morphological enhancement features; the texture branch actively suppresses background pseudo-texture responses in the texture features to obtain texture suppression features.

[0043] Morphological branching In this embodiment, the morphological features are processed using 3×3 dilated convolution kernels with dilation rates of 1, 3, and 5, respectively, to obtain morphological features at three different scales. These three scales of morphological features are then concatenated along the channel dimension and subjected to 1×1 convolution and a sigmoid function to generate multi-scale morphological attention weights. The multi-scale morphological attention weights The morphological enhancement feature is obtained by multiplying it element-by-element by the morphological feature. The specific implementation steps are as follows: First, the morphological features are processed using 3×3 dilated convolution kernels with dilation rates of 1, 3, and 5, respectively, to obtain morphological features at three different scales. The processing can be represented as follows: in, Indicates morphological characteristics; This represents a 3×3 dilated convolution kernel; r represents the porosity. r=1 corresponds to a 3×3 receptive field, suitable for capturing extremely fine cracks of 1-2 pixels; r=3 corresponds to a 7×7 receptive field, suitable for capturing medium-width cracks of 2-5 pixels; r=5 corresponds to an 11×11 receptive field, suitable for capturing wider cracks and peeling edges. This yields morphological features at three different scales. .

[0044] Subsequently, the morphological features at the three scales are concatenated along the channel dimension, and then multi-scale morphological attention weights are generated by 1×1 convolution and the Sigmoid function. Its generation process can be represented as: Specifically, the first step is to use the Concat operation to combine the morphological features of the three scales. By splicing along the channel dimension, a tensor with the shape 3C'×H×W is obtained; The second step is to use a 1×1 convolution to compress the number of channels of the tensor to match the morphological features. The number of channels is the same, i.e., C'; The third step is to output multi-scale morphological attention weights using the Sigmoid function. Its shape is C'×H×W.

[0045] Furthermore, the multi-scale morphological attention weights It integrates the morphological features of the three scales. Regarding the morphological features... At a certain location, if that location is captured by the receptive field of the dilated convolution kernel at all scales, then the value at that location is... A value close to 1 indicates that the location was not captured by the receptive field. The value is close to 0.

[0046] Finally, the multi-scale morphological attention weights Element-wise multiplication with the morphological features yields the morphological enhancement features, which can be represented as: in, This indicates a morphological enhancement feature with a shape of C'×H×W; symbol This indicates element-wise multiplication.

[0047] Texture branches In this embodiment, the texture features are used to generate channel attention weights through Global Average Pooling (GAP), a first multilayer perceptron (MLP_1), and a sigmoid function. and apply to the texture features The process involves actively suppressing background pseudo-texture responses to obtain texture suppression features. The specific implementation steps are as follows: First, perform global average pooling (GAP) on the texture features to obtain a C'-dimensional vector. The It can be represented as: in, Represents texture features.

[0048] Subsequently, the vector is processed by the first multilayer perceptron MLP_1. Channel compression and restoration are performed, and the channel attention weights are obtained using the Sigmoid function. ; Let C' be a C'-dimensional vector, and the range of values ​​for each element be... This indicates the degree to which each channel belongs to the background pseudo-texture. It can be represented as: The structure of the first multilayer perceptron MLP_1 is as follows: Furthermore, during training, the texture branch learns to automatically determine which feature channels tend to respond to background pseudo-textures, and adjusts the corresponding features of these channels accordingly. A value close to 1; makes the corresponding channel of the background pseudo-texture not belong to the background pseudo-texture. The value is close to 0.

[0049] Finally, apply to the texture features The operation actively suppresses background pseudo-texture responses, resulting in texture suppression features. Specifically, The operation can be represented as: in, This means subtracting the channel attention weight from 1. That is, the attention weight of the channel. Perform element-wise inversion; Let C' be a C'-dimensional vector, and the range of values ​​for each element be... This indicates the degree to which each channel does not belong to the background pseudo-texture; symbol express With the texture features Element-wise multiplication; the resulting texture suppression features Its shape is C'×H×W.

[0050] Furthermore, through the aforementioned The operation actively suppresses background pseudo-texture responses. This differs from the enhancement operations in conventional attention mechanisms: when Approaching 1, A value close to 0 indicates that the response of this channel to background pseudo-textures is almost suppressed; when... Approaching 0 A value close to 1 indicates that the channel does not belong to the background pseudo-texture, and its features are almost preserved as is. This design directly solves the special need for the weakening of background pseudo-textures in the detection of bridge surface defects.

[0051] (3) Cross-branch orthogonal regularization layer To avoid the morphological branch and the texture branch learning similar or repetitive features, this embodiment applies orthogonal regularization constraints to the morphological enhancement features and the texture suppression features, making them approximately orthogonal in the feature space; the orthogonal regularization constraints are implemented through regularization loss, which is constructed using the square of cosine similarity.

[0052] Cosine similarity is defined as: in, Indicates morphological enhancement features, Indicates texture suppression features; express and Frobenius inner product; , They represent and The Frobenius norm.

[0053] For ease of optimization, in this embodiment, the square of the cosine similarity is used as the regularization loss. The It can be represented as: The cosine similarity directly measures the similarity between two feature directions. When the two feature directions are aligned, the cosine similarity is 1; when they are opposite, the cosine similarity is -1; and when they are orthogonal, the cosine similarity is 0. Squaring the cosine similarity maps positive and negative cosine similarities to positive values, with the minimum value occurring when the two feature directions are orthogonal. Therefore, minimizing the regularization loss... This will force the morphological enhancement features With the texture suppression feature They tend to be approximately orthogonal, that is, they tend to be dissimilar.

[0054] In this embodiment, by minimizing the regularization loss This enhances the morphological features. With the texture suppression feature The process of moving towards approximate orthogonality constitutes an orthogonal regularization constraint. This orthogonal regularization constraint prevents the morphological branch and the texture branch from degenerating into learning similar or repetitive features. Based on the dual-branch structure, it further strengthens the functional differentiation between the two branches, prompting the morphological branch to focus on learning disease morphology, and the texture branch to focus on suppressing background pseudo-textures.

[0055] Furthermore, after completing the feature decomposition, bi-branch attention transformation, and cross-branch orthogonal regularization, the MTDA obtains the output features through channel concatenation and residual connection. The It can be represented as: in, This represents the morphological enhancement feature output by the morphological branch. and the texture suppression features output by the texture branch The splicing is performed along the channel dimension. Due to the aforementioned... and stated The number of channels in each feature is C', where C' = C / 2. The number of channels after concatenation is 2C' = C, which is consistent with the number of channels in the input feature F. Therefore, residual concatenation can be performed with the input feature F to prevent information loss. The resulting output feature Its shape is C×H×W.

[0056] Furthermore, the MTDA generates output features At the same time, its internal morphological enhancement features Texture suppression features The morphological and texture flows are respectively fed into the neck network for subsequent adaptive gating fusion by DAGF. The output features... Then it will continue to participate in the forward propagation of the backbone network in subsequent stages.

[0057] In this embodiment, the MTDA is obtained by using... This operation actively suppresses background pseudo-texture responses, unlike conventional attention enhancement mechanisms. Simultaneously, the orthogonal regularization constraint enhances the morphological features. With the texture suppression feature It tends to be approximately orthogonal, thereby achieving explicit decoupling between the morphology of the disease and the pseudo-texture of the background.

[0058] The following is combined with Figure 3 This paper provides a detailed description of the dual-stream adaptive gating fusion module DAGF.

[0059] In this embodiment, the morphological enhancement features from different feature levels are assumed to be... Texture suppression features are Their shapes are all C'×H×W. Where L represents the feature level, L=1, 2, 3 correspond to feature levels P3, P4, and P5, respectively.

[0060] The dual-stream adaptive gated fusion module DAGF enhances the morphological features through global average pooling (GAP). With the texture suppression feature Global context encoding is performed, and learnable gating weights are generated by a second multilayer perceptron (MLP_2) and a softmax function; the morphological enhancement features are then applied using these learnable gating weights. With the texture suppression feature Dynamic weighted fusion is performed to obtain a fused feature map. The specific implementation steps are as follows: First, the morphological enhancement features are applied using Global Average Pooling (GAP). and the texture suppression feature Global context encoding is performed to obtain a global context vector, which can be represented as: in, Indicates the The global context vector obtained after GAP; Indicates the The global context vector obtained after GAP; and They are all vectors of dimension C'.

[0061] Subsequently, the gating weights are generated by the second multilayer perceptron MLP_2 and the Softmax function.

[0062] Specifically, the first step is to... and By concatenating the vectors along the channel dimension, a C-dimensional vector Z is obtained, which can be represented as: Where C = 2C'; symbol This indicates splicing along the channel dimension.

[0063] The second step involves inputting the C-dimensional vector Z into the second multilayer perceptron MLP_2, and generating learnable gating weights through the Softmax function. These learnable gating weights can be expressed as: in, Indicating the morphological enhancement feature The corresponding gating weights; This indicates the texture suppression feature. The corresponding gating weights, and satisfying The structure of the second multilayer perceptron MLP_2 is as follows: Finally, the learnable gating weights are used to enhance the morphological features. With the texture suppression feature Dynamic weighted fusion is performed to obtain a fused feature map, which can be represented as: in, This represents a fused feature map, the shape of which is related to the morphological enhancement feature. and the texture suppression feature They all have the same shape, which is C'×H×W.

[0064] The following section provides a detailed explanation of the DiceIoU bounding box regression loss function.

[0065] In this embodiment, the DiceIoU bounding box regression loss function is used to address the problem of weak optimization signals and easy missed detection of minimal defects in bounding box regression.

[0066] Specifically, the Dice coefficient is introduced to construct the DiceIoU bounding box regression loss function.

[0067] The Dice coefficient is defined as follows: in, Indicates the prediction box. Indicates the area of ​​the predicted frame; Represents the true bounding box. Represents the actual area of ​​the bounding box; This represents the intersection area of ​​the predicted bounding box and the ground truth bounding box. The Dice coefficient is the ratio of the intersection area to the sum of the predicted bounding box area and the ground truth bounding box area. When the predicted bounding box and the ground truth bounding box completely overlap, When the predicted bounding box and the ground truth bounding box do not intersect, .

[0068] The DiceIoU bounding box regression loss function is defined as follows: When the predicted bounding box completely overlaps with the ground truth bounding box When the predicted bounding box and the ground truth bounding box do not intersect, .

[0069] Furthermore, let t be the intersection-union ratio (IoU) between the predicted bounding box and the ground truth bounding box. This embodiment demonstrates the boundedness of the gradient of the DiceIoU bounding box regression loss function, namely: the gradient of the DiceIoU bounding box regression loss function with respect to t is bounded in the range [0,1] of t, with the upper bound being 2.

[0070] A brief proof of the above properties is as follows: Let t be the intersection-union ratio (IoU) between the predicted bounding box and the ground truth bounding box. Let X be the area of ​​the intersection of the predicted bounding box and the ground truth bounding box, a be the area of ​​the predicted bounding box, and b be the area of ​​the ground truth bounding box. Then: From the above equation, we can obtain: Substituting into the definition of the Dice coefficient, we get: Based on the definition of the DiceIoU bounding box regression loss function, we obtain: From the above formula, we can see that Let be a univariate function with respect to t, and let be the gradient of the DiceIoU bounding box regression loss function with respect to t, i.e., the derivative of the DiceIoU bounding box regression loss function with respect to t. Therefore, find . The derivative with respect to t yields: In the above formula, This represents the gradient of the DiceIoU bounding box regression loss function with respect to t.

[0071] Taking the absolute value of this gradient, we get: because ,so: When t=0, That is, the DiceIoU bounding box regression loss function The absolute value of the gradient with respect to t reaches a maximum of 2.

[0072] Therefore, the gradient of the DiceIoU bounding box regression loss function with respect to t is bounded in the interval [0,1] of t, with the upper bound being 2. Q.E.D.

[0073] Furthermore, in the detection of extremely small defects, especially cracks with a pixel width of only 1-2 pixels, the predicted bounding boxes and ground truth bounding boxes often have very low overlap in the early stages of training, meaning the IoU is often close to 0. In this case, if the gradient of the bounding box regression loss function with respect to IoU is too weak or tends to vanish, it will be difficult to effectively correct the predicted bounding boxes. However, as demonstrated above, the absolute value of the gradient of the DiceIoU bounding box regression loss function remains 2 even in the extreme case of t=0, providing a stable gradient signal and avoiding the problem of gradient vanishing. Therefore, this embodiment can ensure that extremely small defects continuously obtain effective optimization signals during training, reducing the risk of missed detections.

[0074] In this embodiment, the complete bounding box regression loss function is a linear combination of the CIoU bounding box regression loss function and the DiceIoU bounding box regression loss function, and its expression is: in, Represents the regression loss function for the complete bounding box; This represents the CIoU bounding box regression loss function, which is a type of bounding box regression loss function in the prior art, namely the complete intersection-union bounding box regression loss function; DiceIoU represents the bounding box regression loss function; and These are the weighting coefficients for the two, respectively. In this embodiment, we take... =0.5, =0.5.

[0075] Total loss function In this embodiment, the total loss function consists of three parts: classification loss, the full bounding box regression loss function, and the regularization loss. The total loss function can be expressed as: in, Represents the total loss function; Indicates classification loss; Represents the regression loss function for the complete bounding box; γ represents the regularization loss; γ is the weighting coefficient that controls the strength of the orthogonal regularization constraint. If γ is too small, the orthogonal regularization constraint is insufficient; if γ is too large, the feature expression is over-restricted. In this embodiment, γ is set to 0.01.

[0076] A Bridge Appearance Defect Detection System Based on Morphology-Texture Decoupling and Dual-Stream Fusion The above describes in detail a bridge appearance defect detection method based on morphology-texture decoupling and dual-stream fusion. This embodiment also provides a bridge appearance defect detection system based on morphology-texture decoupling and dual-stream fusion for implementing the method. The system includes: The image acquisition module is used to receive images of bridge surface defects collected by drones; The backbone network is used to extract features from the bridge's apparent defects images to obtain multi-scale feature maps; The morphology-texture decoupling attention module (MTDA) is used to decouple the morphology of the disease from the pseudo-texture of the background in the multi-scale feature map; multiply the morphological features by the multi-scale morphological attention weights to obtain morphological enhancement features; and apply a morphological attention weight to the texture features. The operation actively suppresses background pseudo-texture responses, resulting in texture suppression features; The dual-stream adaptive gated fusion module (DAGF) is used to dynamically weight and fuse the morphological enhancement features and the texture suppression features to obtain a fused feature map. The detection head is used to perform bounding box regression and classification on the fused feature map, and output the location and category of the disease target.

[0077] In this embodiment, the specific implementation methods of the image acquisition module, the backbone network, the morphology-texture decoupled attention module MTDA, the dual-stream adaptive gating fusion module DAGF, and the detection head are the same as those of the corresponding steps in the above method embodiments, and will not be repeated here.

[0078] Experimental Design In this embodiment, to verify the effectiveness of the bridge surface defect detection method and system based on morphology-texture decoupling and dual-stream fusion, a bridge surface defect dataset was constructed and multiple sets of experiments were conducted.

[0079] In this embodiment, the bridge apparent defect dataset is constructed as follows: Images were captured using a DJI Matrice 300 RTK drone equipped with a Zenmuse P1 camera. This camera features a 45-megapixel full-frame sensor. Images were acquired at six in-service concrete bridges, with a flight distance of 0.5-3 meters. The images have a resolution of 5472×3648 and were captured using a 50% overlap ratio, resulting in a total of 12,426 original images.

[0080] After manual screening, cropping, and annotation, the dataset contains 38,904 bounding boxes. These include: 23,946 cracks, 10,048 spallings, 3,194 exposed rebars, and 1,716 honeycomb defects. The area distribution of the bounding boxes is as follows: extremely small defects (less than 16px × 16px) account for 21.4%; small defects (between 16px × 16px and 32px × 32px) account for 45.9%; medium-sized defects (between 32px × 32px and 96px × 96px) account for 24.7%; and large defects (greater than 96px × 96px) account for 8.0%. The average bounding box width for cracks is only 2.7 pixels, with an aspect ratio ranging from 1:3 to 1:50, indicating that this dataset contains a large number of extremely small defects.

[0081] The data was divided into training, validation, and test sets in a 7:2:1 ratio. The training set contained 8698 images, the validation set contained 2485 images, and the test set contained 1243 images.

[0082] In this embodiment, the training strategy is set as follows: Data augmentation strategies were employed during training, including Mosaic enhancement, random flipping, and HSV color gamut transformation. The experimental environment used the PyTorch 2.0 framework, with a single NVIDIA RTX 4090 GPU (24GB VRAM) and CUDA version 11.8. The input image resolution was uniformly set to 640×640. All comparison methods were reproduced under the same conditions or trained using official open-source code to ensure fairness in the comparisons.

[0083] The evaluation metrics adopted are COCO standard metrics, including mean accuracy (mAP@0.5), mAP@0.5:0.95, number of parameters (Params), and floating-point operations (FLOPs). In addition, Crack-AP@0.5 is reported separately for the crack subclass. It should be noted that Crack-AP represents the average accuracy metric for the crack category, calculated separately for the crack target under the condition of IoU of 0.5. All accuracy metrics are reported on the test set.

[0084] Training was performed using the SGD optimizer with a momentum coefficient of 0.937 and a weight decay coefficient of 5 × 10⁻⁶. -4 The initial learning rate was 0.01, and a cosine annealing scheduling strategy was used, eventually reducing the learning rate to 0.0001. The batch size was 16, and a total of 200 epochs were trained, with the first 3 epochs using a linear warm-up strategy.

[0085] Experimental Results Analysis In this embodiment, ablation experiments were conducted to verify the technical contributions and synergistic effects of the morphology-texture decoupled attention module MTDA, the two-stream adaptive gating fusion module DAGF, and the DiceIoU bounding box regression loss function. The experimental results are shown in Table 1.

[0086] Table 1 Ablation Experiment Results for Each Module Experiment 1b is an ablation experiment of texture branches in the MTDA, in which the original texture branches in the MTDA are ablated. Operation replaced with regular The operation and other settings are the same as in Experiment 1.

[0087] As shown in Table 1: MTDA ablation analysis A comparison of Experiments 0 and 1 shows that, after introducing MTDA alone, mAP@0.5 increased from 83.5% to 86.1%, a 2.6 percentage point improvement; simultaneously, Crack-AP increased from 71.2% to 76.8%, a 5.6 percentage point improvement. The improvement in Crack-AP is significantly greater than the improvement in overall mAP, indicating that MTDA has a targeted optimization capability for crack categories, and also verifying that the morphology-texture decoupling mechanism can effectively reduce false detections caused by background pseudo-textures. Furthermore, the additional parameters introduced by MTDA only increase by 0.46M, and FLOPs increase by 1.1G, with computational overhead remaining within a controllable range.

[0088] Ablation Analysis of Texture Branch Suppression Mechanism in MTDA A comparison between Experiment 1 and Experiment 1b shows that the MTDA texture branch... The suppression operation is replaced with the regular one. After enhancement, mAP@0.5 decreased from 86.1% to 84.2%, a reduction of 1.9 percentage points; Crack-AP decreased from 76.8% to 72.9%, a reduction of 3.9 percentage points. These results demonstrate that actively suppressing background pseudo-texture responses is a key design feature for improving the performance of the MTDA. Enhancing only texture features actually exacerbates background pseudo-texture interference, further proving... The necessity of the operation.

[0089] DAGF ablation analysis The comparison between Experiment 0 and Experiment 2 shows that, after introducing the DAGF alone, mAP@0.5 increased from 83.5% to 85.3%, an improvement of 1.8 percentage points; Crack-AP increased from 71.2% to 75.1%, an improvement of 3.9 percentage points. Meanwhile, the parameter increment was only 0.17M, indicating that the DAGF can achieve a significant performance improvement with a very small parameter increment.

[0090] DiceIoU Bounding Box Regression Loss Function Ablation Analysis The comparison between Experiment 0 and Experiment 3 shows that, by using the DiceIoU bounding box regression loss function alone, mAP@0.5 increased from 83.5% to 84.9%, an improvement of 1.4 percentage points; Crack-AP increased from 71.2% to 74.5%, an improvement of 3.3 percentage points. Since the DiceIoU bounding box regression loss function does not increase the number of parameters or inference computation, this performance gain represents a zero-cost accuracy improvement.

[0091] Synergistic effect analysis of MTDA and DAGF The comparison between Experiment 4 and Experiments 0, 1 and 2 shows that after introducing MTDA and DAGF simultaneously, mAP@0.5 reached 88.7%, an increase of 5.2 percentage points from the baseline; Crack-AP reached 82.4%, an increase of 11.2 percentage points from the baseline.

[0092] It is worth noting that the synergistic gain of the MTDA and DAGF is 5.2 percentage points, which is greater than the sum of their individual gains, i.e., 2.6 percentage points plus 1.8 percentage points, totaling 4.4 percentage points. This result indicates that the high-quality bi-branch feature flow obtained by decoupling the MTDA provides a better input for the adaptive fusion of the DAGF, and the two form a significant synergistic effect.

[0093] Regularized loss ablation analysis A comparison between Experiment 5 and Experiment 6 shows that, based on the MTDA, DAGF, and DiceIoU bounding box regression loss functions, the addition of the regularization loss function further enhances the results. Subsequently, mAP@0.5 increased from 89.9% to 91.2%, an improvement of 1.3 percentage points; Crack-AP increased from 85.1% to 88.0%, an improvement of 2.9 percentage points. These results validate the necessity of the proposed orthogonal regularization constraint.

[0094] Overall effect of the complete solution Compared to the baseline YOLOv8n, the complete solution in this embodiment achieves a 7.7 percentage point improvement in mAP@0.5, a 5.8 percentage point improvement in mAP@0.5:0.95, and a 16.8 percentage point improvement in Crack-AP. The number of parameters only increased from 3.01M to 3.64M, an increase of 0.63M; FLOPs increased from 8.1G to 10.9G, an increase of 2.8G. These results demonstrate that the bridge surface defect detection method and system based on morphology-texture decoupling and dual-stream fusion, while maintaining a lightweight design, achieves a significant improvement in the detection performance of bridge surface defects, especially minute defects such as cracks.

[0095] Quantitative verification of decoupling orthogonality To further verify the decoupling effect of the MTDA, this embodiment calculates the average cosine similarity of the output feature vectors of its morphological branch and texture branch on the test set.

[0096] The results show that the cosine similarity of the output feature vector of the MTDA is 0.132±0.041; after replacing the MTDA with the convolutional block attention module CBAM, the corresponding cosine similarity is 0.298±0.067; and under the condition of not using the MTDA and not applying the orthogonal regularization constraint, the cosine similarity is 0.352±0.073.

[0097] Therefore, it can be seen that the MTDA significantly reduces the feature similarity between morphological branches and texture branches, and quantitatively proves that the orthogonal regularization constraint can effectively promote the decoupling of disease morphology and background pseudo-texture.

[0098] Furthermore, in this embodiment, the MTDDF-YOLO was compared with several mainstream detection methods, and the experimental results are shown in Table 2.

[0099] Table 2. Experimental results compared with mainstream detection methods method mAP@0.5(%) mAP@0.5:0.95(%) Crack-AP(%) Recall(%) Params(M) FLOPs(G) FPS Faster R-CNN (ResNet50) 78.3 43.6 63.4 71.5 41.5 207.1 18 YOLOv5s 81.7 46.2 68.9 74.8 7.01 15.8 125 YOLOv7-tiny 82.4 47.1 70.2 75.3 6.02 13.2 143 RT-DETR (ResNet18) 84.8 49.8 74.1 78.6 20.3 56.9 72 YOLOv8n (baseline) 83.5 48.3 71.2 76.1 3.01 8.1 215 YOLOv11n 84.2 49.0 73.5 77.4 2.62 6.3 238 YOLOv8n+CBAM 85.1 49.5 74.8 78.0 3.05 8.2 208 YOLOv8n+N-IoU 85.7 50.1 76.2 79.3 3.01 8.1 215 YOLOv8n+STA-Net decoupling 86.5 50.6 78.0 80.2 4.82 11.3 165 MTDDF-YOLO 91.2 54.1 88.0 84.9 3.64 10.9 182 As shown in Table 2: The MTDDF-YOLO reportedly significantly outperforms the baseline YOLOv8n across all accuracy metrics. Specifically, the average accuracy (Crack-AP) for the crack category shows the largest improvement, increasing from 71.2% to 88.0%, a 16.8 percentage point increase; mAP@0.5 improves from 83.5% to 91.2%, a 7.7 percentage point increase; and mAP@0.5:0.95 improves from 48.3% to 54.1%, a 5.8 percentage point increase. These results demonstrate that the present invention possesses significant targeted optimization capabilities for small-scale targets such as cracks.

[0100] Compared to YOLOv11n, the MTDDF-YOLO improves upon mAP@0.5 by 7.0 percentage points and Crack-AP by 14.5 percentage points. This demonstrates that iterative updates to a general architecture alone are insufficient to solve the technical problems addressed by this invention.

[0101] Compared to methods that only incorporate attention mechanisms, YOLOv8n+CBAM achieved an mAP@0.5 of 85.1%, an improvement of only 1.6 percentage points compared to the baseline, significantly lower than the 91.2% of MTDDF-YOLO. This demonstrates that simply introducing an attention mechanism cannot fundamentally solve the problem of the high similarity between the morphology of the disease and the appearance of the background pseudo-texture.

[0102] Compared to existing methods employing decoupling, the decoupled YOLOv8n+ Shape-Texture Attention Network STA-Net achieves an mAP@0.5 of 86.5%, which, while better than the baseline, is still significantly lower than the 91.2% of the MTDDF-YOLO. This indicates that the present invention has a more significant technical advantage over existing decoupling methods.

[0103] Compared to the method using the N-IoU loss function, YOLOv8n+N-IoU has an mAP@0.5 of 85.7%, which is lower than the 91.2% of MTDDF-YOLO. It should be noted that N-IoU is a bounding box regression loss function that combines Dice coefficients with IoU, which requires a relatively complex hyperparameter search. In contrast, the DiceIoU bounding box regression loss function in this invention can achieve better results under fixed weight conditions. Moreover, the gradient of the DiceIoU bounding box regression loss function with respect to IoU is bounded on the IoU value range [0,1], with an upper bound of 2. Therefore, it is simpler and more stable in practical applications.

[0104] Furthermore, the system has 3.64M parameters and an inference speed of 182 FPS, which significantly improves detection accuracy while maintaining high real-time performance, indicating that it is suitable for practical scenarios with high computing resources and real-time requirements.

[0105] Furthermore, to verify the cross-scenario generalization ability of the MTDDF-YOLO, generalization experiments were conducted on two publicly available datasets: the CrackTree260 pavement crack dataset and the RDD2022 road distress dataset. The experimental setup is as follows: During training, pre-training was performed on a self-built dataset, followed by fine-tuning for 50 epochs on the target dataset. The number of fine-tuning epochs was determined based on the early stopping strategy on the validation set. Furthermore, results of direct transfer to zero-shot datasets without any fine-tuning are also reported. Experimental results are shown in Table 3.

[0106] Table 3. Results of cross-dataset generalization experiments As shown in Table 3: On the CrackTree260 pavement crack dataset, the fine-tuned MTDDF-YOLO achieved a 10.8 percentage point improvement in mAP@0.5 compared to YOLOv8n; on the RDD2022 road distress dataset, the fine-tuned MTDDF-YOLO achieved a 7.5 percentage point improvement in mAP@0.5 compared to YOLOv8n.

[0107] It's worth noting that even under the Zero-shot setting (i.e., direct transfer without any fine-tuning), the MTDDF-YOLO still significantly outperforms YOLOv8n. This indicates that the morphology-texture decoupling in MTDDF-YOLO has stronger cross-domain transfer capabilities and is less sensitive to background pseudo-texture changes. After fine-tuning, the detection accuracy is further improved, and the number of epochs required for fine-tuning is relatively small, converging on the validation set after 50 epochs. This also reflects the good robustness of the pre-trained features.

[0108] Furthermore, in this embodiment, to determine the weight coefficient γ in the total loss function that controls the strength of the orthogonal regularization constraint, and the combined weight of the CIoU bounding box regression loss function and the DiceIoU bounding box regression loss function in the complete bounding box regression loss function, the following parameters are defined: Parameter sensitivity experiments were conducted.

[0109] First, fix = =0.5, and γ takes values ​​in {0.001,0.005,0.01,0.05,0.1}. The experimental results are shown in Table 4.

[0110] Table 4. Effect of γ value on detection performance γ 0.001 0.005 0.01 0.05 0.1 mAP@0.5(%) 90.3 90.8 91.2 90.5 89.7 Crack-AP(%) 86.5 87.3 88.0 87.1 85.8 As shown in Table 4, mAP@0.5 reaches its highest value of 91.2% when γ=0.01. Detection performance decreases regardless of whether γ is too large or too small. If γ is too small, the orthogonal regularization constraint is insufficient; if γ is too large, it excessively restricts feature expression. Therefore, this embodiment selects γ=0.01.

[0111] Furthermore, with γ fixed at 0.01, the combined weights of the CIoU bounding box regression loss function and the DiceIoU bounding box regression loss function in the complete bounding box regression loss function are examined. Combined weights Take values ​​from {0.3, 0.4, 0.5, 0.6, 0.7} and keep them constant. + =1.0. The experimental results are shown in Table 5.

[0112] Table 5. Impact of combined weights (λ1, λ2) on detection performance (λ1,λ2) (0.3,0.7) (0.4,0.6) (0.5,0.5) (0.6,0.4) (0.7,0.3) mAP@0.5(%) 90.1 90.6 91.2 90.4 89.8 Crack-AP(%) 86.2 87.1 88.0 86.8 86.0 As shown in Table 5, when = When the value is 0.5, the MTDDF-YOLO achieves the best results in both mAP@0.5 and Crack-AP metrics. This indicates that the optimal detection performance is achieved when the CIoU bounding box regression loss function and the DiceIoU bounding box regression loss function contribute in a balanced manner; any bias in the weights towards one side will weaken the overall detection performance.

[0113] The above sensitivity analysis results show that the values ​​of γ=0.01 and γ=0.01 selected in this embodiment are suitable for this purpose. = =0.5 is appropriate, and the MTDDF-YOLO can maintain high detection accuracy over a wide parameter range, further verifying its stability.

[0114] Furthermore, in this embodiment, to further examine the detection capability of the MTDDF-YOLO for cracks of different widths, a crack width stratified evaluation experiment was conducted. The experiment divided the crack defects in the test set into three subsets based on pixel width: 1-2 pixels corresponding to extremely fine cracks, 2-5 pixels corresponding to fine cracks, and greater than 5 pixels corresponding to wider cracks. Crack-AP@0.5 was calculated for each subset. The experimental results are shown in Table 6.

[0115] Table 6. Comparison of detection accuracy for different crack widths (Crack-AP@0.5(%)) Crack width range Target percentage YOLOv8n MTDDF-YOLO promote 1-2px 31.2 58.3 81.7 +23.4 2-5px 46.5 73.6 89.2 +15.6 >5px 22.3 82.5 93.1 +10.6 As shown in Table 6: The MTDDF-YOLO model shows the most significant improvement in extremely fine cracks of 1-2 pixels, increasing Crack-AP@0.5 by 23.4 percentage points, effectively mitigating the issue of baseline YOLOv8n missing detections of very small-scale cracks. As the crack width increases, the improvement gradually converges, but a significant positive gain is maintained across all width ranges.

[0116] The experimental results of crack width hierarchical evaluation are consistent with the multi-scale dilated convolution design in the MTDA. Specifically, the dilation rates r of 1, 3, and 5 correspond to different receptive field sizes, enabling the capture of crack morphologies of different widths. Furthermore, the DiceIoU bounding box regression loss function exhibits high sensitivity to extremely small defects, which also helps improve the detection accuracy of very fine cracks. These results verify that the present invention has a significant advantage in detecting extremely small defects.

[0117] Feasibility analysis of drone deployment In this embodiment, to evaluate the feasibility of the system's application on an UAV-borne edge device, deployment tests were conducted on an NVIDIA Jetson Orin NX (16GB) platform. TensorRT 8.6 was used to accelerate the system with FP16 precision quantization. FP16 represents 16-bit floating-point precision. The input image size remained 640×640. After quantization, the number of system parameters remained unchanged, while the floating-point computation (FLOPs) was effectively reduced. The single-frame inference time was approximately 18.7ms, corresponding to a processing frame rate of approximately 53 FPS, which is higher than the 25 FPS threshold typically required for real-time UAV detection, indicating that it meets the real-time detection requirements of UAVs. The average precision (mAP@0.5) decreased by less than 0.3 percentage points due to quantization, i.e., from 91.2% to 90.9%, a negligible loss of precision. Furthermore, the system parameter size is only 3.64M, allowing it to run directly on a low-power embedded processor without relying on cloud computing, providing good engineering feasibility for autonomous UAV inspection.

[0118] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for detecting apparent defects in bridges based on morphology-texture decoupling and dual-stream fusion, characterized in that, include: Acquire images of bridge surface defects collected by drones; Feature extraction is performed on the bridge surface defect images to obtain multi-scale feature maps; The multi-scale feature map is input into the morphology-texture decoupled attention module MTDA. The input features are projected to the morphology subspace and the texture subspace through two independent 1×1 convolutions to obtain morphology features and texture features. The morphology features are multiplied by the multi-scale morphology attention weights to obtain morphology enhancement features. Background pseudo-texture responses in the texture features are actively suppressed to obtain texture suppression features. The morphological enhancement features and texture suppression features output by the morphological-texture decoupled attention module MTDA are used as morphological stream and texture stream, respectively, and input into the dual-stream adaptive gated fusion module DAGF. The morphological enhancement features and texture suppression features are dynamically weighted and fused through learnable gate weights to obtain a fused feature map. The fused feature map is input into the detection head, and bounding box regression and classification are performed respectively to output the location and category of the bridge's apparent defects; wherein, the loss function of the bounding box regression is the complete bounding box regression loss function.

2. The detection method according to claim 1, characterized in that, The morphology-texture decoupling attention module MTDA further includes: applying orthogonal regularization constraints to the morphology enhancement features and the texture suppression features, so that they tend to be approximately orthogonal in the feature space; the orthogonal regularization constraints are implemented through regularization loss, which is constructed using the square of cosine similarity.

3. The detection method according to claim 1, characterized in that, The texture features are used to generate channel attention weights through global average pooling (GAP), a first multilayer perceptron (MLP_1), and a sigmoid function. and apply to the texture features The operation actively suppresses the background pseudo-texture response, resulting in texture suppression features.

4. The detection method according to claim 1, characterized in that, The morphological features are processed using 3×3 dilated convolution kernels with dilation rates of 1, 3, and 5, respectively, to obtain morphological features at three different scales. The morphological features at the three scales are concatenated along the channel dimension, and then multi-scale morphological attention weights are generated by 1×1 convolution and the Sigmoid function. ; The multi-scale morphological attention weight The morphological features are multiplied element by element to obtain the morphological enhancement features.

5. The detection method according to claim 1, characterized in that, The dual-stream adaptive gated fusion module DAGF performs global context encoding on the morphological enhancement features and the texture suppression features using global average pooling (GAP), and generates gate weights using a second multilayer perceptron (MLP_2) and a Softmax function to dynamically adjust the fusion ratio of the morphological enhancement features and the texture suppression features according to the gate weights.

6. The detection method according to claim 1, characterized in that, The Dice coefficient is introduced, and a DiceIoU bounding box regression loss function is constructed based on the Dice coefficient. The complete bounding box regression loss function is a linear combination of the CIoU bounding box regression loss function and the DiceIoU bounding box regression loss function.

7. The detection method according to claim 6, characterized in that, The gradient of the DiceIoU bounding box regression loss function with respect to the intersection-union ratio (IoU) between the predicted and ground truth boxes is bounded in the IoU range [0,1], with the upper bound being 2.

8. The detection method according to claim 1, characterized in that, The bridge surface defects include at least one of cracks, spalling, exposed reinforcement, and honeycomb pitting; the background pseudo-texture includes at least one of concrete joints, construction joints, repair marks, and stains.

9. A bridge surface defect detection system based on morphology-texture decoupling and dual-stream fusion, characterized in that, For implementing the method according to any one of claims 1 to 8, the system comprises: The image acquisition module is used to receive images of bridge surface defects collected by drones; The backbone network is used to extract features from the bridge's apparent defects images to obtain multi-scale feature maps; The morphology-texture decoupling attention module (MTDA) is used to decouple the morphology of the disease from the pseudo-texture of the background in the multi-scale feature map; multiply the morphological features by the multi-scale morphological attention weights to obtain morphological enhancement features; and apply a morphological attention weight to the texture features. The operation actively suppresses background pseudo-texture responses, resulting in texture suppression features; The dual-stream adaptive gated fusion module (DAGF) is used to dynamically weight and fuse the morphological enhancement features and the texture suppression features to obtain a fused feature map. The detection head is used to perform bounding box regression and classification on the fused feature map, and output the location and category of the disease target.

10. The detection system according to claim 9, characterized in that, The gradient of the DiceIoU bounding box regression loss function with respect to the intersection-union ratio (IoU) between the predicted and ground truth boxes is bounded in the IoU range [0,1], with the upper bound being 2.