Bridge defect automatic identification method based on deep learning
By constructing a background texture prior map and a cross-domain attention mechanism, and combining frequency domain and spatial domain features, a geometrically guided vector field is used to identify bridge defects. This solves the problems of noise interference and discontinuity in long crack detection under complex backgrounds, and achieves high-precision structured detection results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HENAN PROVINCIAL HIGH GRADE HIGHWAY CONSTR SUPERVISION DEPT
- Filing Date
- 2026-01-19
- Publication Date
- 2026-06-16
AI Technical Summary
Existing machine vision-based bridge defect identification methods are easily affected by noise in complex backgrounds, making it difficult to accurately identify the topology and length of defects, resulting in low detection accuracy and the inability to generate engineering maintenance data with practical guiding significance.
Adaptive enhancement is achieved by constructing a background texture prior map. A cross-domain attention mechanism combining frequency domain phase consistency features and spatial domain pixel grayscale features is used to generate a topologically continuous defect mask through path evolution and minimum energy connection using a geometrically guided vector field. Structured detection data is then output by combining bridge component region weights.
It improves the accuracy of defect identification in complex backgrounds, realizes continuous detection and quantification of long cracks, and outputs structured data containing real physical dimensions and hazard levels to support bridge maintenance decisions.
Smart Images

Figure CN122222897A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer vision technology, specifically to a method for automatic identification of bridge defects based on deep learning. Background Technology
[0002] As transportation infrastructure ages, bridge structures inevitably develop surface defects such as cracks and spalling under long-term loads and environmental erosion. If these defects are not detected and repaired in a timely manner, they will seriously threaten the operational safety of transportation lines. Traditional bridge maintenance mainly relies on manual inspection using hand-held equipment for close-range visual inspection. This method is not only labor-intensive and risky, but its efficiency is also insufficient to meet the inspection needs of large-scale road networks. Therefore, utilizing automated data acquisition equipment in conjunction with intelligent algorithms for non-contact inspection of bridge surfaces has become an inevitable trend in the industry.
[0003] However, existing machine vision-based defect identification methods still have significant technical limitations in practical applications. Most existing image processing algorithms directly rely on pixel grayscale differences for threshold segmentation or edge extraction. When faced with the complex and varied environment of bridge surfaces, these algorithms are easily affected by water stains, oil, moss, and rough concrete textures, leading to misclassification of background noise as structural defects. Furthermore, existing deep learning detection models typically focus only on the classification of local features, lacking an understanding of the overall topological morphology of defects. Under uneven lighting or occlusion conditions, they often only identify discontinuous crack fragments, failing to reconstruct the true physical extension path of the defect. This results in significant deviations in the quantitative assessment of defect length and width, making it difficult to generate engineering maintenance data with practical guiding significance. Summary of the Invention
[0004] To address the shortcomings of existing technologies, this invention provides an automatic bridge defect identification method based on deep learning, which solves the problems mentioned in the background.
[0005] To achieve the above objectives, the present invention provides the following technical solution: an automatic bridge defect identification method based on deep learning, comprising the following steps: S1. Acquiring multi-scale inspection images of the bridge surface, calculating local texture complexity to construct a background texture prior map; performing saliency enhancement on the multi-scale inspection images based on the background texture prior map, suppressing texture noise components and enhancing structural edges, generating a preprocessed image sequence; S2. Mapping the preprocessed image sequence to a deep feature encoding network, extracting phase consistency features in the frequency domain and pixel grayscale features in the spatial domain; completing feature alignment and fusion through a cross-domain attention mechanism, regressing and predicting the confidence distribution matrix representing the classification probability of defect pixels, and the geometric guidance vector field representing the local extension trend of defects in the high-dimensional feature space; S3. [Further details on the confidence distribution matrix and its implications are needed for accurate translation.] Discrete defect fragments are obtained by performing a saliency threshold screening using a degree distribution matrix, and mapped to a geometric guide vector field. Using the fragment endpoints as seed points, path evolution and tracking are performed under the constraints of the geometric guide vector field. The vector collinearity and energy dissipation cost of the evolution paths between adjacent fragments are analyzed. When the minimum energy connection criterion is met, it is determined that the two belong to the same visual defect instance, and pixel-level path filling is performed along the evolution path that meets the minimum energy connection criterion to generate a topologically continuous defect binary mask. S4. The topologically continuous defect binary mask is remapped back to the original coordinate system of the multi-scale inspection image. The skeleton length and the maximum inscribed circle diameter are calculated based on the geometry of the connected components. Combined with the preset bridge component region weights, structured instance detection data containing the physical dimension and hazard level of the defect are output.
[0006] Further, the specific process of acquiring multi-scale inspection images of the bridge surface and calculating local texture complexity to construct a background texture prior map is as follows: Original images covering the bridge deck pavement, concrete beams, and pier surfaces are acquired, and an image pyramid is constructed through downsampling to generate multi-scale inspection images. A sliding window scan is performed on each level of the pyramid image, calculating the gray-level gradient magnitude and gradient direction of pixels in the sliding window region, constructing a local gradient direction histogram, and calculating information entropy based on the local gradient direction histogram. Regions with information entropy greater than a preset texture entropy threshold are marked as disordered texture regions, while regions with information entropy less than or equal to the preset texture entropy threshold are marked as structured regions. The gray-level co-occurrence matrix of the sliding window region is statistically analyzed, and energy and contrast features are extracted. Normalized weighted fusion is performed on information entropy, energy features, and contrast features to calculate the local texture complexity coefficient representing the probability of background noise texture. A background texture prior map aligned with the resolution of the multi-scale inspection image is constructed by traversing the pixels.
[0007] Furthermore, the specific process of performing significant enhancement on multi-scale inspection images based on the background texture prior map, suppressing texture noise components and enhancing structural edges, and generating a preprocessed image sequence is as follows: A nonlinear positive correlation mapping function between the texture complexity coefficient and the filtering smoothing parameters is established; an adaptive filtering weight matrix is calculated based on the background texture prior map; anisotropic diffusion filtering is performed on the multi-scale inspection images using the adaptive filtering weight matrix as a guiding parameter; strong diffusion smoothing is performed in regions where the texture complexity coefficient is greater than a preset smoothing threshold, and weak diffusion or stop diffusion is performed in regions where the texture complexity coefficient is less than or equal to the preset smoothing threshold; Laplacian operator convolution is performed on the filtered images, and high-frequency edge components are superimposed to generate a preprocessed image sequence with background texture suppression.
[0008] Furthermore, the specific process of mapping the preprocessed image sequence to a deep feature encoding network to extract phase consistency features in the frequency domain and pixel grayscale features in the spatial domain is as follows: In the frequency domain feature extraction branch, a Log-Gabor filter bank containing multiple center frequencies and directions is constructed. The preprocessed image sequence is subjected to convolution transformation through the Log-Gabor filter bank to obtain the amplitude and phase components of the frequency components. The phase angle offset of the frequency components at the same pixel position is calculated, and pixels with an absolute value of phase angle offset less than a preset phase deviation threshold are selected as phase consistency feature points. The phase consistency intensity value is calculated by superimposing the amplitude weight of the frequency components to generate a phase consistency feature map. In the spatial domain feature extraction branch, the convolution features of the preprocessed image sequence are extracted through continuous convolutional layers and max pooling layers to generate spatial pixel grayscale features that characterize the spatial distribution information of the image.
[0009] Furthermore, the specific process of achieving feature alignment and fusion through a cross-domain attention mechanism, regressing and predicting the confidence distribution matrix representing the classification probability of defective pixels, and the geometrically guided vector field representing the local extension trend of defects in the high-dimensional feature space is as follows: Convolutional projection is performed on the phase consistency features and spatial pixel grayscale features to unify the number of feature channels and spatial resolution. Global average pooling is then performed on the projected features to generate channel attention weight vectors. Adaptive recalibration is performed on each channel of the phase consistency features and spatial pixel grayscale features using these channel attention weight vectors, enhancing the weights of feature channels containing structural defect responses and suppressing the weights of feature channels containing background responses. The recalibrated features are then concatenated. The concatenated features are input into a dual-branch decoder. The first branch's convolutional layer and Softmax function regress the pixel class probability to generate the confidence distribution matrix. The second branch's regression layer predicts the unit tangent vector of the pixel in the two-dimensional plane to generate the geometrically guided vector field in the high-dimensional feature space.
[0010] Furthermore, discrete defect fragments are obtained by performing a saliency thresholding on the confidence distribution matrix and mapping them to a geometric guide vector field. The specific process of path evolution and tracking under the constraints of the geometric guide vector field, with the fragment endpoints as seed points, is as follows: The confidence distribution matrix is binarized by the saliency threshold, and morphological thinning is performed on the binary connected domain to extract a single-pixel-width skeleton as a discrete defect fragment; the pixel set of discrete defect fragments is traversed, and skeleton points with a single neighboring pixel are selected as evolution seed endpoints, and the coordinates of the evolution seed endpoints are projected onto the geometric guide vector field; with the evolution seed endpoints as the starting state, iterative step integration is performed according to the unit tangent vector at the corresponding position in the geometric guide vector field, the tracking coordinates at the next time step are updated, and an evolution path is generated along the direction indicated by the vector field until the evolution path enters a region where the confidence is lower than the preset cutoff threshold or the evolution length reaches the preset step truncation threshold.
[0011] Furthermore, the vector collinearity and energy dissipation cost of the evolution paths between adjacent segments are analyzed. When the minimum energy connection criterion is met, it is determined that the two belong to the same visual defect instance. Pixel-level path filling is then performed along the evolution path that satisfies the minimum energy connection criterion to generate a topologically continuous binary defect mask. The specific process is as follows: Using the end of the evolution path as the center, adjacent discrete defect segments with an Euclidean distance less than a preset neighborhood radius are searched to construct candidate connection pairs; an energy functional containing a distance penalty term, a direction consistency term, and a curvature smoothing term is constructed, and the path energy dissipation cost of the candidate connection pairs is calculated. The distance penalty term is calculated by the Euclidean distance between the endpoints, the direction consistency term is calculated by the cosine similarity between the tangent vector of the evolution path and the tangent vector of the endpoints of the adjacent segments, and the curvature smoothing term is calculated by the rate of curvature change of the connection path; the energy functional is solved by a minimization algorithm, and candidate connection pairs with energy dissipation costs lower than a preset connection threshold are selected as the same visual defect instance; a connection line is generated between the endpoints of adjacent discrete defect segments along the minimum energy path using a curve interpolation algorithm, and morphological dilation is performed on the connection line region to generate a topologically continuous binary defect mask.
[0012] Further, step S4 includes the following steps: acquiring camera imaging parameters and shooting distance information during multi-scale inspection image acquisition, and calculating the pixel physical resolution coefficient of the image plane; performing Euclidean distance transformation and skeleton extraction on the topologically continuous defect binary mask, counting the number of skeleton pixels in the connected component as the pixel length, and extracting the maximum distance response value corresponding to the skeleton point in the distance transformation map as the pixel width; converting the pixel length and pixel width into physical length and physical width values through the pixel physical resolution coefficient, determining the position coordinates of the center point of the defect binary mask in the original coordinate system, indexing the preset bridge component area distribution map to obtain the component importance weight, performing a weighted operation on the physical length value, physical width value and component importance weight to obtain the comprehensive hazard index, and generating structured instance detection data based on the preset classification threshold.
[0013] The present invention has the following beneficial effects:
[0014] (1) A bridge defect automatic identification method based on deep learning solves the problem of difficulty in extracting small defect features in complex backgrounds by constructing a background texture prior map and performing adaptive visual enhancement, combined with a frequency-space dual-domain feature fusion mechanism. This invention uses local texture complexity calculation to filter out high-frequency texture noise, suppressing environmental interference while preserving structural edges; further, it uses a cross-domain attention mechanism to align and fuse the illumination-invariant frequency domain phase consistency features with the spatial domain pixel grayscale features, and regresses to predict a high-confidence defect probability distribution and geometric guidance vector field, which significantly improves the algorithm's perception ability and recognition accuracy of defect targets in complex scenes such as water stains, shadows and rough surfaces.
[0015] (2) The bridge defect automatic identification method based on deep learning solves the problems of low quantification accuracy in long crack identification by the traditional algorithm through path evolution under geometric guidance vector field constraints and minimum energy connection criterion. This invention is not limited to isolated pixel classification, but uses vector field to represent the growth trend of defects. By analyzing the vector collinearity and energy dissipation cost between adjacent discrete segments, it intelligently determines and connects broken segments belonging to the same visual instance, realizing pixel-level semantic completion and topological reconstruction. Combining pixel physical resolution coefficient and component region weight, it realizes accurate mapping from image pixel space to physical measured data, and can output structured data containing real physical dimensions and comprehensive hazard level, providing a reliable quantitative basis for bridge maintenance decisions.
[0016] Of course, any product implementing this invention does not necessarily need to achieve all of the advantages described above at the same time. Attached Figure Description
[0017] Figure 1 This is a flowchart of the bridge defect automatic identification method based on deep learning according to the present invention. Detailed Implementation
[0018] To further illustrate the technical means and effects of the present invention in achieving its intended purpose, the following detailed description of the specific implementation methods, structures, features, and effects of the present invention, in conjunction with the accompanying drawings and preferred embodiments, is provided below.
[0019] This application's embodiments address the technical problems of high false alarm rates in existing technologies for defect identification against complex texture backgrounds, as well as discontinuous detection of long cracks and missing physical quantification data due to lighting or occlusion, through a deep learning-based automatic bridge defect identification method.
[0020] The overall idea of the scheme in this application embodiment is as follows: First, the local texture entropy value is calculated using the acquired multi-scale inspection images to construct prior information reflecting the roughness of the background, and based on this, the image is adaptively diffused and enhanced anisotropically to highlight the defect edges while smoothing the background noise.
[0021] Secondly, the enhanced image is input into a deep neural network, and the phase consistency features in the frequency domain and the convolution features in the spatial domain are extracted in parallel. The dual-domain information is fused using an attention mechanism to predict the confidence matrix representing the probability of the existence of defects and the geometric vector field representing the direction of defect extension.
[0022] Furthermore, based on the direction guidance of the vector field, the discrete defect segments with high confidence are iteratively tracked. The optimal connection path is found by using an energy functional that includes distance, direction and curvature constraints, and the broken segments are repaired into topologically continuous complete defect instances.
[0023] Finally, based on the camera imaging parameters, a mapping relationship between image pixels and physical space is established, the true physical length and width of the repaired defect skeleton are calculated, and multi-factor weighted calculation is performed in combination with the importance weight of bridge components to output a structured inspection result containing accurate physical dimensions and risk level.
[0024] Please see Figure 1 This invention provides a technical solution: an automatic bridge defect identification method based on deep learning, comprising the following steps: S1. Acquiring multi-scale inspection images of the bridge surface, calculating local texture complexity to construct a background texture prior map; performing saliency enhancement on the multi-scale inspection images based on the background texture prior map, suppressing texture noise components and enhancing structural edges, generating a preprocessed image sequence; S2. Mapping the preprocessed image sequence to a deep feature encoding network, extracting phase consistency features in the frequency domain and pixel grayscale features in the spatial domain; completing feature alignment and fusion through a cross-domain attention mechanism, regressing and predicting the confidence distribution matrix representing the classification probability of defect pixels, and the geometric guidance vector field representing the local extension trend of defects in the high-dimensional feature space; S3. Calculating the confidence distribution matrix... Discrete defect fragments are obtained by performing a saliency threshold screening and mapped to a geometrically guided vector field. Using the fragment endpoints as seed points, path evolution and tracking are performed under the constraints of the geometrically guided vector field. The vector collinearity and energy dissipation cost of the evolution paths between adjacent fragments are analyzed. When the minimum energy connection criterion is met, it is determined that the two belong to the same visual defect instance, and pixel-level path filling is performed along the evolution path that satisfies the minimum energy connection criterion to generate a topologically continuous defect binary mask. S4. The topologically continuous defect binary mask is remapped back to the original coordinate system of the multi-scale inspection image. The skeleton length and the maximum inscribed circle diameter are calculated based on the geometry of the connected components. Combined with the preset bridge component region weights, structured instance detection data containing the physical dimension and hazard level of the defect are output.
[0025] In this implementation scheme, step S1 is mainly used to construct a visual perception foundation adapted to complex engineering environments. This step first uses multi-scale image acquisition technology to cover bridge surface details at different resolutions, and then calculates local texture complexity. This term refers to parameters that quantify the roughness of the concrete surface and the intensity of background clutter using the entropy value of the gray-level gradient distribution or co-occurrence matrix features within a local area of the image. Based on the constructed background texture prior map, the system performs adaptive saliency enhancement, that is, dynamically adjusting the filtering weights according to the texture complexity, smoothing high-texture areas (such as rough concrete backgrounds) while sharpening low-texture areas (such as crack edges). Its technical role is to suppress background texture noise components resembling crack morphology from the signal source and highlight the visual saliency of real structural edges, providing high signal-to-noise ratio input data for subsequent deep feature extraction. Step S2 is mainly used to achieve a dual semantic representation of defect objects within the feature space. The system maps the preprocessed image to a deep network and extracts phase consistency features in the frequency domain. This term refers to a method for detecting image features based on the phase alignment of Fourier components. Its characteristic is invariance to changes in illumination and contrast, effectively addressing the challenge of detecting shadow areas on bridges. Simultaneously, it combines spatial domain pixel grayscale features and uses a cross-domain attention mechanism to weightedly fuse the two. The geometric guidance vector field predicted in this step is a two-dimensional unit vector assigned to each pixel, indicating the possible extension direction or growth trend of a defect at that location. Its technical role is not only to determine whether a pixel is a defect but also to assign directional semantics to the defect through the vector field, providing geometric constraints for solving crack fractures and discontinuities. Step S3 is mainly used for topological repair of defect instances based on visual reasoning. The system uses a saliency threshold to filter out high-confidence discrete defect segments and, starting from the segment endpoints, performs path evolution and tracking under the guidance of the geometric guidance vector field. This process is similar to particle trajectory simulation in a vector field manifold. The system further analyzes the vector collinearity and energy dissipation cost between adjacent segments. The energy dissipation cost is a quantitative indicator that comprehensively considers the connection path length, directional deviation, and curvature change. The minimum energy connection criterion refers to finding the optimal solution with the minimum cost among all possible connection paths. Its technical function is to use global geometric potential energy logic to reconnect discrete segments broken due to occlusion or blurring into the same visual instance of the defect, and perform pixel-level filling, thereby generating a complete binary defect mask with topological continuity. Step S4 is mainly used to convert the recognition results in the image space into physically usable quantitative data for engineering. The system maps the repaired binary mask back to the original coordinate system and calculates the skeleton length and the maximum inscribed circle diameter based on the connected component geometry. The maximum inscribed circle diameter is a robust indicator used to characterize the width of irregular cracks, representing the diameter of the largest circular region that can be accommodated within the crack contour.By combining preset weights for bridge component areas—numerical coefficients assigned to different parts of the bridge (such as load-bearing main beams and non-load-bearing guardrails) based on their importance to structural safety—this technology enables a precise conversion from visual features to physical dimensions, outputting structured instance inspection data containing accurate physical dimensions and hazard levels. This directly serves the practical needs of bridge maintenance and safety assessment.
[0026] Specifically, the process of acquiring multi-scale inspection images of the bridge surface and calculating local texture complexity to construct a background texture prior map is as follows: Original images covering the bridge deck pavement, concrete beams, and pier surfaces are acquired, and an image pyramid is constructed through downsampling to generate multi-scale inspection images. A sliding window scan is performed on each level of the pyramid image, calculating the gray-level gradient magnitude and gradient direction of pixels in the sliding window region, constructing a local gradient direction histogram, and calculating information entropy based on the local gradient direction histogram. Regions with information entropy greater than a preset texture entropy threshold are marked as disordered texture regions, while regions with information entropy less than or equal to the preset texture entropy threshold are marked as structured regions. The gray-level co-occurrence matrix of the sliding window region is statistically analyzed, and energy and contrast features are extracted. Normalized weighted fusion is performed on the information entropy, energy features, and contrast features to calculate the local texture complexity coefficient representing the probability of background noise texture. A background texture prior map aligned with the resolution of the multi-scale inspection image is constructed by traversing the pixels.
[0027] In this implementation, firstly, original images covering the bridge deck pavement, concrete beams, and pier surfaces are acquired, and an image pyramid is constructed through downsampling. This step utilizes Gaussian smoothing and downsampling techniques to generate image sequences of different resolutions, aiming to simulate the perception capabilities of machine vision systems at different observation distances, thereby ensuring that the algorithm can simultaneously capture macroscopic structural orientation and microscopic texture details. Subsequently, a sliding window scan is performed on the images at each level of the pyramid, calculating the local texture features within the sliding window region. Considering the directional nature of cracks on the bridge surface and the disordered nature of background noise (such as concrete pores and corrosion spots), this embodiment introduces local gradient direction information entropy to quantify this disorder. For any pixel (u,v) in the image, the gradient direction histogram information entropy within its sliding window region is defined. The calculation formula is as follows: Where K represents the total number of intervals divided by the gradient direction histogram, usually between 8 and 36, used to discretize the direction space from 0 to 360 degrees. This represents the probability distribution of gradient directions falling into the k-th interval within the sliding window neighborhood of pixel (u,v). This probability is determined by the ratio of the number of pixels falling into that interval to the total number of pixels in the neighborhood. Technical explanation: This formula utilizes information theory principles. When the texture in the neighborhood is chaotic (e.g., a rough concrete surface), the gradient direction distribution is uniform, resulting in a high information entropy value. When there are obvious cracks or edges in the neighborhood (structural regions), the gradient directions are concentrated, resulting in a low information entropy value. Furthermore, to enhance the perception of texture roughness, the gray-level co-occurrence matrix (GLCM) of the sliding window region is statistically analyzed, and energy features are extracted. With contrast features The gray-level co-occurrence matrix describes the joint probability of gray levels occurring between two pixels that are a specific distance apart in an image. The calculation formula is as follows: ; ;in, This indicates the number of gray levels in the image, typically 256. and The row and column indices of the gray-level co-occurrence matrix represent the gray values of pairs of pixels, respectively. Indicates at pixel point Within the neighborhood of , the gray value is and The normalized probability of pixel pairs appearing. Technical explanation: Energy features reflect the uniformity and regularity of texture; the higher the energy value, the coarser and more regular the texture. Contrast features reflect the depth of texture grooves and image sharpness; the higher the contrast, the sharper the texture. Finally, the above features are normalized and weighted to calculate the local texture complexity coefficient representing the probability of background noise texture, which is used to construct the background texture prior map. ;in, , These represent the normalized entropy, contrast, and energy eigenvalues, respectively, which are mapped to the [0,1] interval during the normalization process. , , Let be the weight coefficients of each feature, and Parameter determination method: weighting coefficients Principal Component Analysis (PCA) is used to determine the variance contribution rate of each feature component from a selected sample image set. This variance contribution rate is then used as the basis for weight allocation to ensure that the fused coefficients can best represent the differences in texture. Technical Explanation: This step integrates directional disorder, the degree of grayscale variation, and local uniformity to generate... The higher the value, the greater the probability that the region belongs to background noise texture; the lower the value, the greater the probability that the region belongs to structural defects, thus providing accurate prior guidance for subsequent adaptive filtering.
[0028] Specifically, the process of performing significant enhancement on multi-scale inspection images based on background texture prior maps, suppressing texture noise components and enhancing structural edges, and generating a preprocessed image sequence is as follows: A nonlinear positive correlation mapping function between texture complexity coefficients and filtering smoothing parameters is established; an adaptive filtering weight matrix is calculated based on the background texture prior map; anisotropic diffusion filtering is performed on the multi-scale inspection images using the adaptive filtering weight matrix as a guiding parameter; strong diffusion smoothing is performed in regions where the texture complexity coefficient is greater than a preset smoothing threshold, and weak diffusion or stop diffusion is performed in regions where the texture complexity coefficient is less than or equal to the preset smoothing threshold; Laplacian operator convolution is performed on the filtered images, and high-frequency edge components are superimposed to generate a preprocessed image sequence with background texture suppression.
[0029] In this implementation scheme, significant enhancement is performed on multi-scale inspection images based on the background texture prior map constructed in the previous step. The core of this process lies in utilizing anisotropic diffusion filtering technology. However, unlike traditional methods that rely solely on gradient information, this embodiment introduces texture complexity as a control variable for diffusion intensity. The aim is to smooth high-texture-complexity background regions (such as mottled concrete surfaces) while preventing the filtering process from crossing low-texture-complexity structural edges (such as cracks), thereby achieving edge-preserving noise reduction. First, a nonlinear positive correlation mapping function between the texture complexity coefficient and the filtering smoothing parameters is established, and the adaptive diffusion conduction coefficient corresponding to each pixel is calculated: ;in, This is an adjustment factor that controls the steepness of the function curve, used to control the smoothness of the transition from structural regions to textured regions; This is the local texture complexity coefficient calculated in the previous step; This represents the preset smoothing threshold, i.e., the median inflection point of texture complexity. Technical explanation: This formula uses the Sigmoid function form, where the texture complexity of a pixel... Greater than the threshold At that time, the conduction coefficient A value close to 1 indicates strong diffusion smoothing; conversely, a value close to 0 indicates stopping diffusion to protect edges. This mapping mechanism ensures that the filtering operation targets only background noise without blurring crack features. Then, using the aforementioned adaptive diffusion propagation coefficient as a guiding parameter, the image is... Perform anisotropic diffusion iterative updates. Image state after the next iteration The calculation is as follows: ;in, The time step is used to control the rate of change in a single iteration, and is usually set to less than 0.25 to ensure numerical stability. `div` is the gradient operator used to calculate the rate of change of grayscale values of image pixels in space; `div` is the divergence operator, representing the flux source or sink of the vector field. Technical explanation: This formula simulates the physical process of heat conduction, but in this scheme, the flow capacity of heat (pixel grayscale values) is determined by the texture complexity. In complex background regions, the conduction coefficient is large, and grayscale differences are quickly smoothed out (denoising); in simple cracks, the conduction coefficient is small, and grayscale differences are preserved. This makes the preprocessed image visually exhibit a uniform background and sharp crack edges. Finally, to further compensate for the slight edge loss that may be caused by discretization calculations, Laplacian convolution is performed on the diffuse-filtered image. The Laplacian operator is a second-order differential operator that can capture regions of rapid grayscale change in the image. By proportionally superimposing the high-frequency edge components extracted by the Laplacian operator back into the filtered image, the grayscale contrast between defect edges and the background is further improved, ultimately generating a preprocessed image sequence with consistent background texture and significant target features, providing high-quality input data for subsequent feature extraction by deep neural networks.
[0030] Specifically, the process of mapping the preprocessed image sequence to a deep feature encoding network and extracting phase consistency features in the frequency domain and pixel grayscale features in the spatial domain is as follows: In the frequency domain feature extraction branch, a Log-Gabor filter bank containing multiple center frequencies and directions is constructed. The preprocessed image sequence is subjected to convolution transformation through the Log-Gabor filter bank to obtain the amplitude and phase components of the frequency components. The phase angle offset of the frequency components at the same pixel position is calculated, and pixels with an absolute value of phase angle offset less than a preset phase deviation threshold are selected as phase consistency feature points. The phase consistency intensity value is calculated by superimposing the amplitude weight of the frequency components to generate a phase consistency feature map. In the spatial domain feature extraction branch, the convolution features of the preprocessed image sequence are extracted through continuous convolutional layers and max pooling layers to generate spatial pixel grayscale features that characterize the spatial distribution information of the image.
[0031] In this implementation scheme, firstly, in the frequency domain feature extraction branch, a Log-Gabor filter bank is constructed to overcome the DC component interference and bandwidth limitations of traditional filters. The Log-Gabor filter is a Gaussian transfer function constructed on a logarithmic frequency scale, which can be constructed with arbitrary bandwidth and has no DC component, better matching the encoding characteristics of human visual system for image frequency information. This filter bank is used to perform multi-scale convolution transformation on the preprocessed image sequence, converting the image from the spatial domain to the frequency domain, thereby separating the amplitude and phase components at different frequency levels. Subsequently, the phase consistency intensity value is calculated. Unlike edge detection based on gray-level gradients, the phase consistency model assumes that feature points (such as crack edges) appear at the locations where the phase of the image's frequency components is most consistent, rather than at the locations of the most drastic gray-level changes. This characteristic makes the detection results highly robust to changes in illumination and image contrast. Pixel point calculation... Phase coherence intensity value at The formula is as follows: ;in, and These represent the direction index and scale index of the filter, respectively. and Representing the total number of directions and scales respectively. This is a frequency expansion weighting factor, used to assign higher weights to feature components with a wider frequency distribution; In direction and scale Next pixel The amplitude component; This is a phase deviation measurement function, and its value is equal to... Characterizes the current component phase Phase with weighted average Alignment degree; This is the noise threshold used to suppress unstructured background noise response; To prevent tiny constants with a denominator of zero; Indicates the floor sign; sets to zero when the result is negative. Parameter determination method: noise threshold. Adaptive estimation is performed by statistically analyzing the Rayleigh distribution characteristics of the filter response in non-edge regions, typically taking a value 2 to 3 times the mean of the noise response distribution. Technical explanation: The physical meaning of this formula is that when a crack exists, the phases of each frequency component highly overlap at the edge. Approaching 1, the cumulative molecular value is large, thus generating a phase consistency feature map with high response. However, in areas of illumination, shadow, or water stains, the phase is disordered, and the molecules are truncated by a noise threshold, effectively eliminating false edges. In parallel, in the spatial feature extraction branch, convolutional features of the preprocessed image sequence are extracted using consecutive convolutional layers and max-pooling layers. The convolutional layers perform calculations by sliding across the image using learnable convolutional kernels, capturing local texture and geometry; the max-pooling layers reduce data dimensionality while preserving key features, enhancing the robustness of features to small translations.
[0032] Specifically, the process of achieving feature alignment and fusion through a cross-domain attention mechanism, regressing and predicting the confidence distribution matrix representing the classification probability of defective pixels, and the geometrically guided vector field representing the local extension trend of defects in the high-dimensional feature space, is as follows: Convolutional projection is performed on phase consistency features and spatial pixel grayscale features to unify the number of feature channels and spatial resolution. Global average pooling is then performed on the projected features to generate channel attention weight vectors. Adaptive recalibration is performed on each channel of the phase consistency features and spatial pixel grayscale features using these channel attention weight vectors, enhancing the weights of feature channels containing structural defect responses and suppressing the weights of feature channels containing background responses. The recalibrated features are then concatenated. The concatenated features are input into a dual-branch decoder. The first branch's convolutional layer and Softmax function regress the pixel class probability to generate the confidence distribution matrix. The second branch's regression layer predicts the unit tangent vector of the pixel in the two-dimensional plane to generate the geometrically guided vector field in the high-dimensional feature space.
[0033] In this implementation, firstly, convolutional projection is performed on the phase consistency features and spatial pixel grayscale features. Since frequency domain features and spatial domain features often have different channel numbers, a 1×1 convolution operation maps them to a unified dimensional space, and the spatial resolution is adjusted to align them, laying the data foundation for subsequent fusion. Subsequently, feature alignment and fusion are completed through a cross-domain attention mechanism. To enable the network to automatically identify which feature channels contain crucial crack information and which channels only contain background noise, this embodiment introduces channel attention weight vectors for adaptive recalibration. This process first performs global average pooling on the feature map, compressing the two-dimensional spatial information into a one-dimensional channel descriptor, and then learns the nonlinear interaction relationships between channels through a fully connected layer. Channel attention weights. The calculation formula is as follows: ;in, Indicates the index of the current feature channel; The total number of channels for the input features; For the first The feature description values of each channel after global average pooling; and These are the learnable weight matrices for the dimensionality reduction layer (Squeeze) and the dimensionality increase layer (Excitation), respectively, used to capture the dependencies between channels; The number of intermediate channels after dimensionality reduction is usually taken as... The reduction ratio (e.g., 1 / 16); The ReLU activation function introduces nonlinearity. This is the Sigmoid activation function, used to map the output weights to the interval between 0 and 1. Technical explanation: This formula implements a feature selection mechanism. The calculated weights... The larger the value, the more likely it is to be the first. The more important a channel is for identifying defects (e.g., a channel containing crack edge responses), the more important it is. The system then uses this weight to perform channel-by-channel multiplication weighting on the original features, thereby enhancing the structural defect response and suppressing the background response, achieving intelligent selection of cross-domain features. Finally, the recalibrated and cascaded features are input into a dual-branch decoder. The first branch uses convolutional layers and the Softmax function to regress the pixel class probability, generating a confidence distribution matrix that intuitively reflects the confidence that each pixel belongs to a defect. The second branch uses regression layers to predict the geometric guidance vector field. The geometric guidance vector field is defined as the set of unit tangent vectors on a two-dimensional plane, for each pixel in the image. The network predicts its corresponding unit vector. This vector indicates the tangential direction of the defect's extension along the skeleton at that location. In this way, the network outputs not only the defect's location (confidence score) but also its morphological trend (vector field), providing crucial geometric manifold constraints for subsequent solutions to crack fracture connection problems.
[0034] Specifically, discrete defect fragments are obtained by performing a saliency threshold screening on the confidence distribution matrix and mapping them to a geometric guide vector field. The specific process of path evolution and tracking under the constraint of the geometric guide vector field, with the fragment endpoints as seed points, is as follows: The confidence distribution matrix is binarized by the saliency threshold, and morphological thinning is performed on the binary connected domain to extract a single-pixel-width skeleton as a discrete defect fragment; the pixel set of discrete defect fragments is traversed, and skeleton points with a single neighboring pixel are selected as evolution seed endpoints. The coordinates of the evolution seed endpoints are projected onto the geometric guide vector field; with the evolution seed endpoints as the starting state, iterative step integration is performed according to the unit tangent vector at the corresponding position in the geometric guide vector field to update the tracking coordinates at the next time step, generating an evolution path along the direction indicated by the vector field, until the evolution path enters a region where the confidence is lower than the preset cutoff threshold or the evolution length reaches the preset step truncation threshold.
[0035] In this implementation scheme, firstly, a saliency threshold is used to perform binarization segmentation on the confidence distribution matrix, converting the continuous probability response map into clearly defined foreground and background regions. To accurately locate the topological endpoints of the defect, morphological thinning is performed on the binary connected components. Morphological thinning is an image processing operation based on mathematical morphology, which iteratively strips the boundary pixels of the foreground of the binary image, shrinking wide cracks to a single-pixel-width central skeleton line while maintaining connectivity. The set of pixels along this skeleton line is traversed, and skeleton points with a single neighboring pixel are selected as evolutionary seed endpoints; that is, isolated endpoints with only one connected pixel in their 8-neighborhood are identified, and the coordinates of these endpoints are projected onto a geometrically guided vector field as the starting position for path tracing. Subsequently, using the evolutionary seed endpoints as the starting state, iterative step integration based on the geometrically guided vector field is performed. The core of this step lies in using the manifold direction information contained in the vector field to infer the potential extension path of the crack at the fracture point. Assume the... The tracking coordinates at the next iteration are Then the first The coordinates updated in the next iteration The calculation formula is as follows: ;in, This represents the pixel coordinate position in the current iteration step, the initial state. The endpoints of the selected evolutionary seeds; Represents the coordinates in the geometrically guided vector field The corresponding unit tangent vector at that location indicates the local growth direction of the defect along the manifold at that position; This represents the iteration step size coefficient, used to control the distance increment in a single tracking iteration. Parameter determination method: Iteration step size coefficient. The step size is typically set between 0.5 and 1.0 pixels. Too large a step size may cause the path to deviate from the actual trajectory, while too small a step size results in low computational efficiency. Technical explanation: This formula borrows the idea of Euler's integral method to simulate the trajectory of particles in a flow field. By continuously accumulating tiny displacements along the tangential direction, the system can predict the physical extension trend of the visually fractured portion of the crack. This tracking process continues until the evolved path enters a low-response region with a confidence level below a preset cutoff threshold, or the evolution length exceeds a preset truncation threshold, thus preventing the path from diverging infinitely in the informationless region and ensuring the reliability of the tracking results.
[0036] Specifically, the process of analyzing the vector collinearity and energy dissipation cost of the evolution paths between adjacent segments, and determining that they belong to the same visual defect when the minimum energy connection criterion is met, and performing pixel-level path filling along the evolution path that satisfies the minimum energy connection criterion to generate a topologically continuous binary defect mask is as follows: Taking the end of the evolution path as the center, search for adjacent discrete defect segments with an Euclidean distance less than a preset neighborhood radius to construct candidate connection pairs; construct an energy functional including a distance penalty term, a direction consistency term, and a curvature smoothing term, and calculate the path energy dissipation cost of the candidate connection pairs, where the distance penalty term is calculated by the Euclidean distance between the endpoints, the direction consistency term is calculated by the cosine similarity between the tangent vector of the evolution path and the tangent vector of the endpoints of the adjacent segments, and the curvature smoothing term is calculated by the rate of curvature change of the connection path; solve the energy functional by minimization algorithm, and screen candidate connection pairs with energy dissipation costs lower than a preset connection threshold to determine that they are the same visual defect instance; generate connection lines between the endpoints of adjacent discrete defect segments along the minimum energy path using a curve interpolation algorithm, perform morphological dilation on the connection line region, and generate a topologically continuous binary defect mask.
[0037] In this implementation, firstly, using the end of the generated evolution path as the center, adjacent discrete defect segments with an Euclidean distance smaller than a preset neighborhood radius are searched to construct candidate connection pairs. To filter out segments truly belonging to the same crack instance from numerous candidates, the rationality of the connection needs to be quantitatively evaluated. This embodiment constructs an energy functional including a distance penalty term, a direction consistency term, and a curvature smoothing term to calculate the path energy dissipation cost between candidate connection pairs. The calculation formula is as follows: ;in, This represents the Euclidean distance between the end of the evolution path and the endpoint of the adjacent discrete defect segment; the closer the distance, the lower the cost. This is the distance normalization factor, usually taken as the search neighborhood radius; This represents the angle between the tangent vector of the evolution path and the tangent vectors of the endpoints of adjacent segments. For cosine similarity, this term utilizes The logic ensures that the cost is minimized when the two directions tend to be collinear, i.e., it penalizes abruptly broken line connections. It represents the rate of curvature change of the connection path, used to penalize high-frequency jitter or sharp corners generated at the connection point; , , These are the weighting coefficients for the distance, direction, and curvature terms, respectively, and they satisfy... Parameter determination method: Weight coefficients are determined using the Analytic Hierarchy Process (AHP), typically assigned to a directional consistency term. The highest weight is given because the continuity of the crack's extension direction is the strongest geometric constraint for determining whether two instances are the same. Technical explanation: This formula defines an energy minimization problem, aiming to find the smoothest, shortest, and most consistent connection path. When the calculated energy dissipation cost... When the connection threshold is below a preset threshold, two discrete segments are determined to belong to the same visual instance of defect physically, meaning they were originally connected but were broken due to imaging. A curve interpolation algorithm is used to generate connecting lines between the endpoints of adjacent discrete defect segments along the minimum energy path. Cubic spline interpolation or Bézier curve fitting is typically used to ensure the continuity of derivatives at the connection points. Subsequently, morphological dilation is performed on the generated single-pixel connecting lines. Morphological dilation is an operation that expands the highlighted areas (foreground) in the image. By convolving the connecting lines with structuring elements of a certain size (such as circular or square kernels), a width matching the original crack is achieved, ultimately generating a topologically continuous and morphologically complete binary defect mask, realizing semantic-level completion of the defect object.
[0038] Specifically, step S4 includes the following steps: acquiring camera imaging parameters and shooting distance information during multi-scale inspection image acquisition, and calculating the pixel physical resolution coefficient of the image plane; performing Euclidean distance transformation and skeleton extraction on the topologically continuous defect binary mask, counting the number of skeleton pixels in the connected component as the pixel length, and extracting the maximum distance response value corresponding to the skeleton point in the distance transformation map as the pixel width; converting the pixel length and pixel width into physical length and physical width values through the pixel physical resolution coefficient, determining the position coordinates of the center point of the defect binary mask in the original coordinate system, indexing the preset bridge component area distribution map to obtain the component importance weight, performing a weighted operation on the physical length value, physical width value and component importance weight to obtain the comprehensive hazard index, and generating structured instance detection data based on the preset classification threshold.
[0039] In this implementation scheme, firstly, camera imaging parameters and shooting distance information are acquired during multi-scale inspection image acquisition, and the pixel physical resolution coefficient of the image plane is calculated. To achieve accurate mapping from digital image space to real physical space, this embodiment constructs a pinhole imaging model to calculate the actual physical size represented by a single pixel, i.e., the pixel physical resolution coefficient. The calculation formula is as follows: ;in, The shooting distance is the vertical distance from the optical center of the camera to the surface of the bridge. This data is usually obtained by the onboard laser rangefinder or depth camera. The physical width of the camera image sensor depends on the hardware specifications; For the camera's focal length, This represents the total number of pixels in the horizontal direction of the image. Technical explanation: This step establishes the proportional conversion between the two-dimensional image pixel coordinate system and the three-dimensional physical world. The physical meaning is that the width of one pixel in the image corresponds to the number of millimeters on the actual bridge surface. This is achieved by introducing the shooting distance. This variable allows the algorithm to automatically correct for perspective effects caused by varying shooting distances, ensuring the objectivity of the quantified data. Subsequently, Euclidean distance transformation and skeleton extraction are performed on the topologically continuous binary mask of the defect to calculate pixel-level geometric dimensions. Terminology: Euclidean distance transformation is an image processing algorithm that calculates the Euclidean distance from each foreground pixel to its nearest background pixel in a binary image. In crack detection, the distance transformation value at the crack center point represents half the crack width. Terminology: Skeleton extraction refers to thinning connected components, removing edge pixels until only a one-pixel-wide centerline remains, used to characterize the topological length of the crack. Based on the above processing, the pixel length is statistically analyzed. With pixel width The pixel width The calculation formula is as follows: ;in, This represents the set of skeleton pixels extracted from the defective connected components. Indicates coordinates The Euclidean distance transform response value at; This is a maximum value extraction operation. Technical explanation: This formula utilizes the grayscale characteristics of the distance transformation map, directly reading the maximum distance response value on the skeleton line and multiplying it by 2, thereby accurately obtaining the maximum inscribed circle diameter of the crack as its width. Compared to traditional edge distance measurements, this method is highly robust to burrs and irregularities at the crack edges. Next, the pixel size is converted to the physical size using the pixel physical resolution coefficient, i.e. and Simultaneously, the coordinates of the defect center point are determined, and the importance weight of the component is obtained by indexing a pre-defined bridge component area distribution map. Finally, the physical length value, physical width value, and component importance weight are weighted and calculated to determine the comprehensive hazard index. The calculation formula is as follows: ;in, This parameter assigns importance weights to bridge components; for example, the main beam area has a greater weight than the guardrail area. This parameter is preset according to the bridge structural design code. and These are the calculated physical length and physical width, respectively; and These are the length influence factor and the width influence factor, used to balance the dimensional differences between the two dimensions; This is a width sensitivity index, typically with a value greater than 1, indicating that the impact of defect width on safety increases exponentially. The natural logarithm function is used to smooth the distribution range of length values. This formula constructs a nonlinear multi-factor risk assessment model. It considers the geometric scale of the defect itself (the longer and wider the defect, the greater the harm) and also introduces spatial location semantics (critical parts have double the harm). Finally, the system is based on... If the numerical value falls within the preset grading threshold range (such as level 1, level 2, level 3), structured instance detection data containing defect type, precise physical size and hazard level will be automatically generated, directly providing quantitative basis for bridge maintenance decisions.
[0040] In summary, this application has at least the following effects:
[0041] This deep learning-based automatic bridge defect identification method effectively solves the problem of distinguishing between rough texture noise and tiny crack edges on complex concrete surfaces by constructing a background texture prior map and establishing an adaptive mapping relationship between texture complexity and filtering intensity, achieving high signal-to-noise ratio visual enhancement. Furthermore, it introduces a frequency-space cross-domain attention fusion mechanism and geometrically guided vector field prediction technology. This not only overcomes illumination and shadow interference by utilizing phase consistency features but also successfully repairs discrete fragments broken due to occlusion or imaging blur into topologically continuous complete instances by utilizing the manifold constraints and minimum energy connection criteria of the vector field, achieving pixel-level semantic completion. Finally, by combining pixel physical resolution coefficients and a multi-factor risk assessment model, it achieves accurate mapping from image pixel space to physical entity space, outputting structured data containing real physical dimensions and comprehensive hazard levels, significantly improving the detection accuracy and engineering practical value of intelligent bridge inspection.
[0042] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0043] This invention is described with reference to flowchart illustrations and / or block diagrams of systems, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0044] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0045] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0046] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.
[0047] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.
Claims
1. A method for automatic bridge defect identification based on deep learning, characterized in that, Includes the following steps: S1. Obtain multi-scale inspection images of the bridge surface and calculate the local texture complexity to construct a background texture prior map; Significant enhancement is performed on the multi-scale inspection images based on the background texture prior map, suppressing texture noise components and enhancing structural edges to generate a preprocessed image sequence; S2. Map the preprocessed image sequence to a deep feature encoding network to extract phase consistency features in the frequency domain and pixel grayscale features in the spatial domain; complete feature alignment and fusion through a cross-domain attention mechanism, and regress to predict the confidence distribution matrix representing the classification probability of defective pixels, as well as the geometric guidance vector field representing the local extension trend of defects in the high-dimensional feature space. S3. Perform significance thresholding on the confidence distribution matrix to obtain discrete defect fragments, and map them to a geometric guide vector field. Using the fragment endpoints as seed points, perform path evolution and tracking under the constraints of the geometric guide vector field. Analyze the vector collinearity and energy dissipation cost of the evolution paths between adjacent fragments. When the minimum energy connection criterion is met, determine that the two belong to the same defect visual instance, and perform pixel-level path filling along the evolution path that satisfies the minimum energy connection criterion to generate a topologically continuous defect binary mask. S4. Remap the topologically continuous binary mask of defects back to the original coordinate system of the multi-scale inspection image, calculate the skeleton length and the maximum inscribed circle diameter based on the geometry of the connected components, and output structured instance detection data containing the physical dimension and hazard level of defects by combining the preset weights of bridge component regions.
2. The method for automatic bridge defect identification based on deep learning according to claim 1, characterized in that: The specific process of acquiring multi-scale inspection images of the bridge surface and calculating local texture complexity to construct a background texture prior map is as follows: Original images covering the bridge deck pavement, concrete beams and pier surfaces are acquired, and image pyramids are constructed through downsampling to generate multi-scale inspection images; Perform sliding window scanning on the images of each level of the pyramid, calculate the gray-level gradient magnitude and gradient direction of the pixels in the sliding window region, construct a local gradient direction histogram, calculate the information entropy based on the local gradient direction histogram, mark the region with information entropy greater than the preset texture entropy threshold as disordered texture region, and mark the region with information entropy less than or equal to the preset texture entropy threshold as structured region. The gray-level co-occurrence matrix of the sliding window region is statistically analyzed, and energy and contrast features are extracted. Normalized weighted fusion is performed on information entropy, energy features and contrast features. The local texture complexity coefficient representing the texture probability of background noise is calculated. A background texture prior map aligned with the resolution of the multi-scale inspection image is constructed by traversing the pixels.
3. The method for automatic bridge defect identification based on deep learning according to claim 2, characterized in that: The specific process of performing saliency enhancement on multi-scale inspected images based on background texture prior maps, suppressing texture noise components and enhancing structural edges, and generating a preprocessed image sequence is as follows: A nonlinear positive correlation mapping function between texture complexity coefficients and filtering smoothing parameters is established, and an adaptive filtering weight matrix is calculated based on the background texture prior map. Anisotropic diffusion filtering is performed on multi-scale inspection images by using an adaptive filtering weight matrix as a guiding parameter. Strong diffusion smoothing is performed in regions where the texture complexity coefficient is greater than the preset smoothing threshold, and weak diffusion or stop diffusion is performed in regions where the texture complexity coefficient is less than or equal to the preset smoothing threshold. The filtered image is convolved with the Laplacian operator, and high-frequency edge components are superimposed to generate a preprocessed image sequence with suppressed background texture.
4. The method for automatic bridge defect identification based on deep learning according to claim 1, characterized in that: The specific process of mapping the preprocessed image sequence to a deep feature coding network to extract phase consistency features in the frequency domain and pixel grayscale features in the spatial domain is as follows: In the frequency domain feature extraction branch, a Log-Gabor filter bank containing multiple center frequencies and directions is constructed. The preprocessed image sequence is then subjected to convolution transformation through the Log-Gabor filter bank to obtain the amplitude and phase components of the frequency components. Calculate the phase angle offset of the frequency components at the same pixel position, select pixels with an absolute value of phase angle offset less than a preset phase deviation threshold as phase consistency feature points, superimpose the amplitude weight of the frequency components to calculate the phase consistency intensity value, and generate a phase consistency feature map. In the spatial feature extraction branch, convolutional features of the preprocessed image sequence are extracted through continuous convolutional layers and max pooling layers to generate spatial pixel grayscale features that characterize the spatial distribution information of the image.
5. The method for automatic bridge defect identification based on deep learning according to claim 4, characterized in that: The specific process of achieving feature alignment and fusion through cross-domain attention mechanism, regressively predicting the confidence distribution matrix representing the classification probability of defective pixels, and the geometrically guided vector field representing the local extension trend of defects in the high-dimensional feature space is as follows: Convolutional projection is performed on phase consistency features and spatial pixel grayscale features to unify the number of feature channels and spatial resolution. Global average pooling is then performed on the projected features to generate channel attention weight vectors. Adaptive recalibration of each channel of phase consistency features and spatial pixel grayscale features is performed using channel attention weight vectors. This enhances the weights of feature channels containing structural defect responses, suppresses the weights of feature channels containing background responses, and then concatenates the recalibrated features into channels. The cascaded features are input into a dual-branch decoder. The confidence distribution matrix is generated by regressing the pixel class probability through the convolutional layer and softmax function of the first branch. The geometrically guided vector field of the high-dimensional feature space is generated by predicting the unit tangent vector of the pixel in the two-dimensional plane through the regression layer of the second branch.
6. The method for automatic bridge defect identification based on deep learning according to claim 1, characterized in that: Discrete defect segments are obtained by performing significance thresholding on the confidence distribution matrix, and then mapped to a geometric guidance vector field. The specific process of path evolution and tracking under the constraints of the geometric guidance vector field, with the segment endpoints as seed points, is as follows: Binarization of the confidence distribution matrix is performed by applying a saliency threshold, morphological thinning is performed on the binary connected components, and single-pixel-width skeletons are extracted as discrete defect fragments. Traverse the set of discrete defect fragment pixels, select skeleton points with a single neighboring pixel as evolution seed endpoints, and project the coordinates of the evolution seed endpoints onto the geometric guidance vector field. Starting from the endpoint of the evolution seed, perform iterative step integration based on the unit tangent vector at the corresponding position in the geometric guidance vector field, update the tracking coordinates at the next moment, and generate an evolution path along the direction indicated by the vector field until the evolution path enters a region with a confidence level lower than the preset cutoff threshold or the evolution length reaches the preset step length truncation threshold.
7. The method for automatic bridge defect identification based on deep learning according to claim 6, characterized in that: The process of analyzing the vector collinearity and energy dissipation cost of the evolution paths between adjacent segments, and determining that they belong to the same defect visual instance when the minimum energy connectivity criterion is met, and performing pixel-level path filling along the evolution path that satisfies the minimum energy connectivity criterion to generate a topologically continuous defect binary mask is as follows: Using the end of the evolution path as the center, search for adjacent discrete defect segments with an Euclidean distance smaller than the preset neighborhood radius to construct candidate connection pairs; An energy functional is constructed that includes a distance penalty term, a direction consistency term, and a curvature smoothing term. The path energy dissipation cost of candidate connection pairs is calculated. The distance penalty term is calculated by the Euclidean distance between endpoints, the direction consistency term is calculated by the cosine similarity between the tangent vector of the evolution path and the tangent vector of the endpoints of the adjacent segments, and the curvature smoothing term is calculated by the rate of curvature change of the connection path. The energy functional is solved by minimization algorithm, and candidate connection pairs with energy dissipation cost lower than the preset connection threshold are identified as the same defective visual instance. By using a curve interpolation algorithm, connecting lines are generated between the endpoints of adjacent discrete defect segments along the minimum energy path. Morphological dilation is then performed on the connecting line region to generate a topologically continuous binary defect mask.
8. The method for automatic bridge defect identification based on deep learning according to claim 1, characterized in that: Step S4 includes the following steps: Acquire camera imaging parameters and shooting distance information during multi-scale inspection image acquisition, and calculate the pixel physical resolution coefficient of the image plane; Perform Euclidean distance transformation and skeleton extraction on the topologically continuous defect binary mask, count the number of skeleton pixels in the connected component as the pixel length, and extract the maximum distance response value corresponding to the skeleton point in the distance transformation map as the pixel width. The pixel length and width are converted into physical length and width values by using the pixel physical resolution coefficient. The position coordinates of the center point of the defect binary mask in the original coordinate system are determined. The importance weight of the component is obtained by indexing the preset bridge component area distribution map. The physical length value, physical width value and component importance weight are weighted and calculated to obtain the comprehensive hazard index. Structured instance detection data is generated according to the preset classification threshold.