Intelligent concrete crack detection method based on four-base coordinate attention enhancement
By using the QuadCoord-YOLO network architecture, combined with CoT-CSP and QCE modules, the information bottleneck and insufficient spatial perception of concrete crack detection in existing technologies are solved, achieving efficient and accurate crack detection and segmentation, which is suitable for intelligent structural health monitoring systems.
Patent Information
- Application Number
- CN202511914603.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-18
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2045-12-18
AI Technical Summary
Existing YOLO-based concrete crack detection methods suffer from insufficient detection, information bottlenecks, weak spatial location perception, and inadequate fusion of multi-dimensional features when dealing with slender, irregular, and multi-scale cracks, making it difficult to meet the requirements for efficient and accurate detection.
We adopt the QuadCoord-YOLO network architecture, introduce the CoT-CSP module and QCE module, and enhance the diversity of feature representation, optimize long-distance dependency modeling and spatial detail perception through a four-cardinal parallel attention mechanism and context CSP fusion structure, so as to achieve multi-dimensional feature collaborative enhancement.
It significantly improves the accuracy and efficiency of crack detection, with a 7.6% increase in bounding box detection mAP50 and a 13.1% increase in segmentation mAP50, while the increase in computational load is limited, making it valuable for engineering applications.
Smart Images

Figure CN121353285B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of computer vision and civil engineering detection technology, and particularly relates to a concrete crack intelligent detection method based on four-base coordinate attention enhancement. BACKGROUND
[0002] With the rapid development of civil engineering construction in China, the scale of building structures is continuously expanding, and the demand for maintenance of concrete structures is increasing. As the main form of structural damage, timely and accurate detection of concrete cracks is of great significance to ensure structural safety and prolong the service life of buildings. Traditional manual inspection methods have low efficiency, high cost, and strong subjectivity of detection results, which cannot meet the detection needs of large-scale building structures.
[0003] In recent years, target detection technology based on deep learning has been widely applied in the field of concrete crack identification. As a mainstream single-stage target detection method, the YOLO (You Only Look Once) series algorithm has the advantages of fast detection speed and strong real-time performance, and has shown good performance in crack detection tasks. YOLO11, as a new version, further optimizes the network structure and feature extraction capability. However, existing crack detection methods based on YOLO still have the following key technical bottlenecks:
[0004] Firstly, concrete cracks have complex characteristics such as elongation, irregularity, and multi-scale, and traditional convolutional neural networks have limited ability in handling long-distance dependencies. Although the C3k2 module in YOLO11 uses cross-stage partial connection, it still has deficiencies in capturing global context information of cracks. Specifically, for elongated cracks with a length exceeding 100 pixels, existing methods are prone to produce broken detection; for curved cracks, it is difficult to accurately grasp their overall shape; for intersecting cracks, it is easy to miss the detailed features near the intersection points.
[0005] Secondly, existing methods have a serious information bottleneck problem in channel feature extraction. Traditional attention mechanisms mainly focus on the importance of features in the channel dimension, and the most representative SE (Squeeze-and-Excitation) module realizes channel attention through global average pooling and two-layer fully connected networks. However, the SE module adopts a single-path feature compression structure ( , usually ), forming a serious information bottleneck at the intermediate layer. Taking the input channel number as an example, the SE module compresses it to A large amount of feature information is lost in the compression process, which severely limits the diversity and richness of feature expression. For cracks, which have various morphological features (transverse cracks, longitudinal cracks, cracks, and network cracks), a single path compression cannot fully retain the discriminative information of various features.
[0006] Thirdly, the spatial position information is not fully utilized. Traditional attention mechanisms focus on the channel dimension, while cracks have obvious directionality and spatial distribution characteristics. For example, transverse cracks mainly extend along the width direction, and longitudinal cracks mainly extend along the height direction. Existing methods lack explicit modeling of this directional feature, resulting in insufficient perception of crack direction and position information.
[0007] Finally, the multi-dimensional feature fusion mechanism needs to be optimized. Existing methods usually use simple addition or splicing to fuse different types of features, lacking a collaborative modeling mechanism for channel attention, spatial attention, and local convolution features. In particular, in the small-scale feature detection branch, there is a lack of effective multi-dimensional feature enhancement mechanism, resulting in unsatisfactory detection of small cracks. SUMMARY
[0008] The purpose of the present application is to provide a concrete crack intelligent detection method based on four-base coordinate attention enhancement, which solves the key problems of single-path feature compression bottleneck, insufficient long-distance dependency modeling, and weak spatial detail perception in the prior art by designing a four-base parallel attention mechanism and a context CSP fusion structure.
[0009] To achieve the above purpose, the present application provides a concrete crack intelligent detection method based on four-base coordinate attention enhancement, comprising the following steps:
[0010] S1: Construct a concrete crack dataset, accurately label the crack image, form complete labeling information containing a bounding box and a pixel-level segmentation mask, and divide the training set, validation set and test set;
[0011] S2: Construct a QuadCoord-YOLO network architecture, innovatively introduce a CoT-CSP (Context Transformation based on CSP structure) module and a QCE (Quad-Cardinality Enhancement) module based on YOLO11;
[0012] S3: Design the CoT-CSP module, which realizes efficient modeling of long-distance dependency relationships of cracks and adaptive integration of local-global features by deeply integrating the context transformer mechanism with the CSP structure;
[0013] S4: Constructing the QCE module, innovatively proposing a four-basis parallel channel attention mechanism, combining coordinate attention to achieve multi-dimensional and multi-path feature enhancement, breaking through the information bottleneck of traditional single-path SE module;
[0014] S5: End-to-end training of the QuadCoord-YOLO network using the training set, optimizing network parameters through a carefully designed compound loss function;
[0015] S6: Using the trained model to detect and segment cracks in concrete structure images, outputting the boundary box, segmentation mask, confidence and quantitative analysis results of the cracks.
[0016] Further preferably, in step S1, the concrete crack dataset adopts the YOLO polygon annotation format, the training set contains 3717 images, the validation set contains 200 images, and the test set contains 112 images.
[0017] Further preferably, in step S2, the QuadCoord-YOLO network architecture is innovatively improved based on YOLO11. The backbone network retains the initial two layers of convolution (step 2), replaces the C3k2 modules of the 2nd, 4th, 6th, and 8th layers with CoT-CSP modules, and the repetition numbers of the CoT-CSP modules are 2, 2, 2, and 2, respectively, with a shortcut setting of . The SPPF module of the 9th layer is retained for multi-scale feature aggregation, and the C2PSA module of the 10th layer is retained (repetition number 2) to provide position-sensitive attention. The neck network adopts a FPN-PAN bidirectional feature fusion structure, realizing multi-scale feature transmission through upsampling and feature concatenation. The QCE module is innovatively integrated into the detection head after the 16th layer, with input and output channel numbers of 64, specifically enhancing small-scale crack features. The Segment detection head is used in the 23rd layer, with an output channel number of , realizing joint prediction of the boundary box and segmentation.
[0018] Further preferably, in step S3, the innovative design of the CoT-CSP module fully integrates the global modeling capability of the context transformer and the gradient flow advantage of the CSP structure. For the input feature map , two convolution branches cv1 and cv2 are used to generate features and , both with a dimension of , where e is the expansion factor (for the 2nd and 4th layers , and the 6th and 8th layers ). Apply n serial context attention blocks to X1, each block containing: key embedding generation through 3x3 grouped convolution ) extract local context features; value embedding generation uses Convolution preserves original features; dynamic attention calculation fuses key embedding and original features to generate Spatial adaptive weights; feature enhancement applies dynamic weights to value embedding. Finally, the transformed is concatenated with , fused by convolution cv3, when a residual connection is added.
[0019] Further preferably, in the step S4, the QCE module is the core innovation of the application, which realizes multi-dimensional feature collaborative enhancement by adopting a three-way parallel architecture.
[0020] The coordinate attention sub-module respectively performs Hx1 and 1xW adaptive average pooling on the input features to capture the feature distribution in different directions. After concatenating the pooled features in the two directions, a 1x1 convolution is used to reduce the dimension to max(8, C / 2) and an h-swish activation function is used. Then, two 1x1 convolutions are used to generate attention weights in the height and width directions, respectively. After Sigmoid activation, the spatial attention map is obtained by element-wise multiplication.
[0021] The four-radix channel attention sub-module is a key innovation of the application. The input is compressed into a global description vector of Cx1x1 by global average pooling. Four independent fully connected layer branches are designed, each with a compression ratio of 2, to generate C / 2-dimensional features: the first branch focuses on low-frequency global information, the second branch focuses on high-frequency detail information, the third branch focuses on medium-frequency transition information, and the fourth branch focuses on specific pattern information. The outputs of the four branches are concatenated to form 2C-dimensional aggregated features, which are mapped back to C dimensions by a fully connected layer and activated by Sigmoid. This four-path design greatly enhances the diversity of feature expression compared to traditional single-path SE modules.
[0022] The convolution enhancement sub-module uses two layers of 3x3 convolution with batch normalization and ReLU activation to extract deep local features and add a residual connection to maintain gradient flow.
[0023] Finally, through an adaptive fusion mechanism:
[0024] , the collaborative enhancement of the three branch features is realized.
[0025] Further preferably, the model training parameters are set as follows: input image size 640x640, batch size 16, initial learning rate 0.01, training rounds 100, optimizer SGD, momentum 0.937, weight decay 0.0005.
[0026] Therefore, the application adopts the above-mentioned structure of a concrete crack intelligent detection method based on four-base coordinate attention enhancement, which has the following beneficial effects:
[0027] (1) The application first proposes a four-base parallel channel attention mechanism, which breaks through the information bottleneck of the traditional SE module single-path compression through the four independent squeeze paths in the QCE module, significantly enhancing the diversity and richness of feature expression.
[0028] (2) The application realizes the deep integration of the context transformer and the CSP structure, and the CoT-CSP module effectively combines the global modeling capability of the Contextual Transfrmer and the gradient flow advantage of the CSP, solving the long-distance dependence modeling problem of slender cracks.
[0029] (3) The application optimizes the network architecture design, which realizes significant performance improvement by accurately deploying innovative modules at key positions while only increasing 2.9% of the parameter amount.
[0030] (4) The detection performance of the application is improved, and the experimental results show that the boundary box detection mAP50 is improved from 0.726 to 0.781 (increased by 7.6%), and the segmentation mAP50 is improved from 0.589 to 0.666 (increased by 13.1%), fully verifying the effectiveness of the method.
[0031] (5) The application has high training efficiency, and the entire training process only takes 0.916 hours to complete 100 epch training, showing good training efficiency.
[0032] (6) The application has good engineering application value, the method has fast reasoning speed, good generalization ability and practicability, and can be widely applied to intelligent structural health monitoring systems.
[0033] The technical solutions of the application will be further described in detail below with the help of the drawings and examples. DESCRIPTION OF DRAWINGS
[0034] Figure 1 The overall flowchart of the QuadCoord-YOLO method of the application is shown in the figure.
[0035] Figure 2 The overall architecture diagram of the QuadCoord-YOLO network is shown in the figure.
[0036] Figure 3 The detailed structure diagram of the CoT-CSP module is shown in the figure.
[0037] Figure 4 The detailed structure diagram of the QCE module is shown in the figure.
[0038] Figure 5 Loss function and precision change chart for training process. DETAILED DESCRIPTION
[0039] The technical solutions of the present application are further illustrated below by means of the drawings and examples.
[0040] Unless otherwise defined, technical terms or scientific terms used in the present application shall have the usual meaning understood by a person with ordinary skill in the art to which the present application belongs. The terms "first", "second" and similar words used in the present application do not represent any order, number or importance, but are only used to distinguish different components. The terms "include" or "contain" and similar words mean that the elements or objects appearing before the words cover the elements or objects listed after the words and their equivalents, without excluding other elements or objects. The terms "connect" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. The terms "up", "down", "left", "right" and the like are only used to represent relative positional relationships, which may change accordingly when the absolute position of the described object changes.
[0041] EMBODIMENT
[0042] As shown in Figure 1 The present application provides a four-base coordinate attention enhanced intelligent concrete crack detection method, and the specific implementation steps are as follows:
[0043] S1: Constructing a concrete crack dataset
[0044] Collect concrete structure images of different parts, different lighting conditions and different crack types to construct a dataset containing 4029 images. Accurately label the crack area using YOLO polygon labeling format, and the labeling information includes the boundary box coordinates and pixel-level segmentation mask of the crack. Divide the dataset into a training set of 3717 images, a validation set of 200 images and a test set of 112 images according to the ratio of 9:0.5:0.5. Data preprocessing includes image size standardization, which adjusts all images to 640x640 pixels; data enhancement uses random horizontal flip probability of 0.5, random scaling ratio of 0.5, random translation ratio of 0.1, HSV color space enhancement with H channel of 0.015, S channel of 0.7 and V channel of 0.4; mosaic enhancement combines four images to form a new training sample, enhancing the detection ability of the model for multi-scale targets; random erasure randomly obscures local areas of the image with a probability of 0.4, improving the robustness of the model.
[0045] S2: Constructing an improved YOLO11 network architecture
[0046] Referring to Figure 2As shown, the improved YOLO11 network architecture includes three main parts. The backbone network improvement retains the 3x3 convolution step 2 of the 0th layer as the initial feature extraction layer, retains the 3x3 convolution step 2 of the 1st layer for downsampling, replaces the C3k2 module of the 2nd, 4th, 6th, and 8th layers with the CoT-CSP module to enhance long-distance dependency modeling, retains the SPPF module of the 9th layer for multi-scale feature aggregation, and retains the C2PSA module of the 10th layer for position-sensitive attention processing. The neck network design adopts a structure combining a feature pyramid network and a path aggregation network, realizes multi-scale feature transmission through upsampling and feature fusion, uses bilinear interpolation upsampling and feature splicing operations at the 11th to 15th layers, and uses C3k2 modules at the 13th, 16th, 19th, and 22nd layers for feature refinement. The detection head enhances the integration of the QCE module after the 16th layer of the P3 detection branch, maintains the structure of the 19th layer of P4 and the 22nd layer of P5 detection branch unchanged, and uses the Segment detection head at the 23rd layer to realize the joint output of the bounding box detection and instance segmentation.
[0047] S3: Design CoT-CSP module
[0048] Referring to Figure 3 As shown, the CoT-CSP module is designed based on the context transformer mechanism and includes three components: channel separation mechanism, context transformer unit, and feature fusion.
[0049] S31, Channel separation mechanism:
[0050] S311, the input feature is processed through two convolution branches cv1 and cv2;
[0051] S312, respectively generate features and , both with dimensions ;
[0052] S313, where is the expansion factor, the 2nd and 4th layers , and the 6th and 8th layers .
[0053] S32, Context transformer unit:
[0054] S321, apply CoTBottleneck modules in series to the first branch X1;
[0055] S322, each CoTBottleneck contains:
[0056] S33, key embedding generation: through group convolution ( Extract local contextual features;
[0057] S34, Value Embedding Generation: Using Convolution preserves the original feature information;
[0058] S35, Dynamic Attention Calculation: Concatenate the key embedding and the original features, and generate k×k×C spatial adaptive convolutional kernel weights through the attention embedding layer;
[0059] S36. Feature Enhancement: Applying dynamic weights to value embedding to achieve context-aware feature enhancement;
[0060] S37, Feature Fusion:
[0061] S371, Transformed With unchanged bypass branches splicing along the channel dimension;
[0062] S372, Through convolution Combined into the final output;
[0063] S373, when Add residual connections as needed.
[0064] S4: Building the QCE module
[0065] For reference Figure Four As shown, the QCE (Quad-Cardinality Enhancement) module uses a three-way parallel architecture to achieve multi-dimensional feature collaborative enhancement.
[0066] S41, Coordinate Attention Branch:
[0067] S411, Input Features Perform adaptive average pooling separately:
[0068] Horizontal direction: ;
[0069] Vertical direction: ;
[0070] S412. Combine the features from the two directions in the spatial dimension:
[0071] ;
[0072] S413, Reduce dimensionality to 1×1 convolution. Use activation;
[0073] S414. Generate attention weights in the height and width directions respectively:
[0074] ;
[0075] ;
[0076] S415, Spatial Attention Map: .
[0077] S42, Four-Radius Channel Attention Branch (Core Innovation):
[0078] S421, Compressed using global average pooling to The global feature vector;
[0079] S422. Innovatively designed four parallel fully connected layer branches, each performing feature compression independently (compression ratio r=2):
[0080] Branch 1 Focus on low-frequency global information to capture overall structural features;
[0081] Branch 2 Focus on high-frequency detail information and capture texture edge features;
[0082] Branch 3 Focus on mid-frequency transition information to capture intermediate-scale features;
[0083] Branch 4 Focus on specific pattern information and capture domain-related features.
[0084] S423, The four branches Dimensional output is formed by splicing together the channels. Dimensional aggregation features;
[0085] S424. Map back to the C-dimensional dimension through a fully connected layer and generate channel attention weights after Sigmoid activation:
[0086] ;
[0087] Advantages compared to traditional SE modules: SE modules employ a single-path compression structure ( This presents a serious information bottleneck. The four-radix structure of this invention employs four parallel paths (each path C → C / 2), with a total compression dimension of 2C, avoiding single-point bottlenecks and greatly enhancing the diversity and richness of feature representation.
[0088] S43, Convolutional Feature Enhancement Branch:
[0089] S431, First Layer: ;
[0090] S432, Second Layer: ;
[0091] S433, residual connection: ;
[0092] S44, three-way adaptive fusion:
[0093] S441, final output: ;
[0094] S442, where represents element-wise multiplication (Hadamard product), realizing three-dimensional synergistic enhancement.
[0095] Step S5: network training process
[0096] The training parameters are set as input image size 640x640 pixels, batch size 16, training round number 100, initial learning rate 0.01, learning rate decay using cosine annealing strategy with final learning rate 0.01, optimizer SGD momentum 0.937 weight decay 0.0005, mixed precision training enabled AMP accelerated training, preheating strategy learning rate preheating for the first 3 epochs. The loss function is designed as the weighted sum of four loss terms, The CIoU loss function is used for boundary box regression loss, considering the overlap, center distance and aspect ratio of the boundary box, The binary cross-entropy loss is used for classification loss, The Dice loss and cross-entropy loss are combined for segmentation mask loss, The distribution focus loss is used to optimize the distribution modeling of boundary box regression. The training strategy includes enabling the first 90 epochs and disabling the last 10 epochs for mosaic enhancement, gradient accumulation updating the gradient once every 64 samples, early stopping mechanism stopping training when the performance on the validation set does not improve for 100 consecutive epochs, and model saving saving the model weight with the best performance on the validation set.
[0097] Step S6: crack detection and segmentation
[0098] After training, the optimal model is used to infer the concrete structure image. Image preprocessing adjusts the input image to 640x640 pixels, and normalizes the pixel value by dividing by 255. Forward inference extracts features through the improved YOLO11 network, and generates prediction results including boundary boxes, confidence and segmentation masks. Post-processing includes non-maximum suppression with IoU threshold 0.7 and confidence threshold 0.25, segmentation mask refinement upsampling to the original image size, and result output of crack position, class, confidence and pixel-level segmentation result.
[0099] Example 2: performance verification experiment
[0100] To verify the effectiveness of the method of the application, a comparative experiment is carried out. The hardware environment of the experiment is set as NVIDIA GeForce RTX 3090 GPU memory 24GB, the software environment is PyTorch 2.5.1 and CUDA 12.4, and the evaluation indexes include mAP50, i.e. the average precision when the IoU threshold is 0.5, and mAP50-95, i.e. the average precision when the IoU threshold is 0.5 to 0.95. The ablation experiment results are shown in Table 1.
[0101] Table 1 Ablation experiment results
[0102]
[0103] The experimental results show that the method of the application achieves 78.1% in the mAP50 of the bounding box detection, which is 5.5 percentage points higher than the 72.6% of the YOLO11 benchmark. In the mAP50-95 index of the bounding box, it achieves 58.3%, which is 5.7 percentage points higher than the 52.6% of the benchmark. In the segmentation task, the mask mAP50 reaches 66.6%, which is 7.7 percentage points higher than the 58.9% of the benchmark, and the mask mAP50-95 reaches 24.1%, which is 3.2 percentage points higher than the 20.9% of the benchmark. The model parameter amount is 2.92M, which is only 3.2% more than the 2.83M of the benchmark, and the calculation amount is 12.1 GFLOPs, which is 18.6% more than the 10.2 GFLOPs of the benchmark, maintaining good efficiency.
[0104] The ablation experiment analysis shows that when the CoT-CSP module is used alone, the mAP50 of the bounding box reaches 74.9%, which is improved by 2.3 percentage points, proving the effectiveness of the context transformation. When the QCE module is used alone, the mAP50 of the bounding box reaches 76.2%, which is improved by 3.6 percentage points, proving the role of coordinate-aware feature enhancement. The joint use of the two modules achieves the best performance, proving the complementarity of the two modules. The training process is completed within 100 epochs, which takes 0.916 hours, showing good training efficiency.
[0105] The application fuses the context-aware transformation and coordinate-aware feature enhancement technologies to construct a high-precision concrete crack detection and segmentation network. By introducing the CoT-CSP module in the backbone network, the modeling ability of long-distance dependency is enhanced, and by integrating the QCE module in the detection head, the extraction accuracy of detailed features is improved. The experimental results prove that the method of the application significantly improves the accuracy of crack detection and segmentation while maintaining a low computational overhead, providing reliable technical support for intelligent structural health monitoring systems, and having important significance for promoting the application of computer vision technology in the field of civil engineering structure detection.
[0106] It should be pointed out finally that the above examples are only used to illustrate the technical solutions of the present application but not to limit it, and although the present application has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that the technical solutions of the present application can still be modified or replaced equivalently, and these modifications or equivalent replacements should not make the modified technical solutions deviate from the spirit and scope of the technical solutions of the present application.
Claims
1. A method for intelligent detection of concrete cracks based on four-base coordinate attention enhancement, characterized in that, Includes the following steps: S1. Construct a concrete crack dataset, annotate the crack images in the dataset to generate annotation information containing bounding box information and pixel-level segmentation masks, and divide the dataset into a training set, a validation set and a test set. S2. Construct a QuadCoord-YOLO network architecture based on the YOLO series network. Replace at least some of the original feature extraction modules in the backbone network of the YOLO series network with CoT-CSP modules. Integrate a QCE module in the detection head of the YOLO series network. The CoT-CSP module is a module that deeply integrates the context changer mechanism and the CSP structure. The QCE module is a module that integrates a four-radix parallel channel attention mechanism, a coordinate attention mechanism, and deep convolution enhancement. The QuadCoord-YOLO network architecture also includes a feature fusion subnetwork in the neck area. S3. Design the CoT-CSP module, which divides the input features into a first branch and a second branch through a dual-path feature separation unit, applies at least one cascaded context attention block to the first branch for context transformation processing, and then concatenates the first branch features after context transformation processing with the second branch features through a feature fusion unit and fuses them through convolution. S4. Construct the QCE module, adopting a three-way parallel architecture. The spatial attention weights are generated through the coordinate attention submodule, the channel attention weights are generated through the four-radix channel attention submodule, and the deep local features are extracted through the convolutional feature enhancement submodule. Then, the outputs of the three submodules are weighted and fused through the adaptive fusion unit. In step S4, the coordinate attention submodule processes the input features respectively. and Adaptive average pooling is used to obtain pooling features in two directions; these pooling features are then concatenated and processed... Convolution dimensionality reduction to And activated by h-swish, then through two Convolution generates height-oriented attention weights Attention weights in width direction The and After activation by the Sigmoid algorithm, the elements are multiplied one by one to obtain the spatial attention weights; In step S4, the four-cardinal-channel attention submodule performs global average pooling on the input features to obtain a C×1×1 global feature vector; the four-cardinal-channel attention submodule includes four parallel fully connected branches, each with a compression ratio of 2, which transfers the input features from... Dimensional compression to The outputs of the four fully connected branches are concatenated along the channel dimension to form the output. Dimensional aggregated features are then mapped back through a fully connected layer. The channel attention weights are obtained by simulant activation. S5. Use the training set to perform end-to-end training on the QuadCoord-YOLO network, and optimize the parameters of the QuadCoord-YOLO network through a composite loss function; S6. Use the trained QuadCoord-YOLO network model to detect and segment cracks in concrete structure images, and output the bounding boxes, segmentation masks and confidence information of the cracks.
2. The intelligent concrete crack detection method based on four-base coordinate attention enhancement according to claim 1, characterized in that, In step S1, the concrete crack dataset adopts the YOLO polygon annotation format. The training set contains 3717 images, the validation set contains 200 images, and the test set contains 112 images.
3. The intelligent concrete crack detection method based on four-base coordinate attention enhancement according to claim 1, characterized in that, In step S2, the YOLO series network is YOLO11, the original feature extraction modules replaced in the backbone network are the C3k2 modules in layers 2, 4, 6, and 8, the CoT-CSP module is repeated twice, and the shortcut is set to... The neck feature fusion subnetwork is an FPN-PAN bidirectional feature fusion structure; in the detection head, the QCE module is integrated after the 16th layer of the P3 detection branch, and the QCE module has 64 input and output channels each; the detection head has 64 output channels. .
4. The intelligent concrete crack detection method based on four-base coordinate attention enhancement according to claim 1, characterized in that, In step S3, the dual-path feature separation unit consists of two... Convolution; the context attention block includes a key embedding generation layer, a value embedding generation layer, a dynamic attention calculation layer, and a feature enhancement layer, wherein the key embedding generation layer employs... Grouped convolution, number of groups The value embedding generation layer adopts convolution.
5. The intelligent concrete crack detection method based on four-base coordinate attention enhancement according to claim 1, characterized in that, In step S4, the convolutional feature enhancement submodule includes two layers. Convolution, each layer Each convolution is followed by a batch normalization layer and a ReLU activation function; the convolutional feature enhancement submodule also includes residual connections, which are two layers in total. The output of the convolution is directly superimposed on the input features; the fusion formula of the adaptive fusion unit is: ; in, Spatial attention weights, The output of the convolutional feature enhancement submodule, For channel attention weights, For element-wise multiplication, This is the input feature map.
6. The intelligent concrete crack detection method based on four-base coordinate attention enhancement according to claim 1, characterized in that, In step S5, the expression for the composite loss function is: ; in, For CIoU loss, For binary cross-entropy loss, This is a combination of Dice loss and cross-entropy loss. This represents the distribution focus loss.
7. The intelligent concrete crack detection method based on four-base coordinate attention enhancement according to claim 1, characterized in that, In step S5, the parameters for the end-to-end training are set as follows: input image size 640×640 pixels, batch size 16, and initial learning rate. 0.01, 100 training epochs, SGD optimizer, momentum 0.937, weight decay 0.0005; AMP mixed precision training was enabled during training, and the first 3 training epochs were used for learning rate warm-up.
8. The intelligent concrete crack detection method based on four-base coordinate attention enhancement according to claim 1, characterized in that, In step S6, before crack detection and segmentation of the concrete structure image, the concrete structure image is first adjusted to 640×640 pixels and normalized. After detection and segmentation, post-processing steps are also included: non-maximum suppression is used to remove duplicate bounding boxes, with an IoU threshold of 0.7 and a confidence threshold of 0.25; the segmentation mask is upsampled to the original size of the concrete structure image, and the location, type, confidence, and pixel-level segmentation results of the cracks are output.
Citation Information
Patent Citations
High-resolution remote sensing scene classification method based on gated mixed attention
CN117830869A
Multi-scale context enhancement small target detection method based on improved RT-DETR
CN120599503A