Bridge disease detection method based on diffusion model and bitter fish optimization algorithm
By combining the diffusion model with the bitter fish optimization algorithm, a bridge defect detection method with high accuracy can be achieved in complex environments. This solves the problems of viewpoint offset and insufficient parameter optimization in traditional methods, and improves the accuracy and stability of defect detection.
Patent Information
- Application Number
- CN202511217425.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-28
- Publication Date
- 2025-12-05
AI Technical Summary
Existing bridge defect detection methods struggle to accurately identify irregularly distributed spalling and cracks in complex environments. Traditional image fusion techniques suffer from issues such as viewpoint shift, resolution inconsistency, and spectral differences, leading to high rates of missed and false detections. Furthermore, deep learning networks struggle to adaptively optimize parameters in high-noise environments.
A bridge defect detection method based on diffusion model and bitter fish optimization algorithm is adopted. Through multi-source image registration, feature extraction and pixel coordinate alignment, combined with wavelet denoising, brightness correction and multi-scale processing, the improved diffusion model is used to enhance edge continuity and texture details, and the bitter fish optimization algorithm is used for hyperparameter adaptive tuning to achieve high-precision defect identification.
It significantly improves the accuracy and stability of bridge defect detection, enabling accurate identification of minute spalling and irregular cracks in high-noise environments, reducing false detection rates, and enhancing the intelligence level of detection.
Smart Images

Figure CN121073971A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of bridge inspection technology, specifically to a bridge defect detection method based on a diffusion model and a bitter fish optimization algorithm. Background Technology
[0002] With the rapid development of transportation infrastructure, the structural health monitoring of bridges, as key nodes in the road network, is becoming increasingly important. Bearing the dual effects of dynamic loads and environmental erosion over long periods, bridges are prone to typical defects such as concrete spalling and structural cracks. Failure to detect and assess these defects in a timely and accurate manner can pose risks to traffic safety and public property. Currently, most bridge defect detection still relies on traditional methods such as manual inspection or single-sensor imaging. However, in complex environments such as high image noise (blurred images), complex lighting (uneven light intensity), and multi-source interference (multiple interfering objects in the image), achieving accurate identification of defect locations, especially when spalling areas and / or cracks are irregularly distributed or located near bridge curvature or expansion joints, traditional methods often suffer from high rates of missed and false detections.
[0003] In the field of bridge defect detection, our professionals have attempted to fuse visible light and near-infrared images and overlay multi-source images (covering both visible light and near-infrared) to improve the sensitivity and robustness of defect detection. However, in practical applications, simple multi-source image overlay faces numerous challenges. Differences in position or angle between visible light and near-infrared cameras when capturing the same bridge section can lead to image perspective shifts, preventing complete overlap. Furthermore, inconsistent image resolutions from different devices and spectral differences arising from varying light perception capabilities of different camera types can cause alignment errors, thus limiting the accuracy of subsequent bridge defect feature extraction and segmentation. Bridge defects often exhibit subtle texture differences, and complex environments can easily interfere with accurate edge extraction. In such cases, simple image denoising or brightness correction methods have drawbacks: they can easily lose crucial information containing bridge defect features and increase interference in subsequent bridge defect identification. For bridge defect image analysis that considers both overall structure and local details, achieving both global brightness balance and local detail preservation during multi-source image fusion becomes a major challenge in reducing missed and false detections in bridge inspection.
[0004] With the continuous advancement of computer vision and artificial intelligence technologies, image recognition and deep learning methods have been widely introduced into the field of bridge defect detection, aiming to improve detection efficiency and accuracy. In image segmentation and feature enhancement, existing research has combined diffusion models with deep learning to improve the ability to model image noise and texture features of varying degrees. However, most diffusion model image recognition methods have not yet been optimized for the key features of bridge defects, especially when dealing with structures with discontinuous geometry and subtle texture changes, such as crack edges and spalling areas. These methods are prone to blurring the defect edges during noise reduction in image preprocessing, thus disrupting the continuity of the defect structure. Furthermore, although deep learning networks can learn rich semantic features under multispectral input conditions combining visible and near-infrared light, when faced with rapidly changing image features (pixel-level feature mutations) at spalling and crack edges, and in high-noise environments (signal-to-noise ratio <15dB), the parameters of traditional image segmentation networks struggle to achieve adaptive optimization in scenarios that balance overall structure, local details (macroscopic structural scale >10cm), and microscopic texture (scale <1mm). Manual adjustments to thresholds and hyperparameters are often required to correctly identify bridge defects. In recent years, although evolutionary algorithms or co-evolutionary techniques have been used in the detection of surface defects in buildings and pavements to integrate intelligent algorithms that simulate natural evolutionary processes, such as genetic algorithms and particle swarm optimization, to optimize parameter search strategies, the adaptive parameter optimization mechanism is still insufficient for scenarios such as random spots, bright spots and other salt-and-pepper noise, micro-stripping defects (stripping areas with an area of <5mm²) and irregular cracks, and cannot yet meet the high-precision requirements of bridge inspection. Summary of the Invention
[0005] In view of the shortcomings of the prior art, the present invention provides a bridge defect detection device and method based on diffusion model and bitter fish optimization algorithm, which aims to significantly improve the accuracy of identifying micro-scraping and irregular cracks under complex scene conditions, while improving the intelligence level and practical effect of bridge defect detection.
[0006] The technical solution of this invention is: A bridge defect detection method based on a diffusion model and a bitter fish optimization algorithm, comprising the following steps: Step 1: Based on a fixed viewpoint and distance, simultaneously acquire visible light and near-infrared images of areas on the bridge surface prone to peeling and / or cracking (i.e., areas of damage) at multiple time points to obtain a visible light image dataset. Near-infrared image dataset ; Step 2: Based on and Establish a preliminary labeling result set for diseased areas ,based on Feature extraction and pixel coordinate alignment are performed on the diseased area to obtain a disease feature set. ; Step 3: Targeting The original image data is subjected to multi-scale image downsampling processing to obtain a multi-level image set in the form of a pyramid structure. ,in The image is the original resolution layer. Indicates the first Layered downsampling image, The resolution decreases sequentially, with the downsampling factor for each layer denoted as . ; Step 4: Image at the high-resolution layer Implement wavelet-based noise suppression and texture residual constraints on images at medium resolution layers. The image is obtained by performing brightness normalization and gradient adaptive smoothing, and finally fusing the denoised image and the brightness-corrected image sequence. ; Step 5: Image-based By performing forward diffusion and reverse denoising (i.e., reverse generation) using an improved diffusion model, a reconstructed image with enhanced edge continuity, structural integrity, and texture details is obtained. ; Step 6: Utilize the reconstructed image and its corresponding original image and disease characteristic set Construct a multi-source fusion input set And use multi-layer convolutional networks to Each channel undergoes layer-by-layer feature extraction and fusion to obtain a set of feature maps. ; Step 7: Combine feature map sets Local texture difference function The context fusion mechanism distinguishes between artificial physical artifacts and real diseases, and outputs preliminary disease area identification results. ; Step 8: Based on the preliminary disease area identification results The bitter fish optimization algorithm is used to perform global search and adaptive tuning of key hyperparameters to obtain the optimal parameter vector. ; Step 9: Optimal parameter vector The joint inference process applied to steps 5 through 7 is retrained and feedback-corrected to generate the final disease area identification result. ; Step 10: Based on the results of disease area identification Perform unified numbering and geometric contour extraction of diseased areas.
[0007] Furthermore, according to the bridge defect detection method based on the diffusion model and the bitter fish optimization algorithm, step 2 further includes the following steps: Step 2.1: Based on timestamps and Visible light and near-infrared images acquired at the same time point were paired one-to-one to construct a preliminary image set consisting of image pairs. ; Step 2.2: In Pixels are selected based on differences in brightness and texture to generate a set of candidate disease area images. Then organize manual review of The suspected areas of peeling and cracking, i.e., the diseased areas, were selected and marked to establish a preliminary set of diseased area marking results. ; Step 2.3: Based on and Feature extraction is performed on the diseased areas to extract texture vectors. Color vector With geometric contour vector And combine them into a set of disease feature vectors ; Step 2.4: For In this process, the coordinates of pixels belonging to the visible light image are aligned with those belonging to the near-infrared image, and a coupling loss is defined for the image of the diseased area. ; Step 2.5: By adjusting the coupling loss Minimize the solution constraints By analyzing the texture and color distribution, a set of disease features with small alignment errors and high texture fidelity can be obtained. .
[0008] Furthermore, based on the bridge defect detection method using the diffusion model and the bitter fish optimization algorithm, the transmission transformation matrix is used... Will Coordinates of pixels belonging to the near-infrared image Coordinates mapped to a visible light image ,accomplish The coordinates of pixels belonging to the visible light image are aligned with those of pixels belonging to the near-infrared image.
[0009] Furthermore, according to the bridge defect detection method based on the diffusion model and the bitter fish optimization algorithm, the image definition coupling loss for the defect area is further defined. for: ; in and They are respectively The coordinates and intensity functions of pixels belonging to the near-infrared image; and They are respectively The coordinates and intensity function of pixels belonging to the near-infrared image mapped to the visible light image. and These represent the number of rows and columns of pixels in the image. This represents the number of texture blocks within the diseased area. For the first Texture gradient of each texture block These are the weighting coefficients for texture smoothing constraints.
[0010] Furthermore, according to the bridge defect detection method based on the diffusion model and the bitter fish optimization algorithm, step 4 further includes the following steps: Step 4.1: Image of high-resolution layer In the diseased areas, denoising processing based on wavelet basis functions is performed to obtain the denoised enhanced image. ; Step 4.2: Process the medium-resolution image sequence Perform brightness correction processing to obtain a corrected image sequence that is brightness-equalized and has effectively smoothed texture details. ; Step 4.3: Based on the denoised enhanced image and brightness-corrected image sequences Edge consistency detection and correction are performed on the diseased areas to obtain preprocessed output images with enhanced edge continuity and texture clarity. .
[0011] Furthermore, according to the bridge defect detection method based on the diffusion model and the bitter fish optimization algorithm, step 5 further includes the following steps: Step 5.1: Image Recognition High-noise regions in the data and generating binary masks. and image recognition In the area of abnormal lighting, a mask is generated. ,Will and Upsampling to After maintaining consistent dimensions, the images are stitched together according to the channel dimensions of the image tensor. and to Perform mean-variance normalization to obtain , as input to the diffusion model; Step 5.2: Define channel weight vectors in the input layer of the diffusion model. And determine the position of the high-weight values; Step 5.3: with Starting with an improved forward diffusion equation, a temporally iterative forward diffusion process is performed to generate a diffusion image sequence by gradually increasing the noise injection level. ,in This represents the total number of iterations in the diffusion process. Step 5.4: Based on the diffusion image sequence An improved backward reconstruction equation is used to perform reverse generation to obtain a reconstructed and enhanced image. .
[0012] Furthermore, according to the bridge defect detection method based on the diffusion model and the bitter fish optimization algorithm, the method for determining the location of high weight values is as follows: firstly, define the channel weight vector in the input layer of the diffusion model. Its spatial dimension is the same as the input image. The resolution is consistent; then, Canny edge detection is used to compare the edge with a preset brightness gradient threshold. Extracting the outer contour mask of the beam body and peeling transition zone mask Then combine the unions. E ∪ S Pixel positions within the region are mapped to And increase the weight value at these positions, thereby identifying these positions as high-weight positions.
[0013] Furthermore, based on the bridge defect detection method based on the diffusion model and the bitter fish optimization algorithm, a binary matrix corresponding to the edge position of the beam is constructed. ,in express Located in the edge area, and vice versa ; Introduction The existing forward diffusion equation is improved as follows: ; in and The first The image state of the iteration step compared to the previous iteration step; Noise injection ratio; This is the noise vector injected into the edge pixels; This refers to random noise injected into non-edge pixels; This is the cumulative noise attenuation coefficient, used to gradually reduce noise intensity during the diffusion process.
[0014] Furthermore, according to the bridge defect detection method based on the diffusion model and the bitter fish optimization algorithm, the improved backward reconstruction equation is as follows: ; in For the first The result is generated in reverse step; For the first The result is generated in reverse step; In the first Step-by-step network estimation of noise residuals; This is the edge gradient smoothing adjustment coefficient; for edge pixels gradient at; It is a set of edge pixels.
[0015] Furthermore, according to the bridge defect detection method based on the diffusion model and the bitter fish optimization algorithm, step 8 further includes the following steps: Step 8.1: [The text appears to be incomplete and contains several grammatical errors. A more accurate translation would require the full context.] As the starting point for optimization, the population of bitter fish is initialized, and the initial position of each bitter fish individual is randomly assigned within the feasible parameter space. Each bitter fish individual represents a set of hyperparameter combinations, and its parameter vector is written as... , Indicates the first The individual in the first Values can be taken in each hyperparameter dimension; Step 8.2: From the initial image set Divide the test set The parameter vector of the bitter fish The joint reasoning process applied to steps 5 through 7 and in the test set The corresponding detection results are generated through this joint inference process. It also completes the quantitative evaluation and sorting of the current parameter combination, which serves as the basis for the next round of parameter updates and global search; Step 8.3: Based on the sorting in the iteration rounds The system performs individual position updates and group collaborative search to iteratively update the parameter vector of the bitter fish. And after the convergence criterion is met or the maximum number of iterations is reached, the globally optimal parameter combination is determined. .
[0016] Compared with the prior art, the present invention has the following beneficial effects: This invention proposes a bridge defect detection method based on multi-source image fusion, the core of which lies in achieving high-precision registration and feature coupling between visible light and near-infrared images. This method establishes an image coordinate alignment mechanism, using algorithms to achieve optimal correspondence between different spectral images in terms of spatial location, brightness distribution, and detailed features. Simultaneously, it innovatively introduces a coupling loss function as a quantitative evaluation index for registration quality, and effectively overcomes registration errors caused by differences in shooting angles and resolution mismatches by optimizing the transmission transformation coefficient, a key parameter controlling image geometric deformation. Compared to traditional single-band detection methods or simple image correction techniques, this method can more accurately capture the texture features and edge information of bridge cracks and spalling areas under multispectral conditions, thereby significantly improving the accuracy of defect identification and system stability.
[0017] This invention introduces three key improvements to the diffusion model by constructing an edge weight matrix and a disease region mask: First, during the forward diffusion process, a specific noise suppression mechanism is applied only to the peeling edges and crack transition areas to prevent these critical regions from being destroyed by random perturbations. Second, texture fidelity constraints are introduced in the reverse generation stage to ensure smooth and coherent restoration of texture details in cracks and peeling areas. Third, through a cross-scale feature fusion mechanism, the model considers overall structure, local details, and micro-texture, assigning higher protection weights to edge pixels. This method significantly improves boundary preservation capabilities in high-noise environments, effectively avoiding edge breakage or detail blurring problems caused by traditional diffusion models, and can stably output clear disease images even in complex scenes.
[0018] This invention introduces the "bitter fish" optimization algorithm to collaboratively optimize key hyperparameters in noise injection ratio, segmentation threshold, and multi-source image fusion. This algorithm avoids the reliance on human experience in conventional image segmentation methods and overcomes their tendency to get trapped in local optima. Through iterative global and local searches, this invention can quickly achieve adaptive correction and recognition of model parameters even in locally noisy areas of complex scenes, effectively reducing the false detection rate of spalling and cracks, and significantly improving the overall detection accuracy of bridge defects. Attached Figure Description
[0019] Figure 1 This is a flowchart of the bridge defect detection method based on the diffusion model and the bitter fish optimization algorithm in this embodiment. Detailed Implementation
[0020] To facilitate understanding of this application, a more comprehensive description of this application will be provided below with reference to the accompanying drawings.
[0021] Figure 1 This is a flowchart of the bridge defect detection method based on the diffusion model and the bitter fish optimization algorithm in this embodiment. Figure 1As shown, the bridge defect detection method based on the diffusion model and the bitter fish optimization algorithm includes the following steps: Step 1: Based on a fixed viewpoint and distance, simultaneously acquire visible light and near-infrared images of areas on the bridge surface prone to peeling and / or cracking (i.e., areas of damage) at multiple time points to obtain a dataset of visible light images. and a set of near-infrared image datasets .
[0022] In this embodiment, a unified field-of-view coverage and calibration method is adopted. Based on a fixed viewing angle and a fixed distance, visible light and near-infrared images of areas on the bridge surface prone to peeling and / or cracking (i.e., areas of damage) are simultaneously acquired at multiple time points, resulting in a dataset composed of visible light images acquired at different time points. And a dataset consisting of near-infrared images acquired at different time points. .
[0023] Step 2: Based on and Establish a preliminary labeling result set for diseased areas ,based on Feature extraction and pixel coordinate alignment are performed on the diseased area to obtain a disease feature set. and will and Write to multi-source feature database .
[0024] Step 2.1: Based on timestamps and Visible light and near-infrared images acquired at the same time point were paired one-to-one to construct a preliminary image set consisting of image pairs. ; Step 2.2: In Pixels are selected based on differences in brightness and texture to generate a set of candidate disease area images. Then organize manual review of The suspected areas of peeling and cracking, i.e., the diseased areas, were selected and marked to establish a preliminary set of diseased area marking results. ; In this embodiment, Pixels are selected based on differences in brightness and texture to create sets. and And perform a union operation to generate a set of candidate disease area images. Organize manual review of The areas of internal spalling and cracks, i.e., the diseased areas, are selected and marked to establish a preliminary set of diseased area marking results. and will The pixels in the image are bound to the corresponding spatial coordinates of the original image to establish a disease pixel index table. .
[0025] Step 2.3: Based on and Feature extraction is performed on the diseased areas to extract texture vectors. Color vector With geometric contour vector And combine them into a set of disease feature vectors ; Step 2.4: For In this process, the coordinates of pixels belonging to the visible light image are aligned with those belonging to the near-infrared image, and a coupling loss is defined for the image of the diseased area. ; In this embodiment, through the transmission transformation matrix Will Coordinates of pixels belonging to the near-infrared image Coordinates mapped to a visible light image ,accomplish The coordinates of pixels belonging to the visible light image are aligned with those belonging to the near-infrared image; the coupling loss is defined for the diseased area image as follows:
[0026] in and They are respectively The coordinates and intensity functions of pixels belonging to the near-infrared image; and They are respectively The coordinates and intensity function of pixels belonging to the near-infrared image mapped to the visible light image. and These represent the number of rows and columns of pixels in the image. This represents the number of texture blocks within the diseased area. For the first Texture gradient of each texture block These are the weighting coefficients for texture smoothing constraints.
[0027] Step 2.5: By adjusting the coupling loss Minimize the solution constraints By analyzing the texture and color distribution, a set of disease features with small alignment errors and high texture fidelity can be obtained. and will and Write to multi-source feature database .
[0028] In this embodiment, and Write to multi-source feature database The structured management and rapid retrieval mapping are established based on image sequence number, timestamp, and disease area index.
[0029] Step 3: Targeting The original image data is subjected to multi-scale image downsampling processing to obtain a multi-level image set in the form of a pyramid structure. ,in The image is the original resolution layer. Indicates the first Layered downsampling image, The resolution decreases sequentially, with the downsampling factor for each layer denoted as . ; This implementation method controls the downsampling factor. While maintaining the core structure of the image, it effectively compresses the amount of image data, making images at different scales suitable for different processing tasks: images in high-resolution layers are used to preserve the detailed texture information of the diseased area, while images in low-resolution layers are used to extract the overall brightness trend and structural contour, providing multi-scale input support for subsequent wavelet denoising, brightness correction and edge consistency detection.
[0030] Step 4: Image at the high-resolution layer Implement wavelet-based noise suppression and texture residual constraints on images at medium resolution layers. The image is obtained by performing brightness normalization and gradient adaptive smoothing, and finally fusing the denoised image and the brightness-corrected image sequence. Complete the edge consistency detection and correction of the diseased area.
[0031] Step 4.1: Image of high-resolution layer In the diseased areas, denoising processing based on wavelet basis functions is performed to obtain the denoised enhanced image. ; In this embodiment, Wavelet denoising and texture residual reconstruction with local constraints are performed on the diseased areas, using wavelet basis functions. For images Pixel-wise convolution, calculate the first pixel according to equations (2) and (3). Layer wavelet representation and definition of the texture residual signal shown in equation (3) Subsequently, a binary mask is applied to the diseased area as shown in equation (4). Under the action of residual signal Apply threshold constraints and reconstruct the denoised and enhanced image according to Equation (5) to obtain the denoised and enhanced image. ;
[0032]
[0033]
[0034] in, Indicates the pixel indexes traversed within the image or convolution kernel; Represents the pixel coordinates of the convolution output; It is the spatial transformation kernel of wavelet basis functions; These are the transformation scale and translation parameters, respectively. For the first Image representation after layer wavelet transform; For the image components of the previous layer; and These represent the number of rows and columns of pixels in the image, respectively. This represents the unconstrained texture residual signal; A binary mask for the diseased area; This indicates that the input will be clipped to a range. Operators; This is the local constraint threshold; For the local constrained texture residual after masking and thresholding, only... Retained and confined within the diseased area Within the range, Non-disease-affected areas tend to This avoids the loss of effective texture due to over-smoothing; This is the final high-resolution enhanced image after wavelet denoising and local constraint optimization.
[0035] Step 4.2: Process the medium-resolution image sequence Perform brightness correction processing to obtain a corrected image sequence that is brightness balanced and has effectively smoothed texture details.
[0036] In this embodiment, at the medium resolution layer Brightness normalization and gradient adaptive smoothing are applied to the image, and the correction is performed according to the following equation (6):
[0037] in, For the first The pixel brightness of the image to be corrected; This is the preset brightness reference value; For the first Average brightness of layer image; To represent in pixels Within the neighborhood of the center, located at the sampling location coordinates ( The brightness gradient at point ) , The number of neighboring pixels involved in the smoothing calculation; As a weight for texture smoothing intensity; is an adjustable coefficient; (u,v) are the coordinate indices of all pixels in the k-th layer of the image; For the first The maximum value of the brightness gradient at all pixel locations in the layer; the corrected image sequence is denoted as ; The gradient adaptive weights (the larger the local gradient, the stronger the constraint) are solved according to the following equation (7).
[0038]
[0039] Step 4.3: Based on the denoised enhanced image and brightness-corrected image sequences Edge consistency detection and correction are performed on the diseased areas to obtain preprocessed output images with enhanced edge continuity and texture clarity. ; In this embodiment, the wavelet denoising results are first synthesized. With brightness correction sequence Edge consistency detection is performed on the diseased area. Based on the comparison of local pixel gradient distribution and geometric contour features, regions with discontinuous or blurred edges caused by downsampling, denoising, or brightness correction are identified. Then, gradient-guided correction and contour matching correction are applied to the detected abnormal regions. The complementarity of the two types of images is used for edge enhancement and artifact removal. Finally, the images are fused to obtain a preprocessed output image with enhanced edge continuity and texture clarity. .
[0040] Step 5: Based on the preprocessed output image By performing forward diffusion and reverse denoising (i.e., reverse generation) through an improved diffusion model, a reconstructed image with enhanced edge continuity, structural integrity, and texture details is obtained. This implementation introduces an improved diffusion model, which first supplements noise, illumination masks, and edge weights in the input stage, then constrains noise injection with edge-aware weights in the forward diffusion stage, and finally applies texture and contour smoothing constraints in the reverse generation stage to reconstruct and enhance the image.
[0041] Step 5.1: Identify the preprocessed output image High-noise regions in the data and generating binary masks. and recognition of preprocessed output images In the area of abnormal lighting, a mask is generated. Then and Upsampling to After maintaining consistent dimensions, the images are stitched together according to the channel dimensions of the image tensor. and to Perform mean-variance normalization to obtain , as input to the diffusion model; In this embodiment, Execution Local window variance analysis to label high-noise areas: If the local window's brightness variance... Then, the center pixel position corresponding to the window is marked as a high-noise region and a binary mask is generated. Among them, the high noise threshold Pick Full image brightness variance times; To detect macroscopic differences in illumination, we first need to determine... Average brightness of the whole image Then calculate the local average brightness of each window. ,like Then, the center pixel position corresponding to the window is marked as the lighting abnormality area and a mask is generated. Among them, the threshold for judging abnormal lighting Gray level; Will and Upsampling to After maintaining consistent dimensions, the images are stitched together according to the channel dimensions of the image tensor. and to Perform mean-variance normalization to obtain , as input to the diffusion model.
[0042] Step 5.2: Define channel weight vectors in the input layer of the diffusion model. And determine the position of the high-weight values; In this embodiment, channel weight vectors are first defined in the input layer of the diffusion model. Its spatial dimension is the same as the input image. The resolution is consistent; then, Canny edge detection is used to compare the edge with a preset brightness gradient threshold. Extracting the outer contour mask of the beam body and peeling transition zone mask Then combine the unions. E ∪ S Pixel positions within the region are mapped to The weight values are increased at these locations, thus defining them as high-weight positions. This enhances the focus on beam edges and peeling gradient areas in subsequent diffusion iterations, while combining mask channels to implement stronger noise suppression and detail preservation in high-noise and abnormal lighting areas.
[0043] Step 5.3: with Starting with an improved forward diffusion equation, a temporally iterative forward diffusion process is performed to generate a diffusion image sequence by gradually increasing the noise injection level. ,in This represents the total number of iterations in the diffusion process. In this embodiment, to suppress random disturbances at the edges and maintain geometric continuity, a binary matrix corresponding to the edge positions of the beam is constructed. ,in express Located in the edge area, and vice versa ; Introduction The forward diffusion equation is improved as follows:
[0044] in and The first The image state of the iteration step compared to the previous iteration step; Noise injection ratio; This is the noise vector injected into the edge pixels; This refers to random noise injected into non-edge pixels; This is the cumulative noise attenuation coefficient, used to gradually reduce noise intensity during diffusion; this formula is activated at the edges. Guided controlled noise injection at non-edge locations Guided random noise injection can effectively limit the drastic fluctuations of edge pixels during high-noise phases.
[0045] Step 5.4: Based on the diffusion image sequence An improved backward reconstruction equation is used to perform reverse generation to obtain a reconstructed and enhanced image. ; In this embodiment, starting from the beginning of the reverse generation process The process is progressively reversed to the endpoint of the inverse generation process, which is the final reconstructed and enhanced image. During the process, recursive relation The improved backward reconstruction equation is given by equation (9).
[0046]
[0047] in For the first The result is generated in reverse step; For the first The result is generated in reverse step; In the first Step-by-step network estimation of noise residuals; This is the edge gradient smoothing adjustment coefficient; for edge pixels gradient at; It is a set of edge pixels; The improved backward reconstruction equation Cooperate The main structure of the denoised image is restored, and jagged edges and breaks (referring to irregular jitter and discontinuities that occur during edge reconstruction) are suppressed using edge gradient terms. The texture and contour continuity of the disease edges and irregular cracks are enhanced, ultimately forming a reconstructed and enhanced image, denoted as... .
[0048] Step 6: Utilize the reconstructed image and its corresponding original image and disease characteristic set Construct a multi-source fusion input set Using multi-layer convolutional networks in a unified coordinate system Each channel undergoes layer-by-layer feature extraction and fusion to obtain a set of feature maps. .
[0049] In this embodiment, the reconstructed image is utilized. The original image with coordinate alignment already completed in its corresponding multi-source feature database D1. Construct a multi-source fusion input set Then, a multi-layer convolutional network is used in a unified coordinate system to... Each channel performs layer-by-layer feature extraction and fusion, and through inter-layer recursion, a multi-layer output feature map set can be accumulated. ,in, The reconstructed and enhanced image output from the reverse generation stage in step 5.4; To and The corresponding original registration image; This is the stacked input set of both and their derived channels; This is the feature map output by the first convolutional layer. This is the output feature map of the second convolutional layer, where max is the highest layer number of the multi-layer convolutional network. This process achieves the fusion and representation of multi-source information in the deep semantic space through the synergistic effect of operators such as convolution, nonlinear activation, normalization, and residual connections.
[0050] Step 7: Combine feature map sets Local texture difference function The context fusion mechanism distinguishes between artificial physical artifacts and real diseases, and outputs preliminary disease area identification results. .
[0051] This implementation method is in the collection The local texture difference function shown in equation (10) above To depict the difference between real defects and background interference (shadows, water stains, etc.) at complex boundaries.
[0052]
[0053] in These are the pixel coordinates of the image. Indicates the first Each feature map in Activation; for Gradient magnitude at; For channel fusion weights; The number of feature maps participating in the aggregation.
[0054] This implementation method is through To enhance the ability to identify defects, the system highlights the significant responses at complex edge locations such as expansion joints and beam corners within a high semantic space. A higher value indicates a stronger local texture mutation.
[0055] This implementation method obtains Afterwards, Texture features and The brightness features in the data are spliced and integrated as a context fusion channel. .Will and multi-source fusion input set Together they are spliced to form enhanced segmentation features. =[ ]; will enhance the segmentation feature tensor The data is input to a classification layer to output the probability distribution of cracks, peeling, and background pixel by pixel; subsequently, a threshold filtering mechanism is used to remove or suppress low-confidence regions using a segmentation threshold (i.e., to eliminate or suppress low-confidence regions). (Threshold segmentation is performed) to obtain preliminary disease area identification results. .
[0056] Step 8: Based on the preliminary disease area identification results The "bitter fish" optimization algorithm is used to perform global search and adaptive tuning of key hyperparameters such as segmentation threshold, noise injection ratio, edge gradient smoothing adjustment coefficient, learning rate, and diffusion steps to obtain the optimal parameter vector. To improve the accuracy of disease identification and the clarity of edges; Step 8.1: [The text appears to be incomplete and contains several grammatical errors. A more accurate translation would require the full context.] As a starting point for optimization, an initial population of bitter fish was constructed. The initial positions of each body are randomly set within the feasible parameter space. Each bitter fish, or individual fish, represents a set of hyperparameter combinations, whose parameter vector is written as... ,in The total number of individual bitter fish. Indicates the first The individual in the first The values can be taken in each hyperparameter dimension. It serves only as a general performance reference during the initialization phase and is not associated with any specific "bitter fish".
[0057] The initialization of the bitter fish population adopts two methods: one is uniform sampling, which means randomly and uniformly distributing values within the allowable range of each hyperparameter to ensure the coverage of the overall search space; the other is normal perturbation, which means generating perturbation values in a normal distribution in a local area around the reference parameter or empirical initial value to enhance the precision of the local search.
[0058] Step 8.2: From the initial image set Divide the test set The parameter vector of the bitter fish The joint reasoning process applied to steps 5 through 7 and in the test set The corresponding detection results are generated through this joint inference process. And according to the comprehensive fitness function shown in equation (11) Complete the quantitative evaluation and ranking of the current parameter combination, by... A fitness ranking list is generated from high to low scores, which serves as the basis for the next round of parameter updates and global search.
[0059]
[0060] in The detection rate of the diseased area; False positive rate; The degree to which noise affects edge sharpness; The weighting coefficients are and satisfy the following conditions: .
[0061] Step 8.3: Sort by fitness in iteration rounds The system performs individual position updates and group collaborative search to iteratively update the parameter vector of the bitter fish. And after the convergence criterion is met or the maximum number of iterations is reached, the globally optimal parameter combination is determined. .
[0062] According to the test results The search guides the information exchange between individual bitter fish and the global optimal state, iteratively updating the parameter vector of the bitter fish. .
[0063] This implementation method sorts the iterations based on fitness. The process involves updating individual positions and collaborative searching among the groups, specifically through information exchange between individual "bitter fish" and guiding the search towards the global optimal state, iteratively updating the parameter vector of the "bitter fish". The update rules are as follows:
[0064] in For the first A bitter fish in the first The parameter vector of the wheel, This is the globally optimal position for this round. Strengthen the convergence of individuals to the global optimum. This is a global adjustment factor used to control the contribution of "group collaborative search" in the update process; For individuals In individuals The participation ratio during the update is used to measure the interaction strength or influence weight between the i-th individual and the j-th individual; and This characterizes the guidance of the group's mutual exploration on the search direction; after satisfying the convergence criterion or reaching the maximum number of iterations, the global optimal parameter combination is determined according to (13). .
[0065]
[0066] in As the optimal hyperparameter configuration for the joint inference process of steps 5 to 7 in the current task, it provides an input benchmark for the subsequent model fine-tuning and deployment stages.
[0067] Step 9: Combine the globally optimal parameters The joint inference process applied to steps 5 through 7 is retrained and feedback-corrected to generate the final disease area identification result. ; The goal of this step is to improve edge fidelity and recognition robustness in extremely noisy environments. Key hyperparameters include coverage segmentation threshold, noise injection ratio, edge gradient smoothing adjustment coefficient, learning rate, and diffusion steps.
[0068] Step 9.1: Retrain the diffusion model following the process in Step 5. The initial state for retraining is denoted as... The output feature map of the reverse generation stage in the retraining process is denoted as... The final segmentation result is denoted as During iterative training... According to Equation (14), stepwise updates are performed along the gradient direction of the composite loss function. This update suppresses noise artifacts while maintaining structural continuity, causing the feature representation of the reverse generation stage to converge toward the clearer boundary of the disease area.
[0069]
[0070] in Image pixel coordinates, This represents the current iteration round number. This is the step size coefficient. It is a composite loss function (composed of a weighted sum of a segmentation edge error term and a noise regularization term, and follows the boundary and texture constraints of the diseased area).
[0071] Step 9.2: After completing the retraining of the diffusion model, generate the image feature map output from the reverse generation stage. As input to step 6, the disease area identification result is generated based on the existing multi-layer convolutional extraction and context fusion mechanism in step 7. ; Here Indicates in Feature representations generated by the reverse generation stage of the diffusion model under configuration. This represents the segmentation result of the current round of reasoning, including disease categories and spatial distribution. This collaborative process is aimed at the joint optimization of boundary clarity and disease outline integrity.
[0072] Step 9.3: Targeting In the process, there may still be false positives or false negatives in high-noise areas. Local assessment and secondary correction should be performed, first based on noise criteria... Detection brightness variance within the neighborhood ,like And this area is With reference annotation If there are significant differences, the corresponding pixel coordinates will be included in the high-noise suspected set. Then, the local evaluation function is calculated according to equation (15), and the local evaluation function value is... When the threshold is exceeded, the local parameter search of the bitter fish optimization algorithm is triggered, comparing the segmentation threshold with the edge gradient smoothing coefficient in the diffusion model. A secondary search and correction is performed to correct the bias in a small area where false positives and false negatives are concentrated, thereby stabilizing the boundary recognition capability and fault tolerance performance of the joint inference process from step 5 to step 7 in complex noise scenarios.
[0073]
[0074] in These are pixel coordinates; The current segmentation label; For reference only; This is a high-noise area.
[0075] Step 10: Based on the final segmentation result Perform unified numbering and geometric contour extraction of diseased areas.
[0076] exist The diseased areas were marked according to a unified numbering rule, and a label set was generated. ,in For the first The unique label for each diseased area This represents the total number of affected areas. For each... The boundary contours and geometric features are extracted, and their spatial extent is characterized by the minimum bounding rectangle and polygonal outlines. The contours of each diseased area are superimposed onto the bridge structure schematic diagram via coordinate mapping, achieving spatial correlation and visualization fusion. Simultaneously, the location, area, and contour shape information of each numbered area are summarized to form a unified annotation table and integrate it with... Each label corresponds to a specific label and is used for subsequent evaluation and report generation.
[0077] It should be understood that, inspired by the technical concept of this invention, those skilled in the art can make various improvements or modifications based on the above content without departing from the scope of this invention, and these modifications still fall within the protection scope of this invention.
Claims
1. A bridge disease detection method based on a diffusion model and a bitter fish optimization algorithm, characterized in that, The method comprises the following steps: Step 1: based on fixed view angle and distance, visible light images and near-infrared images of the disease area, i.e. the area prone to spalling and / or cracking on the surface of the bridge, are synchronously collected at multiple time nodes to obtain a visible light image dataset and a near-infrared image dataset ; Step 2: based on and establishing a preliminary labeling result set of disease area , based on performing feature extraction and pixel coordinate alignment on the disease area to obtain a disease feature set ; Step 3: Perform multi-scale image down-sampling processing on the original image data in to obtain a multi-level image set in a pyramid structure , wherein is an image of the original resolution layer, represents the layer down-sampled image, satisfies that the resolution is sequentially reduced, wherein each layer down-sampling factor is denoted as ; Step 4: Image at high resolution layer Wavelet-based noise suppression and texture residual constraint are implemented on the image at the medium resolution layer Brightness normalization and gradient adaptive smoothing are implemented, and finally the denoised image and the brightness correction image sequence are fused to obtain the image ; Step 5: Based on image , the forward diffusion and reverse denoising, i.e. reverse generation processing, are performed by the improved diffusion model to obtain a reconstructed image with enhanced edge continuity, structural integrity and texture details ; Step 6: using the reconstructed image and its corresponding original image , and a disease feature set , a multi-source fusion input set is constructed , and a multi-layer convolutional network is used to perform layer-by-layer feature extraction and fusion on each channel of to obtain a feature map set ; Step 7: Combine the feature map set , local texture difference function The context fusion mechanism completes the discrimination between artificial physical artifacts and real diseases, and outputs the preliminary disease area recognition result ; Step 8: According to the preliminary disease area identification result , the key hyperparameters are globally searched and adaptively optimized by the bitter fish optimization algorithm to obtain the optimal parameter vector ; Step 9: generate the final disease area recognition result by retraining and feedback correction using the joint inference process applied to steps 5 to 7 Step 9: generate the final disease area recognition result by retraining and feedback correction using the joint inference process applied to steps 5 to 7 ; Step 10: Unified numbering and geometric contour extraction of disease area based on disease area recognition result , Unified numbering and geometric contour extraction of disease area is performed based on the disease area recognition result.
2. The bridge disease detection method based on the diffusion model and the bitter fish optimization algorithm according to claim 1, characterized in that, The step 2 further comprises the following steps: Step 2.1: Pairing the visible and near-infrared images collected at the same time node by timestamp and one-to-one, to construct a preliminary image set composed of image pairs ; Step 2.2: In , the pixels are selected according to the brightness and texture difference respectively to generate a candidate disease area image set , and then artificial review is organized to circle and label the suspected peeling and crack areas in the image, i.e. the disease area, to establish a preliminary disease area labeling result set ; Step 2.3: Based on With , feature extraction is performed on the disease area therein, extracting texture vectors , color vectors , and geometric contour vectors and combining them into a disease feature vector set ; Step 2.4: On The pixels belonging to the visible light image are coordinate-aligned with the pixels belonging to the near-infrared image and a coupled loss is defined for the image of the disease area ; Step 2.5: Minimize the alignment error by solving the constraint of minimizing the texture and color distribution to obtain a set of disease features with small alignment error and texture fidelity .
3. The bridge disease detection method based on the diffusion model and the bitter fish optimization algorithm according to claim 2, characterized in that, by a transmission transformation matrix will be coordinates of pixels belonging to the near-infrared image mapped to coordinates of the visible light image achieve alignment of pixels belonging to the visible light image and pixels belonging to the near-infrared image.
4. The bridge disease detection method based on the diffusion model and the bitter fish optimization algorithm according to claim 3, characterized in that, The image for the disease area defines a coupling loss Is: ; wherein and are respectively coordinates and intensity functions of pixels belonging to the near-infrared image in and are respectively coordinates and intensity functions of pixels belonging to the near-infrared image in and are respectively the number of rows and columns of pixels in the image, is the number of texture blocks within the disease area, is the texture gradient of the texture block, is the texture smoothness constraint weight coefficient.
5. The bridge disease detection method based on the diffusion model and the bitter fish optimization algorithm according to claim 1, characterized in that, The step 4 further comprises the following steps: Step 4.1: performing wavelet-based denoising processing on the disease area in the image of the high-resolution layer to obtain an enhanced image after denoising ; Step 4.2: on the sequence of medium resolution images Performing a brightness correction process to obtain a sequence of corrected images that are brightness equalized and have their texture details effectively smoothed ; Step 4.3: According to the de-noised enhanced image and the brightness correction image sequence , the edge consistency detection and correction are performed on the disease area to obtain a pre-processed output image with both edge continuity and texture clarity being enhanced .
6. The bridge disease detection method based on the diffusion model and the bitter fish optimization algorithm according to claim 5, characterized in that, The step 5 further comprises the following steps: Step 5.1: Image Recognition High-noise regions in the data and generating binary masks. and image recognition In the area of abnormal lighting, a mask is generated. ,Will and Upsampling to After achieving consistent dimensions, the images are stitched together according to the channel dimensions of the image tensor. and to Perform mean-variance normalization to obtain , as input to the diffusion model; Step 5.2: Define the channel weight vector at the input layer of the diffusion model and determine the position of the high weight value; Step 5.3: Starting with a forward diffusion with timing iterations performed using a modified forward diffusion equation, a sequence of diffusion images is formed at successively increasing noise injection levels where is the total number of iteration steps of the diffusion process; Step 5.4: Based on the sequence of diffusion images , the inverse generation is performed using the modified back-projection equation to obtain the reconstructed enhanced image .
7. The bridge disease detection method based on the diffusion model and the bitter fish optimization algorithm according to claim 6, characterized in that, The method for determining the positions of high weight values is: first, defining a channel weight vector in the diffusion model input layer , which has a spatial dimension consistent with the resolution of the input image ; then extracting a beam body outer edge contour line mask and a peeling transition zone mask from the input image by Canny edge detection and a preset luminance gradient threshold value; and finally mapping the pixel positions in the union E ∪ S region to , and increasing the weight values at these positions, so as to determine these positions as the positions of high weight values.
8. The bridge disease detection method based on the diffusion model and the bitter fish optimization algorithm according to claim 6, characterized in that, constructing a binary matrix corresponding to the edge position of the beam body wherein denotes located in the edge region, and vice versa ; introducing an improvement to the existing forward diffusion equation, the improved forward diffusion equation being as follows: ; wherein with are the first the image state of the current iteration step and the image state of the previous iteration step; is the noise injection ratio; is the noise vector injected to the edge pixels; is the random noise injected to the non-edge pixels; is the cumulative noise decay coefficient used to gradually reduce the noise intensity during the diffusion process.
9. The bridge disease detection method based on the diffusion model and the bitter fish optimization algorithm according to claim 8, characterized in that, The improved backward reconstruction equation is as follows: ; wherein is the step to generate the result in reverse; is the step to generate the result in reverse; is the step to estimate the network of noise residuals in the is the edge gradient smoothing adjustment coefficient; is the gradient at the edge pixel ; is the set of edge pixels.
10. The bridge disease detection method based on the diffusion model and the bitter fish optimization algorithm according to claim 8, characterized in that, The step 8 further comprises the following steps: Step 8.1 : Set up the initial population of 1000 individuals with random initial positions in the parameter space. As a starting point for optimization, the population of bitterling is initialized and the initial positions of each individual bitterling are randomly set within the feasible parameter space, where each individual bitterling represents a combination of hyperparameters, and the parameter vector is written as , represents the value of the th individual in the th hyperparameter dimension. Step 8.2: From the initial image set Divide the test set The parameter vector of the bitter fish The joint reasoning process applied to steps 5 through 7 and in the test set The corresponding detection results are generated through this joint inference process. It also completes the quantitative evaluation and sorting of the current parameter combination, which serves as the basis for the next round of parameter updates and global search; Step 8.3: According to the ranking in the iteration round The individual position update and the population cooperative search are performed to complete the iteration update of the parameter vector of the bitterling And after meeting the convergence criterion or reaching the maximum number of iterations, the global optimal parameter combination is determined .
Citation Information
Cited By
Road and bridge disease intelligent identification method based on image identification
CN121904488A
Multi-target recognition result merging method and system of three-dimensional ground penetrating radar
CN122336564A
