A concrete surface defect detection method, system and storage medium

By employing multi-scale feature extraction, background-defect dual-mode activation, cross-stage local high-frequency feature enhancement, and topology-adaptive graph convolutional attention processing, this technology addresses the issues of high computational complexity and limited ability to identify minute defects in existing technologies, achieving high-precision concrete surface defect detection suitable for low-computing-power edge devices.

CN122434879APending Publication Date: 2026-07-21SHANDONG JIANZHU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANDONG JIANZHU UNIV
Filing Date
2026-04-28
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing technologies have high computational complexity in concrete surface defect detection, making them difficult to deploy on mobile devices or edge computing devices with limited computing power, and their ability to identify minute defects in complex environments is also limited.

Method used

We employ multi-scale feature extraction, background-defect dual-mode activation processing, cross-stage local high-frequency feature enhancement, and topology-adaptive graph convolutional attention processing to reduce computational cost and enhance defect feature recognition capabilities through appropriate model design.

Benefits of technology

It achieves high-precision concrete defect detection with an accuracy of over 92%, and can be successfully deployed on low-computing-power edge devices such as drones to meet real-time detection needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122434879A_ABST
    Figure CN122434879A_ABST
Patent Text Reader

Abstract

The application discloses a kind of concrete surface defect detection method, system and storage medium, solve the detection of concrete surface defect in prior art There is the problem that the calculation amount is large, the identification ability of small defect is weak, with the beneficial effect that the calculation amount is reasonable, suitable for edge device, specific scheme is as follows: a kind of concrete surface defect detection method, including collecting concrete surface image and pre-processing, obtain training set and test set;Multiple downsampling operations are performed on the pre-processed image, to obtain multi-scale feature map;Background-defect dual-mode activation processing is performed on the multi-scale feature map;Cross-stage local high-frequency feature enhancement processing is performed on the feature map after activation processing, and the high-frequency response map is adaptively reinforced through a double-branch weighting mechanism;Topological adaptive graph convolution attention processing is performed on the feature map after enhancement processing;The feature map after enhancement processing is input into the detection head, and the defect position and defect category are output through the detection head.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of concrete testing technology, and in particular to a method, system and storage medium for detecting defects on concrete surfaces. Background Technology

[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.

[0003] Concrete structures are a crucial component of most urban infrastructure, playing an irreplaceable role in ensuring the normal operation of cities and improving the urban living environment. However, due to various environmental factors such as temperature, climate, corrosion, and lack of regular maintenance, infrastructure systems may experience functional damage during use. Concrete surface defect detection is essential for identifying early, minor damage to infrastructure and enabling timely repairs.

[0004] Currently, most surface defect detection of concrete is done manually. The results are greatly affected by the experience and subjective judgment of the inspectors, making it difficult to meet the inspection needs of large-scale infrastructure. Manual inspection methods are inefficient and highly subjective, and cannot meet the needs of large-scale, high-precision inspection.

[0005] With the development of computer vision and deep learning technologies, automated detection methods based on image recognition are gradually being applied to the field of concrete defect detection. Existing technologies include publicly available computer vision-based methods for detecting concrete surface defects. These methods construct intelligent concrete defect detection models based on CNN (Convolutional Neural Network) algorithms, which can identify concrete surface quality problems and perform quantitative analysis. However, because the aforementioned algorithms use a large number of model parameters, they require high detection accuracy to be achieved on server-side or high-performance computing platforms. In other words, existing detection methods suffer from high computational complexity and are difficult to deploy directly on mobile devices or edge computing devices with limited computing power.

[0006] In addition, there are some lightweight detection models. Although these models reduce computational complexity, they often use a single activation strategy and fixed feature processing methods in the feature extraction process. They fail to fully consider the differences in feature distribution between concrete defect images and background images, and do not perform enhancement processing on defect features, which limits the model's ability to identify small defects in complex backgrounds. Summary of the Invention

[0007] To address the shortcomings of existing technologies, the purpose of this invention is to provide a method for detecting defects on concrete surfaces, employing a suitable model and controlling the computational load, so that the entire method can be used in edge devices.

[0008] To achieve the above objectives, the present invention is implemented through the following technical solution: A method for detecting defects on concrete surfaces includes the following: Images of the concrete surface were acquired and preprocessed to obtain training and testing sets. Multiple downsampling operations are performed on the preprocessed image to obtain multi-scale feature maps; Perform background-defect dual-mode activation processing on the multi-scale feature maps; The activated feature map is subjected to cross-stage local high-frequency feature enhancement processing, including converting the spatial domain feature map into a frequency domain feature map, filtering the frequency domain feature map, reconstructing the filtered frequency domain feature map back to the spatial domain to obtain a response map within a set frequency range, and adaptively enhancing the high-frequency response map through a dual-branch weighting mechanism. Perform topology-adaptive graph convolutional attention processing on the enhanced feature maps; The enhanced feature map is input into the detection head, which then outputs the defect location and defect category.

[0009] As described above, in a method for detecting defects on concrete surfaces, the preprocessed image undergoes multiple downsampling operations to obtain a multi-scale feature map, including the following: The model is trained by inputting a large defect image. The input feature map will undergo three downsampling operations in sequence, using convolution kernels. The feature map size is reduced step by step, and the number of channels is increased in each downsampling operation to obtain a multi-scale feature map.

[0010] The concrete surface defect detection method described above, wherein the background-defect dual-mode activation processing of the multi-scale feature map includes the following: The Sobel operator is used to calculate the gradients in the horizontal and vertical directions of the input feature map, resulting in the combined gradient strength for each pixel. After obtaining the pixel-by-pixel comprehensive gradient intensity of the input feature map, the dynamic threshold is calculated based on the magnitude of the comprehensive gradient intensity and the statistical characteristics of the local window. The mean local gradient of each pixel at position x in the feature map is calculated using average pooling. The local standard deviation of the feature map within the window range around the x-position of each pixel is calculated based on the comprehensive gradient intensity of each pixel and the mean local gradient within the window range around the x-position of each pixel. The dynamic threshold is determined based on the local standard deviation, the scaling factor n of the standard deviation, and the mean of the local gradient within the window range around the x-position of each pixel in the feature map. Set the range of values ​​for the standard deviation multiplier n. Areas with a comprehensive gradient intensity greater than the dynamic threshold will be identified as defect areas; otherwise, they will be identified as background areas. Different activation functions are applied to the background region and the defect region respectively.

[0011] The concrete surface defect detection method described above, wherein different activation functions are applied to the background area and the defect area respectively, includes the following: The SiLU function is used to activate the background region, and the Softplus activation function is used to activate the defect region. To improve the adaptability of the Softplus function to different data types, a scaling parameter is introduced. The mathematical expression for the dual-mode activation function is:

[0012] Where α and γ are adjustable parameters, G x τ represents the overall gradient intensity at pixel x, and τ is the gradient threshold.

[0013] The concrete surface defect detection method described above, wherein performing cross-stage local high-frequency feature enhancement processing on the activated feature map includes the following: The spatial domain feature map is converted into a frequency domain feature map, the frequency domain feature map is filtered, and the filtered frequency domain feature map is reconstructed back into the spatial domain to obtain a response map within a set frequency range. The high-frequency response map is adaptively enhanced through a dual-branch weighting mechanism.

[0014] The concrete surface defect detection method described above, wherein performing cross-stage local high-frequency feature enhancement processing on the activated feature map includes the following: Feature map X i Preliminary dimensionality reduction and feature extraction are performed using a convolutional bottleneck structure; Perform DCT calculation on the processed feature map to obtain feature map X. i The frequency domain characteristics of F i ; Filter selective suppression F i The low-frequency components are extracted, and the filtered frequency domain features are reconstructed back into the spatial domain through inverse discrete cosine transform to generate a high-frequency response map C of the same size as the original feature map. i ; By fusing the output feature maps of the two branches, we obtain the enhanced feature map C of the defect features. i+1 .

[0015] The concrete surface defect detection method described above includes performing topological adaptive graph convolutional attention processing on the enhanced feature map, which includes: transforming the feature map into topological nodes, constructing an adaptive topological neighborhood graph based on spatial distance similarity and feature similarity, interactively updating node features through graph convolution units, generating spatial topological attention weights and channel feature attention weights, fusing the spatial topological attention weights and channel feature attention weights to obtain joint attention weights, and weighted fusing the joint attention weights with the input feature map.

[0016] The concrete surface defect detection method described above, wherein performing topological adaptive graph convolutional attention processing on the enhanced feature map includes the following: The input feature map is transformed into a topological node, and an adaptive topological neighborhood graph is constructed based on spatial distance and feature similarity, reconstructing the feature space into a dynamic topological association structure. After being constrained by the neighborhood graph, the topological nodes generate local topological centers with local context specificity, and the interaction relationships between the local topological centers are constructed using graph convolution units; Each local topology center is treated as a node. First, information is exchanged between nodes, and then the characteristics of each node are updated. A topology-channel dual-branch parallel attention mechanism is constructed to generate spatial topology attention weights and channel feature attention weights respectively, and the dual-branch weights are fused by broadcasting Hadamard product. After obtaining the final joint attention weights, the weights are fused with the original input feature map through element-wise Hadamard product weighting to reconstruct a feature map output that fully aggregates global topological and local detail information.

[0017] As described above, in a concrete surface defect detection method, after the defect location and defect category are output through the detection head, the output value is compared with the actual labeled value through a loss function. Based on this difference, the weight values ​​between each level of the model are adjusted and updated, and finally a concrete surface defect detection model with an accuracy value that meets the expected level is obtained.

[0018] Secondly, the present invention also provides a concrete surface defect detection system, comprising: The image acquisition module is used to acquire video streams from the concrete surface in real time. The image processing module, electrically connected to the image acquisition module, is used for preprocessing the acquired images; The feature extraction module performs multiple downsampling operations on the preprocessed image to obtain multi-scale feature maps; The background-defect dual-mode activation module performs background-defect dual-mode activation processing on multi-scale feature maps. The cross-stage local high-frequency feature enhancement module performs cross-stage local high-frequency feature enhancement processing on the activated feature map. The topology-adaptive graph convolutional attention module performs topology-adaptive graph convolutional attention processing on the enhanced feature map, including: transforming the feature map into topological nodes, constructing an adaptive topological neighborhood graph based on spatial distance similarity and feature similarity, interactively updating node features through graph convolutional units, generating spatial topology attention weights and channel feature attention weights, fusing the spatial topology attention weights and channel feature attention weights to obtain joint attention weights, and weighted fusing the joint attention weights with the input feature map; The detection head module detects the enhanced feature map and outputs the defect location and defect category.

[0019] Thirdly, the present invention also provides a computer storage medium storing a computer program, which, when executed by a processor, implements the aforementioned method for detecting defects on concrete surfaces.

[0020] The beneficial effects of the present invention are as follows: The detection method provided by this invention performs background-defect dual-mode activation processing on multi-scale feature maps, fully considering the differences in feature distribution between concrete defect images and background images. It then performs cross-stage local high-frequency feature enhancement processing on the activated feature maps, i.e., enhancing the defect features to improve the overall ability to identify minute defects in complex backgrounds. Through these two processing methods, topological adaptive graph convolutional attention processing is then applied to the enhanced feature maps. This synergistic approach achieves high-precision concrete defect detection with a reasonable computational load, achieving an accuracy of over 92%, without introducing complex feature aggregation structures such as feature pyramid networks or path aggregation networks. This enables the model to be successfully deployed on edge devices of UAVs, meeting the real-time detection needs of practical engineering projects. Attached Figure Description

[0021] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.

[0022] Figure 1 This is a schematic diagram of a concrete surface defect detection method according to one or more embodiments of the present invention.

[0023] Figure 2 This is a structural diagram of the background-defect dual-mode activation module in a concrete surface defect detection method according to one or more embodiments of the present invention.

[0024] Figure 3This is a structural diagram of a cross-stage local high-frequency feature enhancement module in a concrete surface defect detection method according to one or more embodiments of the present invention.

[0025] Figure 4 This is a structural diagram of the topology adaptive graph convolutional attention module in a concrete surface defect detection method according to one or more embodiments of the present invention.

[0026] Figure 5 This is a flowchart of a concrete surface defect detection method according to one or more embodiments of the present invention.

[0027] The diagram exaggerates the spacing or dimensions between parts to show their positions; the diagram is for illustrative purposes only. Detailed Implementation

[0028] It should be noted that the following detailed description is illustrative and intended to provide further explanation of the invention. Unless otherwise specified, all technical and scientific terms used in this invention have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0029] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention. As used herein, unless otherwise expressly indicated by the invention, the singular form is also intended to include the plural form. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof. As described in the background section, existing technologies for detecting defects on concrete surfaces suffer from problems such as high computational load and weak ability to identify minute defects. To address these technical issues, this invention proposes a method for detecting defects on concrete surfaces.

[0030] Example 1 In a typical embodiment of the present invention, reference is made to Figure 1 As shown, a method for detecting defects on concrete surfaces includes the following: Step 1) Data Acquisition and Processing: The concrete surface is captured in real time by a high-definition camera. Each frame of the video is captured, and images with typical defect characteristics are selected and stored. The collected images are classified and labeled according to different defect types to obtain a dataset with category labels, thus completing the creation of the concrete surface defect dataset.

[0031] Based on the model's requirements for input images, the labeled dataset is processed by adjusting image size and performing preprocessing steps including Mosaic data augmentation, image scaling, color space enhancement, brightness adjustment, rotation, and image sharpness enhancement. The preprocessed dataset is then divided into training and test sets in a 7:3 ratio.

[0032] The Mosiac data enhancements include the following: (1) Randomly read four images of concrete surface defects from the concrete surface defect dataset.

[0033] (2) Perform operations such as left and right flipping, size scaling, and color gamut changes on the four concrete surface defect images, mark the defect areas, and adjust the size of the concrete surface defect images to 640×640 to facilitate model training. Then, arrange the four images according to the four regions of upper left, lower left, lower right, and upper right.

[0034] (3) The marked defect areas in the four original defect images are extracted in the form of a matrix and finally combined into a new defect image, which is then input into the concrete surface defect detection model for training.

[0035] Step 2) Model Training: Based on the training set, a concrete surface defect detection model is trained. The weight information generated during the training process is saved and updated to obtain a trained concrete surface defect detection model.

[0036] Among them, such as Figure 1 As shown, the concrete surface defect detection model includes a backbone network (CNN), a background-defect dual-mode activation module (BDDM), a cross-stage local high-frequency feature enhancement module (CSP-HFE), a topology adaptive graph convolutional attention module (TAGC), and a detection head.

[0037] 2-1) Multi-scale feature extraction First, a defect image of size 640×640×3 is input to the model for training. The input feature map undergoes three lightweight downsampling (ADown) operations. After the first downsampling, the feature map size is reduced to 320×320 and the number of channels increases to 64. After the second downsampling, the feature map size is reduced to 160×160 and the number of channels increases to 128. After the third downsampling, the feature map size is reduced to 80×80 and the number of channels increases to 256. This process effectively reduces computational complexity and resource consumption, and captures multi-scale semantic information of defects by gradually expanding the receptive field, laying the foundation for accurate extraction and localization of defect features in the future. The downsampling operation uses a 3×3 convolutional kernel with a stride of 2, which reduces the spatial resolution of the feature map while increasing the number of channels, enabling the network to extract rich semantic features at different scales. The specific dimensions of the feature maps at each stage are shown in Table 1. Table 1 Feature map dimensions at each stage of downsampling

[0038] Step 2-2) Background-Defect Dual-Mode Activation Processing Subsequently, the feature map C3 obtained after the third downsampling is fed into a composite structure consisting of a background-defect dual-mode activation module and a cross-stage local high-frequency feature enhancement module. Specifically, the input feature map is first passed to the background-defect dual-mode activation module. This module does not change the size or number of channels of the input feature map, but it outputs different activation values ​​for the background and defect regions in the input feature map so that the model can better distinguish between the two features. Next, the feature map after dual-mode activation is passed to the cross-stage local high-frequency feature enhancement module, where the input feature map undergoes cross-stage partial connectivity and high-frequency feature enhancement operations.

[0039] It needs to be explained that the reference Figure 2 As shown, the Background-Defect Dual-Mode Activation Module (BDDM) includes a dual-mode activation function (DMA) and an adaptive threshold dynamic switching strategy based on the local statistical characteristics of the input feature maps. It aims to output different activation values ​​for the concrete background image and the defect image so that the model can better distinguish between their features. The challenge lies in how to use a simple and effective activation function switching strategy with limited computational resources to enable the model to automatically apply different activation functions to different features. In actual production, the occurrence of concrete surface defects is random and follows a Gaussian distribution. Since concrete images have the characteristic of "gradient changes in pixel gradients in the background image and dramatic changes in pixel gradients in the defect image," it is only necessary to calculate the gradient distribution level for each input feature map and apply different activation functions to the high and low gradient regions to achieve the predetermined goal. Specifically, the classic Sobel operator (used for image gradient calculation) is first used to calculate the horizontal and vertical gradients of the input feature map I, respectively. , : (1) (2) In summary, the overall gradient intensity of each pixel is obtained as follows: (3) After obtaining the pixel-by-pixel comprehensive gradient intensity of the input feature map I, a dynamic threshold τ is calculated based on the magnitude of the comprehensive gradient intensity and the statistical characteristics of the local window to distinguish between defect features and background features. The mean local gradient μ within a KxK window around each pixel x-position of the feature map is calculated using average pooling; this value reflects the overall level of the image gradient within that region.

[0040] (4) Calculate the local standard deviation of each pixel at position x in the feature map within a KxK window: (5) in, The gradient strength value is calculated by combining the gradient values, where i refers to the position of each pixel in the feature map, and i increases from 1 to k. 2 That is, x is a set of points containing x1, x2, ..., x. k... ; The occurrence of surface defects in concrete is random and follows a Gaussian distribution; therefore, the dynamic threshold τ can be set as follows: (6) According to the three sigma rule in the central limit theorem, values ​​exceeding three standard deviations in a normal distribution are usually marked as outliers. However, in actual production scenarios, due to factors such as limited sample size, environmental noise interference, and the randomness of defect distribution, feature data often fails to perfectly conform to an ideal normal distribution. To correct this distributional bias and ensure the rationality and accuracy of outlier labeling, the standard deviation factor n in the three sigma rule is typically set to a range of 2 to 5. Regions with a comprehensive gradient intensity value greater than the dynamic threshold τ are identified as defect regions; otherwise, they are identified as background regions.

[0041] Subsequently, the SiLU (Siru Activation Function) is applied to the background region, while the Softplus (Soft Plus Activation Function) is applied to the defect region, resulting in different activation values ​​for the background and defect regions in the feature map. Furthermore, to further enhance the adaptability of the Softplus function to different data types, two scaling parameters are introduced to flexibly adjust the steepness of the function.

[0042] The mathematical expression for this dual-mode activation function is: (7) Here, α and γ are adjustable parameters used to adjust the model's response intensity in the "defect" activation mode. x τ represents the overall gradient intensity at pixel x, and τ is the gradient threshold. The gradient is dynamically adjusted based on the statistical properties of the local window to adapt to different data distribution types.

[0043] refer to Figure 3 As shown, the Cross-Stage Partial High-Frequency Feature Enhancement Module (CSP-HFE) is a novel CSP (Cross-Stage Partial) bottleneck structure that integrates frequency domain information processing technology. It aims to address the problem that existing feature extraction modules cannot accurately identify defect features under limited computing resources due to the small size of concrete surface defects and high background interference. On one hand, the CSP-HFE module fully retains the efficient feature fusion mechanism brought about by its cross-stage partial connectivity. Through the design of splitting feature streams and cross-stage information interaction, it achieves full reuse and complementarity of features while ensuring computational efficiency. On the other hand, through spatial-frequency domain transformation, it uses frequency domain technology to separate the original image into low-frequency and high-frequency components, and then performs thresholding on the high-frequency components to suppress background interference and highlight the small defect target features. As the core component of the CSP-HFE module, the High Frequency Feature Enhancement Submodule (HFE) innovatively integrates Discrete Cosine Transform (DCT) with a frequency domain high-pass filtering mechanism. It suppresses background noise interference and enhances defect features by filtering out low-frequency components in the input feature map.

[0044] Specifically, the processing flow of the HFE module is as follows: First, feature map X i Preliminary dimensionality reduction and feature extraction are performed using a convolutional bottleneck structure; Subsequently, a Discrete Cosine Transform (DCT) calculation is performed on the processed feature map to obtain the feature map X. i The frequency domain characteristics of F i At this point, the low-frequency components are concentrated in the upper left corner of Fi, while the high-frequency components are distributed in F. i Bottom right corner; The high-pass filter selectively suppresses low-frequency components in Fi, and reconstructs the filtered frequency domain features back to the spatial domain through inverse discrete cosine transform (iDCT), generating a high-frequency response map C of the same size as the original feature map. i C i These will be used as inputs to the "channel-weighted branch" and the "feature-preserving branch," respectively, to generate channel weights and high-frequency feature weights. These two sets of weights will then be combined with F... i Element-wise multiplication is performed to achieve adaptive enhancement of key channels and spatial locations.

[0045] Finally, the output feature maps of the two branches are fused to obtain the enhanced feature map C. i+1 .

[0046] After the above enhancement process is executed iteratively twice, the feature map C after the defect features are fully enhanced is obtained. i+2 C i+2 The final output X is obtained by concatenating the multi-scale feature maps from other stages of the CSP (Cross Stage Partial) network and fusing them through a single convolution. i+1 After the above enhancement process is executed iteratively twice, the feature map C after the defect features are fully enhanced is obtained. i+2 C i+2 The final output X is obtained by concatenating the multi-scale feature maps from other stages of the CSP network and then fusing them through a single convolution. i+1 Its dimensions are 80×80×256.

[0047] The above process will be repeated after the model undergoes the fourth and fifth downsampling, resulting in feature maps with sizes of 40×40×512 and 20×20×512, respectively. The feature images obtained from the fourth and fifth downsampling are then concatenated to obtain a hybrid feature map with a size of 40×40×512 that fuses multi-stage features. It should be explained that, in order to efficiently extract high-frequency defect features from the input feature map, a high-pass filter is designed in the CSP-HFE in this embodiment, such as... Figure 4 As shown, filter z and C i The dimensions are the same, assumed to be H (height) × W (width). Since the low-frequency components of the DCT spectrum are concentrated in the upper left corner and the high-frequency components are distributed in the lower right corner, a hyperparameter θ is introduced to control the filtering frequency band. Specifically, the filter is determined by the following formula: (8) 2-3) Input the hybrid feature map obtained in the previous step into the Topology Adaptive Graph Convolutional Attention Module (TAGC); To eliminate the intra-class inconsistency caused by local context differences after filtering and denoising in the cross-stage local high-frequency feature enhancement module, the hybrid feature map obtained in the previous step is input into the topology adaptive graph convolutional attention module, referring to... Figure 4 As shown, unlike previous methods that only use pixel features, global centers, or class activation maps, the TAGC attention mechanism is based on unsupervised topological structure modeling and graph convolutional feature interaction, while simultaneously mining local topological associations and global aggregate representations.

[0048] Specifically, the TAGC module first processes the input feature map X in ∈R C×H×W Perform topological node transformation, construct an adaptive topological neighborhood graph based on spatial distance and feature similarity, and reconstruct the feature space into a dynamic topological association structure.

[0049] (9) (10) (11) Among them, V i The C-dimensional feature vector corresponding to the i-th spatial node in the topological graph V, V j The C-dimensional feature vector corresponding to the j-th spatial node in the topological graph V. V Represents topological node characteristics; Reshape This is a feature dimension reshaping operation; C is the number of channels; N = H × W is the total number of nodes in the feature map space; Sdist Represents the spatial distance similarity matrix, where d(i,j) is the spatial distance between nodes; σd is the distance scaling factor, used to adjust the decay rate of spatial distance similarity and adaptively constrain the perception range of the topological neighborhood. Sfeat The representative feature is the cosine similarity matrix.

[0050] The adaptive topological neighborhood graph is generated jointly by spatial similarity and feature similarity. The node association relationship does not require label supervision and can adaptively match the spatial distribution characteristics of different features.

[0051] (12) in, A For the adaptive topological neighborhood graph, ⊙ represents the Hadamard product. Normalizing it yields the adjacency matrix of the topological neighborhood graph: (13) in, Let D be the normalized topological adjacency matrix, and let D be the degree matrix of the graph (a diagonal matrix, where the diagonal elements are the sum of the rows of the adjacency matrix).

[0052] After being constrained by the neighborhood graph, topological nodes can generate local topological centers with local context specificity, while retaining the semantic representation universality to adapt to category feature expressions.

[0053] To address this, graph convolutional units are used to construct the interaction relationships between local topological centers. Each local topological center is treated as a node; information exchange occurs first between nodes, and then the features of each node are updated. The specific implementation is as follows: (14) in, V gcn This is represented by the node feature matrix after topological aggregation; W 1, W 2 represents the learnable weights of the graph convolution, and σ represents the sigmoid calculation.

[0054] To achieve accurate calibration in both spatial and channel dimensions, a topology-channel dual-branch parallel attention mechanism is constructed, which generates spatial topology attention weights and channel feature attention weights respectively, and completes the fusion of dual-branch weights through broadcast Hadamard product.

[0055] The formula for calculating spatial topological attention weights is: (15) The formula for calculating the channel feature attention weight is: (16) (17) Among them, Conv 1×1 For pointwise convolution; FC is a fully connected layer; GlobalAvgPool For global average pooling; M final For spatial-channel joint adaptive attention weights, M topo For spatial topological attention weights; M chan The attention weights are for channel features.

[0056] After obtaining the final joint attention weights, the weights are fused with the original input feature map through element-wise Hadamard product weighting to reconstruct a feature map output that fully aggregates global topological and local detail information. X out .

[0057] (18) This module overcomes the structural limitations of fixed blocks through unsupervised dynamic topology modeling, achieves global node feature interaction through graph convolution, and completes joint weighting of spatial and channel features by combining a topology-channel dual-branch parallel attention mechanism, ensuring intra-class consistency of the final features.

[0058] The feature map, processed by the topology adaptive graph convolutional attention module, is then fed into a detection head with a size of 40×40×512. The detection head uses YOLOv8 and employs a dual-branch decoupled design, constructing independent convolutional networks for classification and regression tasks. The classification branch includes two 3×3 convolutional layers and one 1×1 convolutional output, using a classification loss function; the regression branch also includes two 3×3 convolutional layers and one 1×1 convolutional output, using a regression loss function. This detection head structure is existing technology and will not be elaborated upon. It performs regression on the predicted bounding box position and category, outputting the final detection result. This output value is compared with the actual labeled value using the loss function, and the weights between each layer of the model are adjusted and updated based on this difference, ultimately resulting in a concrete surface defect detection model with the expected accuracy level. Step 3) Defect detection: The concrete surface defect detection model trained in step 2 is deployed on low-computing-power edge detection devices such as drones, portable visual defect detectors, and track-mounted intelligent inspection vehicles to acquire real-time images of the concrete surface to be inspected and output the defect location and defect type of the image to be inspected.

[0059] Specifically, the model is loaded with training weights, concrete defect images in different regions are detected, defect types and locations are marked, the score of the bounding box at that location (i.e., accuracy) is displayed, the detection results are output, and maintenance personnel are guided to carry out timely repairs. After that, the data collection and detection continue.

[0060] The intelligent detection model for concrete surface defects suitable for edge devices is put into use after pre-training. On the one hand, the collected video is directly input into the concrete surface defect detection model for defect detection; on the other hand, after data preprocessing, it is continuously expanded as a concrete surface defect dataset, and the training weights of the model are continuously updated and the updated weights are saved, so that the model can truly acquire the ability to learn continuously.

[0061] Furthermore, the number of parameters refers to the number of trainable parameters in the connections between neuron layers. The higher the model depth and complexity, the larger the number of parameters. Existing CNN models often require significant network depth and width to achieve high detection accuracy. Moreover, to overcome environmental interference and identify minute defects, they must introduce cumbersome structures such as FPN (Feature Pyramid Network) or PAN (Path Aggregation Network) into the network. This makes the number of parameters and computational complexity of traditional CNN models far exceed the computing power limits of low-power edge devices. However, in this embodiment, through the synergistic cooperation of the background-defect dual-mode activation module, the cross-stage local high-frequency feature enhancement module, and the partial class activation attention module, the CNN model can achieve high-precision concrete defect detection with an extremely low number of parameters without introducing cumbersome feature aggregation structures such as FPN or PAN. In other words, the model proposed in this embodiment has a shallow depth and does not introduce feature aggregation structures such as FPN or PAN, thus resulting in an extremely low number of parameters.

[0062] Example 2 This embodiment discloses a concrete surface defect detection system, including: The image acquisition module is used to acquire video streams from the concrete surface in real time. The image processing module, electrically connected to the image acquisition module, is used for preprocessing the acquired images; The feature extraction module performs multiple downsampling operations on the preprocessed image to obtain multi-scale feature maps; The background-defect dual-mode activation module performs background-defect dual-mode activation processing on multi-scale feature maps. The cross-stage local high-frequency feature enhancement module performs cross-stage local high-frequency feature enhancement processing on the activated feature map. The topology-adaptive graph convolutional attention module performs topology-adaptive graph convolutional attention processing on the enhanced feature map, including: transforming the feature map into topological nodes, constructing an adaptive topological neighborhood graph based on spatial distance similarity and feature similarity, interactively updating node features through graph convolutional units, generating spatial topology attention weights and channel feature attention weights, fusing the spatial topology attention weights and channel feature attention weights to obtain joint attention weights, and weighted fusing the joint attention weights with the input feature map; The detection head module detects the enhanced feature map and outputs the defect location and defect category.

[0063] For details, please refer to Example 1.

[0064] The detection system provided in this embodiment significantly improves the model's ability to distinguish between defect and background features with almost no increase in model complexity through a background-defect dual-mode activation module, applying different activation functions to the background and defect regions respectively, thus enhancing the specificity of feature representation. Through a cross-stage local high-frequency feature enhancement module, spatial domain features are converted into frequency domain features, and low-frequency components are filtered out while high-frequency components are enhanced. This enhances the high-frequency characteristics of defect features, effectively identifying minute defects and eliminating environmental noise interference, improving the detection accuracy of minute defects such as microcracks by more than 25%. Finally, through a topology-adaptive graph convolutional attention module, node features are interactively updated using graph convolution units to generate spatial topology attention weights and channel feature attention weights, which are then fused. The spatial topology attention weight and the channel feature attention weight are combined to obtain the joint attention weight. The joint attention weight is then weighted and fused with the input feature map. Combined with the topology-channel dual-branch parallel attention mechanism, the joint weighting of spatial and channel features is completed, ensuring the intra-class consistency of the final features and reducing the false negative rate by more than 15%. The three core modules work together to achieve high-precision concrete defect detection (detection accuracy of more than 92%) with fewer parameters without introducing complex feature aggregation structures such as feature pyramid networks or path aggregation networks. This allows the model to be successfully deployed on low-power edge devices with power consumption of no more than 15W, such as drones, portable visual defect detectors, and track-mounted intelligent inspection vehicles. The inference speed reaches more than 30 frames per second, meeting the real-time detection requirements in practical engineering.

[0065] Example 3 This embodiment provides a computer storage medium storing a computer program. When the computer program is executed by a processor, it implements the concrete surface defect detection method described in Embodiment 1.

[0066] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for detecting defects on concrete surfaces, characterized in that, Includes the following: Images of the concrete surface were acquired and preprocessed to obtain training and testing sets. Multiple downsampling operations are performed on the preprocessed image to obtain multi-scale feature maps; Perform background-defect dual-mode activation processing on the multi-scale feature maps; The activated feature map is subjected to cross-stage local high-frequency feature enhancement processing, including converting the spatial domain feature map into a frequency domain feature map, filtering the frequency domain feature map, reconstructing the filtered frequency domain feature map back to the spatial domain to obtain a response map within a set frequency range, and adaptively enhancing the high-frequency response map through a dual-branch weighting mechanism. Perform topology-adaptive graph convolutional attention processing on the enhanced feature maps; The enhanced feature map is input into the detection head, which then outputs the defect location and defect category.

2. The method for detecting defects on concrete surfaces according to claim 1, characterized in that, The process of performing multiple downsampling operations on the preprocessed image to obtain a multi-scale feature map includes the following: The model is trained by inputting a large defect image. The input feature map will undergo three downsampling operations in sequence, using convolution kernels. The feature map size is reduced step by step, and the number of channels is increased in each downsampling operation to obtain a multi-scale feature map.

3. The method for detecting defects on concrete surfaces according to claim 1, characterized in that, The background-defect dual-mode activation processing performed on the multi-scale feature map includes the following: The Sobel operator is used to calculate the gradients in the horizontal and vertical directions of the input feature map, resulting in the combined gradient strength for each pixel. After obtaining the pixel-by-pixel comprehensive gradient intensity of the input feature map, the dynamic threshold is calculated based on the magnitude of the comprehensive gradient intensity and the statistical characteristics of the local window. The mean local gradient of each pixel at position x in the feature map is calculated using average pooling. The local standard deviation of the feature map within the window range around the x-position of each pixel is calculated based on the comprehensive gradient intensity of each pixel and the mean local gradient within the window range around the x-position of each pixel. The dynamic threshold is determined based on the local standard deviation, the scaling factor n of the standard deviation, and the mean of the local gradient within the window range around the x-position of each pixel in the feature map. Set the range of values ​​for the standard deviation multiplier n. Areas with a comprehensive gradient intensity greater than the dynamic threshold will be identified as defect areas; otherwise, they will be identified as background areas. Different activation functions are applied to the background region and the defect region respectively.

4. The method for detecting defects on concrete surfaces according to claim 3, characterized in that, The application of different activation functions to the background region and the defect region includes the following: The SiLU function is used to activate the background region, and the Softplus activation function is used to activate the defect region. To improve the adaptability of the Softplus function to different data types, a scaling parameter is introduced. The mathematical expression for the dual-mode activation function is: Where α and γ are adjustable parameters, G x τ represents the overall gradient intensity at pixel x, and τ is the gradient threshold.

5. The method for detecting defects on concrete surfaces according to claim 1, characterized in that, The process of performing cross-stage local high-frequency feature enhancement on the activated feature map includes the following: Feature map X i Preliminary dimensionality reduction and feature extraction are performed using a convolutional bottleneck structure; Perform DCT calculation on the processed feature map to obtain feature map X. i The frequency domain characteristics of F i ; Filter selective suppression F i The low-frequency components are extracted, and the filtered frequency domain features are reconstructed back into the spatial domain through inverse discrete cosine transform to generate a high-frequency response map C of the same size as the original feature map. i ; By fusing the output feature maps of the two branches, we obtain the enhanced feature map C of the defect features. i+1 .

6. The method for detecting defects on concrete surfaces according to claim 1, characterized in that, The process of performing topological adaptive graph convolutional attention processing on the enhanced feature map includes: performing topological node transformation on the feature map, constructing an adaptive topological neighborhood graph based on spatial distance similarity and feature similarity, interactively updating node features through graph convolutional units, generating spatial topological attention weights and channel feature attention weights, fusing the spatial topological attention weights and channel feature attention weights to obtain joint attention weights, and weighted fusing the joint attention weights with the input feature map.

7. The method for detecting defects on concrete surfaces according to claim 1, characterized in that, The topology-adaptive graph convolutional attention processing performed on the enhanced feature map includes the following: The input feature map is transformed into a topological node, and an adaptive topological neighborhood graph is constructed based on spatial distance and feature similarity, reconstructing the feature space into a dynamic topological association structure. After being constrained by the neighborhood graph, the topological nodes generate local topological centers with local context specificity, and the interaction relationships between the local topological centers are constructed using graph convolution units; Each local topology center is treated as a node. First, information is exchanged between nodes, and then the characteristics of each node are updated. A topology-channel dual-branch parallel attention mechanism is constructed to generate spatial topology attention weights and channel feature attention weights respectively, and the dual-branch weights are fused by broadcasting Hadamard product. After obtaining the final joint attention weights, the weights are fused with the original input feature map through element-wise Hadamard product weighting to reconstruct a feature map output that fully aggregates global topological and local detail information.

8. The method for detecting defects on concrete surfaces according to claim 1, characterized in that, After the defect location and defect category are output through the detection head, the output value will be compared with the actual labeled value through a loss function. Based on this difference, the weight values ​​between each level of the model will be adjusted and updated, and finally a concrete surface defect detection model with an accuracy value that meets the expected level will be obtained.

9. A concrete surface defect detection system, characterized in that, include: The image acquisition module is used to acquire video streams from the concrete surface in real time. The image processing module, electrically connected to the image acquisition module, is used for preprocessing the acquired images; The feature extraction module performs multiple downsampling operations on the preprocessed image to obtain multi-scale feature maps; The background-defect dual-mode activation module performs background-defect dual-mode activation processing on multi-scale feature maps. The cross-stage local high-frequency feature enhancement module performs cross-stage local high-frequency feature enhancement processing on the activated feature map. The topology-adaptive graph convolutional attention module performs topology-adaptive graph convolutional attention processing on the enhanced feature map, including: transforming the feature map into topological nodes, constructing an adaptive topological neighborhood graph based on spatial distance similarity and feature similarity, interactively updating node features through graph convolutional units, generating spatial topology attention weights and channel feature attention weights, fusing the spatial topology attention weights and channel feature attention weights to obtain joint attention weights, and weighted fusing the joint attention weights with the input feature map; The detection head module detects the enhanced feature map and outputs the defect location and defect category.

10. A computer storage medium, characterized in that, The device contains a computer program that, when executed by a processor, implements a method for detecting defects on a concrete surface as described in any one of claims 1-8.