Bridge safety monitoring and early warning method and system based on image recognition
By installing high-definition image sensors and improved YOLOv8 network models on the bridge supports, combined with the support vector machine optimized by the Sparrow search algorithm, automatic disease identification and early warning of the bridge supports are realized, solving the problem of untimely monitoring and early warning in the existing technology. Identify the problem of insufficient accuracy and improve the efficiency and accuracy of monitoring.
Patent Information
- Application Number
- CN202411252714.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-09
- Publication Date
- 2024-10-11
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the existing technology, the monitoring of bridge supports mainly relies on manual inspection, which makes it difficult to achieve all-weather and uninterrupted monitoring. In addition, the recognition accuracy and rapid response capabilities in complex scenarios are insufficient, and subtle cracks or slowly developing displacements cannot be discovered in time, resulting in Repair opportunity missed.
Design a bridge safety monitoring and early warning method based on image recognition. By installing high-definition image sensors around the bridge supports, collecting images and preprocessing, an improved YOLOv8 network model is constructed, combining the attention mechanism, C2f_CGblock module, and adaptive feature fusion. The ASFF module and MPDIoU loss function use the Sparrow search algorithm to optimize the support vector machine to build a disease identification model to achieve automatic identification and early warning.
It achieves 24-hour uninterrupted monitoring of bridge supports, improves the accuracy and speed of disease identification, avoids the subjectivity of human judgment, and can issue early warning signals in a timely manner, extending the service life of the bridge and reducing maintenance costs.
Smart Images

Figure CN118762268A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of bridge engineering, and in particular to a bridge safety monitoring and early warning method and system based on image recognition. Background Art
[0002] As the core connecting component in the bridge structure, the bridge bearing connects the span structure and the piers to ensure the stability and safety of the bridge under various complex loads and environmental conditions. The quality of its condition is directly related to the overall stability and service life of the bridge. Once the bearing has abnormal conditions such as displacement, offset, cracks, etc., it will directly threaten the safety and traffic capacity of the bridge, and may even cause serious safety accidents. For a long time, the monitoring of bridge bearings has mainly relied on traditional manual inspection methods. Manual inspection is time-consuming and labor-intensive, and it is difficult to cover all bearings, let alone achieve all-weather, uninterrupted monitoring; the interference of human factors may lead to inaccurate or missed inspection results; for subtle cracks or slowly developing displacements, manual inspections are often difficult to detect in time, thus missing the best time for maintenance.
[0003] In the existing technology, computer vision technology is used to identify bridge defects. However, due to the complex structure of bridge supports, the changeable environment, and the various manifestations of abnormal conditions such as cracks and displacements, the recognition accuracy of existing image recognition algorithms in complex scenarios needs to be improved. In terms of rapid response, how to quickly screen out abnormal information in massive image data and issue early warning signals in a timely manner is a problem that needs to be solved urgently. Summary of the invention
[0004] The purpose of the present invention is to solve the above problems and to design a bridge safety monitoring and early warning method and system based on image recognition.
[0005] A first aspect of the present invention provides a bridge safety monitoring and early warning method based on image recognition, the bridge safety monitoring and early warning method based on image recognition comprising the following steps: Install multiple high-definition image sensors around the bridge bearings between the bridge deck and the bridge piers, and use the high-definition image sensors to collect real-time images of the bridge bearings to obtain initial bearing images; Performing image preprocessing on the collected initial support image, completing the image preprocessing by smoothing, gamma correction and histogram equalization to obtain a preprocessed support image; Build an improved YOLOv8 network model by adding an attention mechanism module to the end of the backbone network of the YOLOv8 network model, and fusing the CG block with the C2f module to obtain the C2f_CGblock module. Reconstruct the neck network of the YOLOv8 network model, introduce the adaptive feature fusion ASFF module and the MPDIoU loss function, and obtain the improved YOLOv8 network model. The preprocessed support image is input into the improved YOLOv8 network, and the feature extraction of the preprocessed support image is performed through the improved YOLOv8 network to characterize the structural characteristics and disease characteristics of the bridge support, and the target feature image is output; Inputting the target feature image into a disease recognition model, classifying and identifying the diseases of the bridge bearings in the target feature image through the disease recognition model, and outputting a disease recognition result, wherein the disease recognition model is constructed based on a support vector machine optimized by a sparrow search algorithm; The severity of the disease of the bridge bearing is determined based on the disease identification result. When the disease reaches a warning threshold, a warning signal is issued in time and a corresponding warning strategy is formulated, wherein the warning threshold is set according to the disease type in the disease identification result.
[0006] Optionally, in a first implementation of the first aspect of the present invention, performing an image preprocessing operation on the acquired initial support image, completing the image preprocessing operation by smoothing, gamma correction and histogram equalization to obtain a preprocessed support image, includes: The initial support image is converted from the RGB space to the HSV space, and the converted initial support image is smoothed: ; In the formula, represents the trade-off parameter between the control fidelity term and the gradient term, represents the weight matrix, which is used to distinguish edge structure and texture. represents the horizontal and vertical difference operators, and are the 1-norm and 2-norm respectively, is the matrix representation of the initial support image in RGB space, Represents the new image matrix obtained after conversion to HSV Mus space, M represents the result of applying a smoothing filter to M; The gamma correction function is used to correct the global illumination component of the initial support image after smoothing: ; ; ; In the formula, E represents the pixel value after Gamma correction, L represents the pixel value of the initial support image after smoothing, It represents the elevation ratio of the straight line passing through the origin and tangent to the curve. represents the horizontal coordinate of the tangent point, Indicates the exponential value of brightness adjustment; The contrast of the initial support image after Gamma correction is equalized by histogram equalization to obtain the preprocessed support image.
[0007] Optionally, in a second implementation of the first aspect of the present invention, the step of using histogram equalization to adjust the contrast of the initial support image after the gamma correction process includes: Obtain the initial support image after Gamma correction, and calculate the mean and standard deviation of the histogram of the corresponding illumination image; Set the lower threshold based on the mean and standard deviation of the histogram and upper threshold : ; In the formula, represents the histogram mean, represents the histogram standard deviation; The histogram frequencies that are less than the lower threshold and greater than the upper threshold in the histogram are weighted to obtain a weighted histogram: ; ; In the formula, Represents a weighted histogram, K represents the number of gray levels of the image, represents the weighting coefficient, represents the histogram frequency; The weighted histogram is normalized and equalized in turn, and the processed illumination image is gray-scale mapped; The grayscale-mapped illumination image and the reflected image of the initial support image after Gamma correction are equivalently transformed to obtain an enhanced brightness component, which is then converted into RGB space to obtain a preprocessed support image.
[0008] Optionally, in a third implementation of the first aspect of the present invention, adding an attention mechanism module at the end of the backbone network of the YOLOv8 network model includes: The attention mechanism module includes two 1×1 parallel branches and one 3×3 branch path. In the 1×1 branch, a one-dimensional global average pooling operation in the horizontal / vertical directions is used to obtain the dependencies between all channels: ; ; In the formula, C represents the number of channels, , represents the dimension of the input feature space, X represents the input feature, Represents the feature vector Medium Category The characteristic value of Indicates category In the feature vector No. elements, and represents the column index of the feature vector, Represents the feature vector Medium Category The characteristic value of Indicates category In the feature vector No. elements; The binomial distribution after linear convolution is fitted by two Sigmoid nonlinear functions, and then the aggregation of the channel attention map within each group is realized through multiplication operation; The output of one 1×1 branch is normalized using a 2D global average pooling group to encode the global spatial information. In another branch, a 3×3 convolution is used to obtain local cross-channel interaction features to expand the feature space and convert the output into the corresponding dimensional shape. The linear transformation is fitted through the Softmax nonlinear function, and the outputs of the two branches are connected, and then the connected results are multiplied by matrix multiplication to obtain the spatial attention map and the spatial position information attention map; The sigmoid activation function is used on the spatial attention map and the spatial position information attention map to obtain an independent spatial selection mask for each large kernel. The mask is weighted with the corresponding feature map row to capture the pixel-level pairwise relationship and the global context of all pixels, and the attention feature is obtained by fusing them through the convolutional layer.
[0009] Optionally, in a fourth implementation manner of the first aspect of the present invention, the CG block is fused with the C2f module to obtain a C2f_CGblock module, the neck network of the YOLOv8 network model is reconstructed, and an adaptive feature fusion ASFF module and an MPDIoU loss function are introduced, including: After the C2f_CGblock module performs 1×1 convolution on the input image, it enters the parallel branch processing of local feature extraction and surrounding context feature extraction. The local feature extraction learns the local features in the input image through convolution, and the surrounding context feature extraction uses dilated convolution to expand the receptive field around the local features. After branch processing, the features extracted by different branches are input into the joint feature extractor, and the feature maps of different scales are spliced in the channel dimension. The spliced feature maps are input into the global context extractor after batch normalization and parameterized linear units. The feature information of the whole image is extracted in the global context extractor through global average pooling, and then the effective representation of the global context is refined through two fully connected layers; In the PAN structure of the neck network, multiple feature maps are input through different paths, and spatial information is captured by using multiple 1×1 and 3×3 convolution blocks. The feature learning is repeated multiple times using 3×3 convolution blocks and 3×3 convolution blocks to enhance the expression ability of the features. Finally, the output is integrated through CSPNet connection. The adaptive feature fusion ASFF module performs channel fusion through three 1×1 convolution kernels, and then uses a 1×1 convolution kernel to compress the channels to 3. Each channel corresponds to a feature level, and the weight is calculated through the Softmax operation. Then, the feature maps of the three levels are weighted fused, and finally a 3×3 convolution kernel is used to adjust the size of the feature map and output the fused features.
[0010] Optionally, in a fifth implementation of the first aspect of the present invention, the process of constructing the disease recognition model based on the sparrow search algorithm to optimize the support vector machine includes: Initializing the population using the Sine chaotic mapping strategy, calculating the initial fitness value through cross-checking, and obtaining the global optimal fitness value and the global optimal population based on the initial fitness value; Dynamic adaptive weights are introduced to update the position information according to the position of the discoverer during each iteration: ; ; In the formula, represents the global optimal solution of the jth dimension in the previous generation, represents the maximum number of iterations, represents the position of the i-th sparrow in the j-th (j∈[1,d]) dimension in the t-th iteration, represents random numbers that conform to the standard normal distribution, ( ∈[0,1]) and (ST∈[0.5,1]) represents the alarm value and safety threshold, ST∈[0.5,1], ∈[0,1], Indicates the current iteration number, Inertia weight, represents the random disturbance term, Indicates the updated position; The remaining sparrows are treated as joiners and the Levy flight strategy is used to update the position: ; In the formula, Indicates the position of the individual with the worst fitness value. Indicates the position of the individual with the best fitness value. represents the population size, represents the position of the i-th sparrow in the j-th dimension in the t-th iteration, Indicates the offset distance of the flight strategy. represents the number of remaining sparrows, Indicates the position of the remaining sparrows at time t+1; Update the fitness value to get a better global optimal value: ; In the formula, represents the current global optimal position, θ represents the step size control parameter, K represents a random number and K∈[-1,1], Indicates the fitness value of the current sparrow individual, and Respectively represent the current global best and worst fitness values, ε represents the smallest constant, The position of the individual with the worst fitness value, Indicates the current iteration number; Determine whether the maximum number of iterations has been reached. If not, continue to iterate. If reached, stop iterating and output the optimal parameters to assign to the support vector machine to construct a disease recognition model. The optimal parameters at least include the kernel function parameters and penalty factors of the support vector machine.
[0011] Optionally, in a sixth implementation of the first aspect of the present invention, the target feature image is input into a defect recognition model, the defects of the bridge bearings in the target feature image are classified and recognized by the defect recognition model, and a defect recognition result is output, including: The target feature image is converted into a vector in a high-dimensional feature space by the PCA algorithm, the converted feature vector is used as the input of the disease recognition model, and the radial basis kernel function is used as the kernel function of the disease recognition model for classification: ; In the formula, represents the Lagrange multiplier and ∈(0, b), b represents the penalty factor, Indicates the classification category, represents the threshold value, represents the support vector machine kernel function, represents the signature function, Indicates the sequence number of the sample point, Indicates the total number of sample points; For each input feature vector, different defect categories are identified through the defect recognition model to obtain a classification decision, and a defect category label is assigned to the target feature image to output a defect recognition result, wherein the defect recognition result at least includes abnormal hanging height, shear deformation, uneven bulging of rubber, abnormal crack width, abnormal transverse bridge angle, abnormal longitudinal bridge angle, and eversion of the rubber sheet.
[0012] The second aspect of the present invention provides a bridge safety monitoring and early warning system based on image recognition, the bridge safety monitoring and early warning system based on image recognition comprises an image acquisition module, an image preprocessing module, a model building module, a feature extraction module, a disease recognition module and a disease early warning module, wherein: An image acquisition module is used to install multiple high-definition image sensors around the bridge bearings between the bridge deck and the bridge piers, and to acquire real-time images of the bridge bearings through the high-definition image sensors to obtain initial bearing images; An image preprocessing module, used to perform image preprocessing operation on the collected initial support image, complete the image preprocessing operation through smoothing, Gamma correction and histogram equalization processing, and obtain a preprocessed support image; The model building module is used to build an improved YOLOv8 network model. By adding an attention mechanism module to the end of the backbone network of the YOLOv8 network model and fusing the CG block with the C2f module to obtain the C2f_CGblock module, the neck network of the YOLOv8 network model is reconstructed, and the adaptive feature fusion ASFF module and MPDIoU loss function are introduced to obtain the improved YOLOv8 network model. A feature extraction module is used to input the preprocessed support image into the improved YOLOv8 network, perform feature extraction on the preprocessed support image through the improved YOLOv8 network to characterize the structural characteristics and disease characteristics of the bridge support, and output a target feature image; A disease recognition module is used to input the target feature image into a disease recognition model, classify and recognize the diseases of the bridge bearings in the target feature image through the disease recognition model, and output a disease recognition result, wherein the disease recognition model is constructed based on a support vector machine optimized by a sparrow search algorithm; The disease warning module is used to determine the severity of the disease of the bridge bearing based on the disease identification result. When the disease reaches the warning threshold, a warning signal is issued in time and a corresponding warning strategy is formulated, wherein the warning threshold is set according to the disease type in the disease identification result.
[0013] Optionally, in a first implementation of the second aspect of the present invention, the image preprocessing module includes a smoothing processing submodule, a gamma correction submodule and a histogram equalization submodule, wherein: The smoothing submodule is used to convert the initial support image from the RGB space to the HSV space, and perform smoothing on the converted initial support image: ; In the formula, represents the trade-off parameter between the control fidelity term and the gradient term, represents the weight matrix, which is used to distinguish edge structure and texture. represents the horizontal and vertical difference operators, and are the 1-norm and 2-norm respectively, is the matrix representation of the initial support image in RGB space, Represents the new image matrix obtained after conversion to HSV Mus space, M represents the result of applying a smoothing filter to M; The Gamma correction submodule is used to correct the global illumination component of the initial support image after smoothing using the Gamma correction function: ; ; ; In the formula, E represents the pixel value after Gamma correction, L represents the pixel value of the initial support image after smoothing, It represents the elevation ratio of the straight line passing through the origin and tangent to the curve. represents the horizontal coordinate of the tangent point, Indicates the exponential value of brightness adjustment; The histogram equalization submodule is used to use histogram equalization to equalize the contrast of the initial support image after the gamma correction processing to obtain a preprocessed support image.
[0014] Optionally, in a first implementation of the second aspect of the present invention, the disease identification module includes a mapping submodule, a first updating submodule, a second updating submodule, a third updating submodule and a judging submodule, wherein: A mapping submodule is used to initialize the population using a Sine chaotic mapping strategy, calculate an initial fitness value through cross-checking, and obtain a global optimal fitness value and a global optimal population based on the initial fitness value; The first update submodule is used to introduce dynamic adaptive weights and update the location information according to the position of the discoverer during each iteration: ; ; In the formula, represents the global optimal solution of the jth dimension in the previous generation, represents the maximum number of iterations, represents the position of the i-th sparrow in the j-th (j∈[1,d]) dimension in the t-th iteration, represents random numbers that conform to the standard normal distribution, ( ∈[0,1]) and (ST∈[0.5,1]) represents the alarm value and safety threshold, ST∈[0.5,1], ∈[0,1], Indicates the current iteration number, Inertia weight, represents the random disturbance term, Indicates the updated position; The second update submodule is used to take the remaining sparrows as joiners and update their positions using the Levy flight strategy: ; In the formula, Indicates the position of the individual with the worst fitness value. Indicates the position of the individual with the best fitness value. represents the population size, represents the position of the i-th sparrow in the j-th dimension in the t-th iteration, Indicates the offset distance of the flight strategy. represents the number of remaining sparrows, Indicates the position of the remaining sparrows at time t+1; The third update submodule is used to update the fitness value to obtain a better global optimal value: ; In the formula, represents the current global optimal position, θ represents the step size control parameter, K represents a random number and K∈[-1,1], Indicates the fitness value of the current sparrow individual, and Respectively represent the current global best and worst fitness values, ε represents the smallest constant, The position of the individual with the worst fitness value, Indicates the current iteration number; The judgment submodule is used to judge whether the maximum number of iterations has been reached. If not, the iteration continues. If reached, the iteration is stopped and the optimal parameters are output and assigned to the support vector machine to construct a disease recognition model, where the optimal parameters at least include the kernel function parameters and penalty factors of the support vector machine.
[0015] The present invention has the following beneficial effects: 1. By installing multiple high-definition image sensors around the bridge bearings between the bridge deck and the piers, 24-hour uninterrupted monitoring of the bridge bearings is achieved. These sensors can capture changes in the bearing state with high precision, ensuring the real-time and accuracy of the data. 2. The image preprocessing techniques such as smoothing, gamma correction and histogram equalization are adopted to effectively improve the quality of the collected initial bearing images. The image noise is removed, the image contrast is enhanced, the image information is clearer and easier to analyze, and the accuracy and efficiency of subsequent disease identification are improved. 3. A deep learning network model based on YOLOv8 is constructed and optimized. By introducing the attention mechanism module, C2f_CGblock module, adaptive feature fusion ASFF module and MPDIoU loss function, the model's ability to extract the structural characteristics and disease characteristics of the bridge bearings is improved. The accuracy of disease identification is improved, the recognition speed is accelerated, and the system can respond quickly to changes in the bearing state. 4. The target feature image that characterizes the structural characteristics and disease characteristics of the bridge bearing can be automatically extracted. By optimizing the defect recognition model constructed by the support vector machine based on the sparrow search algorithm, the defects in the target feature image are accurately classified and identified. It not only avoids the subjectivity and errors of human judgment, but also greatly improves the accuracy and reliability of defect recognition. 5. According to the defect recognition results, the system can automatically determine the severity of the disease of the bridge support and issue a warning signal in time when the disease reaches the preset warning threshold. The system can also formulate corresponding warning strategies according to the type of disease, providing scientific decision-making basis for the bridge management department. It not only helps to timely discover and deal with potential safety hazards, but also effectively prolong the service life of the bridge and reduce maintenance costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the following detailed description of the preferred embodiment.The drawings are only for the purpose of illustrating the preferred embodiments and are not to be construed as limiting the invention.
[0017] Figure 1 A schematic diagram of a first embodiment of a bridge safety monitoring and early warning method based on image recognition provided by an embodiment of the present invention; Figure 2 A schematic diagram of a second embodiment of a bridge safety monitoring and early warning method based on image recognition provided by an embodiment of the present invention; Figure 3 A schematic diagram of a third embodiment of a bridge safety monitoring and early warning method based on image recognition provided by an embodiment of the present invention; Figure 4 A structural schematic diagram of a bridge safety monitoring and early warning system based on image recognition provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0018] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, device, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0019] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1 A schematic diagram of a first embodiment of a bridge safety monitoring and early warning method based on image recognition provided by an embodiment of the present invention, the method specifically comprises the following steps: Step 101: Install multiple high-definition image sensors around the bridge bearings between the bridge deck and the bridge piers, and collect real-time images of the bridge bearings through the high-definition image sensors to obtain initial bearing images; Specifically, in this embodiment, there are two main types of high-definition image sensors, namely CCD (Charge-Coupled Device) and CMOS (Complementary Metal-Oxide Semiconductor). The initial support image includes the plate support image information of the bridge and the basin support image information of the bridge.
[0020] Step 102: performing image preprocessing on the collected initial support image, completing the image preprocessing by smoothing, gamma correction and histogram equalization to obtain a preprocessed support image; Specifically, in this embodiment: Convert the initial support image from RGB space to HSV space, and perform smoothing on the converted initial support image: ; In the formula, represents the trade-off parameter between the control fidelity term and the gradient term, represents the weight matrix, which is used to distinguish edge structure and texture. represents the horizontal and vertical difference operators, and are the 1-norm and 2-norm respectively, is the matrix representation of the initial support image in RGB space, Represents the new image matrix obtained after conversion to HSV Mus space, M represents the result of applying a smoothing filter to M; The gamma correction function is used to correct the global illumination component of the initial support image after smoothing: ; ; ; In the formula, E represents the pixel value after Gamma correction, L represents the pixel value of the initial support image after smoothing, It represents the elevation ratio of the straight line passing through the origin and tangent to the curve. represents the horizontal coordinate of the tangent point, Indicates the exponential value of brightness adjustment; The contrast of the initial support image after Gamma correction is equalized by histogram equalization to obtain the preprocessed support image.
[0021] Obtain the initial support image after Gamma correction, and calculate the mean and standard deviation of the histogram of the corresponding illumination image; Set the lower threshold based on the mean and standard deviation of the histogram and upper threshold : ; In the formula, represents the histogram mean, represents the histogram standard deviation; The histogram frequencies that are less than the lower threshold and greater than the upper threshold in the histogram are weighted to obtain a weighted histogram: ; ; In the formula, Represents a weighted histogram, K represents the number of gray levels of the image, represents the weighting coefficient, represents the histogram frequency; The weighted histogram is normalized and equalized in turn, and the processed illumination image is gray-scale mapped; The grayscale-mapped illumination image and the reflected image of the initial support image after Gamma correction are equivalently transformed to obtain an enhanced brightness component, which is then converted into RGB space to obtain a preprocessed support image.
[0022] Step 103, construct an improved YOLOv8 network model, by adding an attention mechanism module at the end of the backbone network of the YOLOv8 network model, and fusing the CG block with the C2f module to obtain the C2f_CGblock module, reconstructing the neck network of the YOLOv8 network model, introducing the adaptive feature fusion ASFF module and the MPDIoU loss function, and obtaining the improved YOLOv8 network model; Specifically, in this embodiment, The CG block is an improvement mechanism. It is a module that replaces Conv, Context Guided Block (CG bock), which is a module proposed in the CGNet paper. Its basic principle is to simulate the human visual system's reliance on contextual information to understand the scene. CG bock is used to capture local features, surrounding context, and global context, and fuse this information to improve accuracy.
[0023] The C2f module is a component for optimizing feature extraction introduced in models such as YOLOv8. It is designed to improve the richness of gradient flow information while ensuring the lightweight of the model, thereby enhancing the detection performance of the model. Compared with the original C3 module, the C2f module introduces the idea of ELAN (Efficient Lightweight Attention Network), which means that it enhances the feature representation ability by combining the attention mechanism, so that the network can better focus on the key information in the image and ignore the insignificant parts. The structure of the C2f module is similar to that of the C3 module, consisting of a series of convolutional layers, but through a specific attention mechanism or lightweight design, the efficiency of feature utilization is improved, which helps the model achieve better performance in target detection tasks. In addition, the C2f module may also contain the idea of residual structure to promote the smooth flow of gradients and further improve the stability and efficiency of model training.
[0024] The Adaptive Scale Feature Fusion (ASFF) module is an effective method for integrating features of different scales in the field of deep learning, especially in object detection models. The main purpose of the design of this module is to address the challenges in multi-scale object detection, that is, how to effectively fuse information from feature maps at different levels to improve the detection performance of objects of different sizes. The key feature of ASFF is its adaptability, which allows the model to dynamically adjust the contribution weights from feature maps of different scales according to the actual size and complexity of the object in the input image. In specific implementation, the ASFF module usually establishes connections between multiple feature layers, each of which represents a different level of semantic information and spatial resolution. Then, by learning a set of weight parameters, the module is able to perform weighted fusion of these features of different scales, thereby maintaining the spatial details of high-resolution features while also utilizing the semantic information of higher-level features. Such a design helps the model capture the features of the object at different scales and improves the accuracy and robustness of detection.
[0025] The MPDIoU (Maximum Possible DIoU) loss function is a bounding box regression loss function used in object detection tasks, especially in models such as YOLOv8 and improved YOLOv5. It is a further improvement based on the DIoU (Distance-IoU) loss function. The DIoU loss has combined the intersection over Union (IoU) and the distance information between the center points of the bounding box, aiming to optimize the accuracy of bounding box positioning and solve the problem that the traditional IoU loss cannot directly consider the distance between the center points of the bounding box. The MPDIoU loss function is further developed on this basis, and by maximizing the DIoU value between the predicted bounding box and the true bounding box, it drives the network to learn more accurate bounding box positions and shapes. Compared with other loss functions such as G / IoU, MPDIoU can provide better performance when dealing with complex scenes, especially in improving the positioning accuracy and classification performance of the detection box. By optimizing the MPDIoU loss, the model can more effectively reduce the deviation between the predicted box and the actual target, thereby achieving significant performance improvements on multiple datasets.
[0026] Specifically, in this embodiment, an attention mechanism module is added at the end of the backbone network of the YOLOv8 network model, including: The attention mechanism module includes two 1×1 parallel branches and one 3×3 branch path. In the 1×1 branch, a one-dimensional global average pooling operation in the horizontal / vertical directions is used to obtain the dependencies between all channels: ; ; In the formula, C represents the number of channels, , represents the dimension of the input feature space, X represents the input feature, Represents the feature vector Medium Category The characteristic value of Indicates category In the feature vector No. elements, and represents the column index of the feature vector, Represents the feature vector Medium Category The characteristic value of Indicates category In the feature vector No. elements; The binomial distribution after linear convolution is fitted by two Sigmoid nonlinear functions, and then the aggregation of the channel attention map within each group is realized through multiplication operation; The output of one 1×1 branch is normalized using a 2D global average pooling group to encode the global spatial information. In another branch, a 3×3 convolution is used to obtain local cross-channel interaction features to expand the feature space and convert the output into the corresponding dimensional shape. The linear transformation is fitted through the Softmax nonlinear function, and the outputs of the two branches are connected, and then the connected results are multiplied by matrix multiplication to obtain the spatial attention map and the spatial position information attention map; The sigmoid activation function is used on the spatial attention map and the spatial position information attention map to obtain an independent spatial selection mask for each large kernel. The mask is weighted with the corresponding feature map row to capture the pixel-level pairwise relationship and the global context of all pixels, and the attention feature is obtained by fusing them through the convolutional layer.
[0027] Specifically, in this embodiment, the CG block is fused with the C2f module to obtain the C2f_CGblock module, the neck network of the YOLOv8 network model is reconstructed, and the adaptive feature fusion ASFF module and the MPDIoU loss function are introduced, including: After the C2f_CGblock module performs 1×1 convolution on the input image, it enters the parallel branch processing of local feature extraction and surrounding context feature extraction. The local feature extraction learns the local features in the input image through convolution, and the surrounding context feature extraction uses dilated convolution to expand the receptive field around the local features. After branch processing, the features extracted by different branches are input into the joint feature extractor, and the feature maps of different scales are spliced in the channel dimension. The spliced feature maps are input into the global context extractor after batch normalization and parameterized linear units. The feature information of the whole image is extracted in the global context extractor through global average pooling, and then the effective representation of the global context is refined through two fully connected layers; In the PAN structure of the neck network, multiple feature maps are input through different paths, and spatial information is captured by using multiple 1×1 and 3×3 convolution blocks. The feature learning is repeated multiple times using 3×3 convolution blocks and 3×3 convolution blocks to enhance the expression ability of the features. Finally, the output is integrated through CSPNet connection. The adaptive feature fusion ASFF module performs channel fusion through three 1×1 convolution kernels, and then uses a 1×1 convolution kernel to compress the channels to 3. Each channel corresponds to a feature level, and the weight is calculated through the Softmax operation. Then, the feature maps of the three levels are weighted fused, and finally a 3×3 convolution kernel is used to adjust the size of the feature map and output the fused features.
[0028] Step 104: input the preprocessed support image into the improved YOLOv8 network, perform feature extraction on the preprocessed support image through the improved YOLOv8 network to characterize the structural characteristics and disease characteristics of the bridge support, and output a target feature image; Specifically, in this embodiment, the number of iterations of the improved YOLOv8 network is set to 150 times, the image data is input into the improved YOLOv8 network, and the data is enhanced after input layer preprocessing. Then, the features of the support image are extracted into different feature maps through the C2f_CGblock module, the attention mechanism module, and the ASFF module. The fused features are detected and integrated through the CSPNet connection to output the target feature image.
[0029] Step 105, input the target feature image into a disease recognition model, classify and recognize the diseases of the bridge bearings in the target feature image through the disease recognition model, and output the disease recognition result, wherein the disease recognition model is constructed based on a support vector machine optimized by a sparrow search algorithm; Specifically, in this embodiment, the process of constructing a disease recognition model based on the sparrow search algorithm to optimize the support vector machine includes: The population is initialized using the Sine chaotic mapping strategy, and the initial fitness value is calculated through cross-validation. Based on the initial fitness value, the global optimal fitness value and the global optimal population are obtained. Dynamic adaptive weights are introduced to update the position information according to the position of the discoverer during each iteration: ; ; In the formula, represents the global optimal solution of the jth dimension in the previous generation, represents the maximum number of iterations, represents the position of the i-th sparrow in the j-th (j∈[1,d]) dimension in the t-th iteration, represents random numbers that conform to the standard normal distribution, ( ∈[0,1]) and (ST∈[0.5,1]) represents the alarm value and safety threshold, ST∈[0.5,1], ∈[0,1], Indicates the current iteration number, Inertia weight, represents the random disturbance term, Indicates the updated position; The remaining sparrows are treated as joiners and the Levy flight strategy is used to update the position: ; In the formula, Indicates the position of the individual with the worst fitness value. Indicates the position of the individual with the best fitness value. represents the population size, represents the position of the i-th sparrow in the j-th dimension in the t-th iteration, Indicates the offset distance of the flight strategy. represents the number of remaining sparrows, Indicates the position of the remaining sparrows at time t+1; Update the fitness value to get a better global optimal value: ; In the formula, represents the current global optimal position, θ represents the step size control parameter, K represents a random number and K∈[-1,1], Indicates the fitness value of the current sparrow individual, and Respectively represent the current global best and worst fitness values, ε represents the smallest constant, The position of the individual with the worst fitness value, Indicates the current iteration number; Determine whether the maximum number of iterations has been reached. If not, continue to iterate. If reached, stop iterating and output the optimal parameters to assign to the support vector machine to construct a disease recognition model. The optimal parameters at least include the kernel function parameters and penalty factors of the support vector machine.
[0030] Specifically, in this embodiment, the target feature image is input into the defect recognition model, and the defects of the bridge bearings in the target feature image are classified and recognized by the defect recognition model, and the defect recognition result is output, including: The target feature image is converted into a vector in a high-dimensional feature space through the PCA algorithm, and the converted feature vector is used as the input of the disease recognition model. The radial basis kernel function is used as the kernel function of the disease recognition model for classification: ; In the formula, represents the Lagrange multiplier and ∈(0, b), b represents the penalty factor, Indicates the classification category, represents the threshold value, represents the support vector machine kernel function, represents the signature function, Indicates the sequence number of the sample point, Indicates the total number of sample points; For each input feature vector, different defect categories are identified through the defect recognition model to obtain a classification decision, and a defect category label is assigned to the target feature image to output the defect recognition result, where the defect recognition result at least includes abnormal hanging height, shear deformation, uneven rubber bulging, abnormal crack width, abnormal transverse bridge angle, abnormal longitudinal bridge angle, and rubber sheet eversion.
[0031] Step 106: Determine the severity of the bridge bearing disease based on the disease identification result. When the disease reaches the warning threshold, issue a warning signal in time and formulate a corresponding warning strategy, wherein the warning threshold is set according to the disease type in the disease identification result.
[0032] Specifically, in this embodiment, when the disease reaches the warning threshold, a warning signal is sent to the system. The warning threshold includes at least the abnormal hanging height exceeding 3mm (when the angle of the gap formed by the plate rubber bearing on the bottom surface of the bridge and the side of the supporting pad stone is too large, it will be firmly lifted up, causing partial emptying), shear deformation greater than 16° (the bearing size, shape, material, etc. do not meet the requirements), uneven bulging of rubber, crack width greater than 2mm and length reaching 51% of the corresponding side length (due to long-term exposure to vehicle loads and environmental weathering, the rubber plate has aged, hardened, deformed, etc., and the rubber has lost a certain degree of elasticity and bearing capacity), and the transverse angle of the bridge is greater than (The combined effect of various factors such as the superposition of various load effects on the upper part of the bridge, aging of the bearings and unsatisfactory geological conditions), the basin bearing of the bridge has a longitudinal bridge angle greater than , the rubber sheet is everted (improper selection of rubber sheet materials, unreasonable design of pot-type bearings, and poor construction and installation quality, which lead to aging, deterioration, uneven force and other problems of the rubber sheet during use).
[0033] Once the disease identification results show that the degree of disease of certain bearings has reached the preset warning threshold, the bridge management system will immediately trigger the warning mechanism, and notify the relevant departments and responsible persons through electronic communication means such as text messages, emails, or directly displaying alarm information on the monitoring platform. At the same time, the system will automatically start the corresponding emergency plan according to the warning level, including but not limited to strengthening the monitoring frequency, arranging on-site review, formulating temporary reinforcement measures, or directly starting the maintenance and replacement procedures. In addition, the early warning strategy also includes temporary adjustment suggestions for traffic flow to reduce the load pressure on the affected bearings, and issuing necessary safety tips to the public to ensure the safety of people and vehicles. Through this active prevention and rapid response mechanism, the efficiency and effectiveness of bridge safety management can be significantly improved, the service life of the bridge can be effectively extended, and public safety can be guaranteed.
[0034] This embodiment has the following beneficial effects: 1. By installing multiple high-definition image sensors around the bridge bearings between the bridge deck and the piers, 24-hour uninterrupted monitoring of the bridge bearings is achieved. These sensors can capture changes in the bearing state with high precision, ensuring the real-time and accuracy of the data. 2. The image preprocessing techniques such as smoothing, gamma correction and histogram equalization are used to effectively improve the quality of the initial bearing image collected. The image noise is removed, the image contrast is enhanced, the image information is clearer and easier to analyze, and the accuracy and efficiency of subsequent disease identification are improved. 3. A deep learning network model based on YOLOv8 is constructed and optimized. By introducing the attention mechanism module, C2f_CGblock module, adaptive feature fusion ASFF module and MPDIoU loss function, the model's ability to extract the structural characteristics and disease characteristics of the bridge bearing is improved. The accuracy of disease identification is improved, the recognition speed is accelerated, and the system can respond quickly to changes in the bearing state. 4. The target feature image that characterizes the structural characteristics and disease characteristics of the bridge bearing can be automatically extracted. By optimizing the defect recognition model constructed by the support vector machine based on the sparrow search algorithm, the defects in the target feature image are accurately classified and identified. This process not only avoids the subjectivity and errors of human judgment, but also greatly improves the accuracy and reliability of defect recognition. 5. According to the defect recognition results, the system can automatically determine the severity of the disease of the bridge support and issue a warning signal in time when the disease reaches the preset warning threshold. At the same time, the system can also formulate corresponding warning strategies according to the type of disease, providing scientific decision-making basis for the bridge management department. This not only helps to timely discover and deal with potential safety hazards, but also effectively prolongs the service life of the bridge and reduces maintenance costs.
[0035] See also Figure 2 , a schematic diagram of a second embodiment of a bridge safety monitoring and early warning method based on image recognition provided by an embodiment of the present invention, in which an image preprocessing operation is performed on the collected initial support image, and the image preprocessing operation is completed by smoothing, gamma correction and histogram equalization processing to obtain a preprocessed support image, including: Step 1021: convert the initial support image from the RGB space to the HSV space, and perform smoothing on the converted initial support image: ; In the formula, represents the trade-off parameter between the control fidelity term and the gradient term, represents the weight matrix, which is used to distinguish edge structure and texture. represents the horizontal and vertical difference operators, and are the 1-norm and 2-norm respectively, is the matrix representation of the initial support image in RGB space, Represents the new image matrix obtained after conversion to HSV Mus space, M represents the result of applying a smoothing filter to M; Step 1022: Use the gamma correction function to correct the global illumination component of the initial support image after smoothing: ; ; ; In the formula, E represents the pixel value after Gamma correction, L represents the pixel value of the initial support image after smoothing, It represents the elevation ratio of the straight line passing through the origin and tangent to the curve. represents the horizontal coordinate of the tangent point, Indicates the exponential value of brightness adjustment; Step 1023: Use histogram equalization to equalize the contrast of the initial support image after the gamma correction process to obtain a preprocessed support image.
[0036] In this embodiment, image preprocessing techniques such as smoothing, gamma correction and histogram equalization are used to effectively improve the quality of the collected initial support image, remove image noise, enhance image contrast, make image information clearer and easier to analyze, and improve the accuracy and efficiency of subsequent disease identification.
[0037] See also Figure 3 , a schematic diagram of a third embodiment of a bridge safety monitoring and early warning method based on image recognition provided by an embodiment of the present invention, in which an attention mechanism module is added to the end of the backbone network of the YOLOv8 network model, including: Step 1031, the attention mechanism module includes two 1×1 branch parallel branches and one 3×3 branch path. In the 1×1 branch, a one-dimensional global average pooling operation in the horizontal / vertical two-dimensional direction is used to obtain the dependency relationship between all channels: ; ; In the formula, C represents the number of channels, , represents the dimension of the input feature space, X represents the input feature, Represents the feature vector Medium Category The characteristic value of Indicates category In the feature vector No. elements, and represents the column index of the feature vector, Represents the feature vector Medium Category The characteristic value of Indicates category In the feature vector No. elements; Step 1032: Fit the binomial distribution after linear convolution through two Sigmoid nonlinear functions, and then realize the aggregation of the channel attention map in each group through multiplication operation; Step 1033: normalize a 1×1 branch output using a two-dimensional global average pooling group to encode the global spatial information, and use a 3×3 convolution in another branch to obtain local cross-channel interaction features to expand the feature space, and convert the output into a corresponding dimensional shape; Step 1034, complete the fitting of the linear transformation through the Softmax nonlinear function, connect the outputs of the two branches, and then multiply the connected results through matrix multiplication to obtain the spatial attention map and the spatial position information attention map; Step 1035: Use the Sigmoid activation function to obtain an independent spatial selection mask for each large kernel on the spatial attention map and the spatial position information attention map, weight the mask with the corresponding feature map row, capture the pixel-level pairwise relationship and the global context of all pixels, and obtain the attention feature through convolutional layer fusion.
[0038] In this embodiment, image preprocessing techniques such as smoothing, gamma correction and histogram equalization are used to effectively improve the quality of the collected initial support image, remove image noise, enhance image contrast, make image information clearer and easier to analyze, and improve the accuracy and efficiency of subsequent disease identification.
[0039] In this embodiment, a deep learning network model based on YOLOv8 is constructed and optimized, and the attention mechanism module is introduced to improve the model's ability to extract the structural characteristics and disease characteristics of bridge bearings. The accuracy of disease identification is improved, the identification speed is accelerated, and the system can respond quickly to changes in bearing status.
[0040] See also Figure 4 , a structural schematic diagram of a bridge safety monitoring and early warning system based on image recognition provided by an embodiment of the present invention, the system includes an image acquisition module, an image preprocessing module, a model building module, a feature extraction module, a disease recognition module and a disease early warning module, wherein, An image acquisition module 401 is used to install a plurality of high-definition image sensors around the bridge bearings between the bridge deck and the bridge piers, and to acquire real-time images of the bridge bearings through the high-definition image sensors to obtain initial bearing images; Specifically, in this embodiment, there are two main types of high-definition image sensors, namely CCD (Charge-Coupled Device) and CMOS (Complementary Metal-Oxide Semiconductor). The initial support image includes the plate support image information of the bridge and the basin support image information of the bridge.
[0041] The image preprocessing module 402 is used to perform image preprocessing operations on the collected initial support image, and complete the image preprocessing operations through smoothing, gamma correction and histogram equalization processing to obtain a preprocessed support image; Specifically, the image preprocessing module in this embodiment includes a smoothing processing submodule, a gamma correction submodule and a histogram equalization submodule, wherein: The smoothing submodule is used to convert the initial support image from the RGB space to the HSV space and perform smoothing on the converted initial support image: ; In the formula, represents the trade-off parameter between the control fidelity term and the gradient term, represents the weight matrix, which is used to distinguish edge structure and texture. represents the horizontal and vertical difference operators, and are the 1-norm and 2-norm respectively, is the matrix representation of the initial support image in RGB space, Represents the new image matrix obtained after conversion to HSV Mus space, M represents the result of applying a smoothing filter to M; The Gamma correction submodule is used to correct the global illumination component of the initial support image after smoothing using the Gamma correction function: ; ; ; In the formula, E represents the pixel value after Gamma correction, L represents the pixel value of the initial support image after smoothing, It represents the elevation ratio of the straight line passing through the origin and tangent to the curve. represents the horizontal coordinate of the tangent point, Indicates the exponential value of brightness adjustment; The histogram equalization submodule is used to use histogram equalization to equalize the contrast of the initial support image after the gamma correction processing to obtain a preprocessed support image.
[0042] Specifically, in this embodiment, the histogram equalization submodule further includes an image acquisition unit, a weighting unit, a processing unit, and a conversion unit, wherein: An image acquisition unit, used to acquire an initial support image after Gamma correction processing, and calculate the mean and standard deviation of a histogram of a corresponding illumination image; Set the lower threshold based on the mean and standard deviation of the histogram and upper threshold : ; In the formula, represents the histogram mean, represents the histogram standard deviation; The weighting unit is used to weight the histogram frequencies that are less than the lower threshold and greater than the upper threshold in the histogram to obtain a weighted histogram: ; ; In the formula, Represents a weighted histogram, K represents the number of gray levels of the image, represents the weighting coefficient, represents the histogram frequency; A processing unit, used for performing normalization and equalization processing on the weighted histogram in sequence, and performing grayscale mapping on the processed illumination image; The conversion unit is used to perform equivalent transformation on the grayscale mapped illumination image and the reflected image of the initial support image after Gamma correction processing to obtain an enhanced brightness component, and convert the enhanced brightness component into RGB space to obtain a preprocessed support image.
[0043] The model building module 403 is used to build an improved YOLOv8 network model, by adding an attention mechanism module at the end of the backbone network of the YOLOv8 network model, fusing the CG block with the C2f module to obtain the C2f_CGblock module, reconstructing the neck network of the YOLOv8 network model, introducing the adaptive feature fusion ASFF module and the MPDIoU loss function, and obtaining the improved YOLOv8 network model; Specifically, this embodiment also includes an attention mechanism module, an operation submodule, an encoding submodule, a linear transformation submodule, an activation function submodule, a local feature extraction submodule, an information capture submodule, and a channel compression submodule, wherein: The attention mechanism module includes two 1×1 parallel branches and one 3×3 branch path. In the 1×1 branch, a one-dimensional global average pooling operation in the horizontal / vertical directions is used to obtain the dependencies between all channels: ; ; In the formula, C represents the number of channels, , represents the dimension of the input feature space, X represents the input feature, Represents the feature vector Medium Category The characteristic value of Indicates category In the feature vector No. elements, and represents the column index of the feature vector, Represents the feature vector Medium Category The characteristic value of Indicates category In the feature vector No. elements; The operator module is used to fit the binomial distribution after linear convolution through two Sigmoid nonlinear functions, and then realize the aggregation of the channel attention map within each group through multiplication operation; The encoding submodule is used to normalize the output of a 1×1 branch using a two-dimensional global average pooling group to encode the global spatial information, and in another branch, a 3×3 convolution is used to obtain local cross-channel interaction features to expand the feature space and convert the output into the corresponding dimensional shape; The linear transformation submodule is used to complete the linear transformation fitting through the Softmax nonlinear function, connect the outputs of the two branches, and then multiply the connected results through matrix multiplication to obtain the spatial attention map and the spatial position information attention map; The activation function submodule is used to obtain an independent spatial selection mask for each large kernel using the Sigmoid activation function on the spatial attention map and the spatial position information attention map, weight the mask with the corresponding feature map row, capture the pixel-level pairwise relationship and the global context of all pixels, and obtain the attention feature through convolutional layer fusion.
[0044] The local feature extraction submodule is used in the C2f_CGblock module to process the input image through 1×1 convolution, and then enter the parallel branch processing of local feature extraction and surrounding context feature extraction. The local feature extraction learns the local features in the input image through convolution, and the surrounding context feature extraction uses dilated convolution to expand the receptive field around the local features. After branch processing, the features extracted by different branches are input into the joint feature extractor, and the feature maps of different scales are spliced in the channel dimension. The spliced feature maps are input into the global context extractor after batch normalization and parameterized linear units. The feature information of the whole image is extracted in the global context extractor through global average pooling, and then the effective representation of the global context is refined through two fully connected layers; The information capture submodule is used to input multiple feature maps through different paths in the PAN structure of the neck network, capture spatial information by using multiple 1×1 and 3×3 convolution blocks, and repeat feature learning multiple times using 3×3 convolution blocks and 3×3 convolution blocks to enhance the expressiveness of features, and finally integrate and output them through CSPNet connection; Channel compression submodule for adaptive feature fusion. After the ASFF module performs channel fusion through three 1×1 convolution kernels, it uses a 1×1 convolution kernel to compress the channel to 3. Each channel corresponds to a feature level, and the weight is calculated through the Softmax operation. Then, the feature maps of the three levels are weighted fused, and finally a 3×3 convolution kernel is used to adjust the size of the feature map and output the fused features.
[0045] The feature extraction module 404 is used to input the preprocessed support image into the improved YOLOv8 network, perform feature extraction on the preprocessed support image through the improved YOLOv8 network to characterize the structural features and disease features of the bridge support, and output a target feature image; Specifically, the present embodiment also includes setting the number of iterations of the improved YOLOv8 network to 150 times, inputting the image data into the improved YOLOv8 network, and outputting the target feature image after iteration.
[0046] The disease recognition module 405 is used to input the target feature image into a disease recognition model, classify and recognize the diseases of the bridge bearings in the target feature image through the disease recognition model, and output the disease recognition result, wherein the disease recognition model is constructed based on the sparrow search algorithm to optimize the support vector machine; Specifically, the harm identification module in this embodiment includes a mapping submodule, a first updating submodule, a second updating submodule, a third updating submodule and a judging submodule, wherein: The mapping submodule is used to initialize the population using the Sine chaotic mapping strategy, calculate the initial fitness value through cross-checking, and obtain the global optimal fitness value and the global optimal population based on the initial fitness value; The first update submodule is used to introduce dynamic adaptive weights and update the location information according to the position of the discoverer during each iteration: ; ; In the formula, represents the global optimal solution of the jth dimension in the previous generation, represents the maximum number of iterations, represents the position of the i-th sparrow in the j-th (j∈[1,d]) dimension in the t-th iteration, represents random numbers that conform to the standard normal distribution, ( ∈[0,1]) and (ST∈[0.5,1]) represents the alarm value and safety threshold, ST∈[0.5,1], ∈[0,1], Indicates the current iteration number, Inertia weight, represents the random disturbance term, Indicates the updated position; The second update submodule is used to take the remaining sparrows as joiners and update their positions using the Levy flight strategy: ; In the formula, Indicates the position of the individual with the worst fitness value. Indicates the position of the individual with the best fitness value. represents the population size, represents the position of the i-th sparrow in the j-th dimension in the t-th iteration, Indicates the offset distance of the flight strategy. represents the number of remaining sparrows, Indicates the position of the remaining sparrows at time t+1; The third update submodule is used to update the fitness value to obtain a better global optimal value: ; In the formula, represents the current global optimal position, θ represents the step size control parameter, K represents a random number and K∈[-1,1], Indicates the fitness value of the current sparrow individual, and Respectively represent the current global best and worst fitness values, ε represents the smallest constant, The position of the individual with the worst fitness value, Indicates the current iteration number; The judgment submodule is used to judge whether the maximum number of iterations has been reached. If not, the iteration continues. If reached, the iteration is stopped and the optimal parameters are output and assigned to the support vector machine to construct a disease recognition model, where the optimal parameters at least include the kernel function parameters and penalty factors of the support vector machine.
[0047] Specifically, this embodiment also includes an input submodule and a classification submodule, wherein: The input submodule is used to convert the target feature image into a vector in a high-dimensional feature space through the PCA algorithm, and use the converted feature vector as the input of the disease recognition model. The radial basis kernel function is used as the kernel function of the disease recognition model for classification: ; In the formula, represents the Lagrange multiplier and ∈(0, b), b represents the penalty factor, Indicates the classification category, represents the threshold value, represents the support vector machine kernel function, represents the signature function, Indicates the sequence number of the sample point, Indicates the total number of sample points; The classification submodule is used to identify different disease categories for each input feature vector through the disease recognition model, obtain classification decisions, assign disease category labels to the target feature images, and output disease recognition results, where the disease recognition results at least include abnormal hanging height, shear deformation, uneven rubber bulging, abnormal crack width, abnormal transverse bridge angle, abnormal longitudinal bridge angle, and rubber sheet eversion.
[0048] The disease warning module 406 is used to determine the severity of the disease of the bridge bearing based on the disease identification result. When the disease reaches the warning threshold, a warning signal is issued in time and a corresponding warning strategy is formulated, wherein the warning threshold is set according to the disease type in the disease identification result.
[0049] Specifically, in this embodiment, when the disease reaches the warning threshold, a warning signal is sent to the system. The warning threshold includes at least the abnormal hanging height exceeding 3mm (when the angle of the gap formed by the plate rubber bearing on the bottom surface of the bridge and the side of the supporting pad stone is too large, it will be firmly lifted up, causing partial emptying), shear deformation greater than 16° (the bearing size, shape, material, etc. do not meet the requirements), uneven bulging of rubber, crack width greater than 2mm and length reaching 51% of the corresponding side length (due to long-term exposure to vehicle loads and environmental weathering, the rubber plate has aged, hardened, deformed, etc., and the rubber has lost a certain degree of elasticity and bearing capacity), and the transverse angle of the bridge is greater than (The combined effect of various factors such as the superposition of various load effects on the upper part of the bridge, aging of the bearings and unsatisfactory geological conditions), the basin bearing of the bridge has a longitudinal bridge angle greater than , the rubber sheet is everted (improper selection of rubber sheet materials, unreasonable design of pot-type bearings, and poor construction and installation quality, which lead to aging, deterioration, uneven force and other problems of the rubber sheet during use).
[0050] Once the damage identification results show that the damage level of some bearings has reached the preset warning threshold, the bridge management system will immediately trigger the warning mechanism and notify the relevant departments and responsible persons through electronic communication means such as SMS, email or directly displaying the alarm information on the monitoring platform. At the same time, the system will automatically start the corresponding emergency plan according to the warning level, including but not limited to strengthening the monitoring frequency, arranging on-site review, formulating temporary reinforcement measures or directly starting the maintenance and replacement procedures.
[0051] In addition, the early warning strategy also includes temporary adjustments to traffic flow to reduce the load pressure on the affected bearings, as well as issuing necessary safety tips to the public to ensure the safety of people and vehicles. Through this proactive prevention and rapid response mechanism, the efficiency and effectiveness of bridge safety management can be significantly improved, the service life of the bridge can be effectively extended, and public safety can be guaranteed.
[0052] By installing multiple high-definition image sensors around the bridge bearings between the bridge deck and the piers, the high-definition image sensors are used to collect real-time images of the bridge bearings to obtain the initial bearing images; the collected initial bearing images are preprocessed by smoothing, gamma correction and histogram equalization to obtain the preprocessed bearing images; an improved YOLOv8 network model is constructed by adding an attention mechanism module at the end of the backbone network of the YOLOv8 network model and converting the CG The block is fused with the C2f module to obtain the C2f_CGblock module, the neck network of the YOLOv8 network model is reconstructed, the adaptive feature fusion ASFF module and the MPDIoU loss function are introduced to obtain the improved YOLOv8 network model; the preprocessed bearing image is input into the improved YOLOv8 network, and the feature of the preprocessed bearing image is extracted through the improved YOLOv8 network to characterize the structural characteristics and disease characteristics of the bridge bearing, and the target feature image is output; the target feature image is input into the disease recognition model, and the disease of the bridge bearing in the target feature image is classified and identified through the disease recognition model, and the disease recognition result is output, wherein the disease recognition model is constructed based on the sparrow search algorithm to optimize the support vector machine; based on the disease recognition result, the severity of the disease of the bridge bearing is determined, and when the disease reaches the warning threshold, a warning signal is issued in time, and a corresponding warning strategy is formulated, wherein the warning threshold is set according to the disease type in the disease recognition result. The system realizes 24-hour uninterrupted monitoring of the bridge bearing, can capture the changes in the bearing state with high precision, and ensure the real-time and accuracy of the data. The quality of the initial bearing images collected has been effectively improved. Image noise has been removed, and image contrast has been enhanced, making image information clearer and easier to analyze, which has improved the accuracy and efficiency of subsequent defect identification. The model's ability to extract structural characteristics and defect characteristics of bridge bearings has been improved. The accuracy of defect identification has been improved, and the identification speed has been accelerated, so that the system can respond quickly to changes in bearing status. The subjectivity and errors of human judgment have been avoided, and the accuracy and reliability of defect identification have been improved. According to the defect identification results, the system can automatically determine the severity of the disease of the bridge bearing and issue a warning signal in time when the disease reaches the preset warning threshold. At the same time, the system can also formulate corresponding warning strategies according to the type of disease, providing scientific decision-making basis for bridge management departments. It not only helps to timely discover and deal with potential safety hazards, but also effectively prolongs the service life of the bridge and reduces maintenance costs.
[0053] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited by the above embodiments. The above embodiments and descriptions are only preferred examples of the present invention and are not intended to limit the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention. The scope of protection of the present invention is defined by the attached claims and their equivalents.
Claims
1. A bridge safety monitoring and early warning method based on image recognition, characterized in that: The bridge safety monitoring and early warning method based on image recognition comprises the following steps: Install multiple high-definition image sensors around the bridge bearings between the bridge deck and the bridge piers, and use the high-definition image sensors to collect real-time images of the bridge bearings to obtain initial bearing images; Performing image preprocessing on the collected initial support image, completing the image preprocessing by smoothing, gamma correction and histogram equalization to obtain a preprocessed support image; Build an improved YOLOv8 network model by adding an attention mechanism module to the end of the backbone network of the YOLOv8 network model, and fusing the CG block with the C2f module to obtain the C2f_CGblock module. Reconstruct the neck network of the YOLOv8 network model, introduce the adaptive feature fusion ASFF module and the MPDIoU loss function, and obtain the improved YOLOv8 network model. The preprocessed support image is input into the improved YOLOv8 network, and the feature extraction of the preprocessed support image is performed through the improved YOLOv8 network to characterize the structural characteristics and disease characteristics of the bridge support, and the target feature image is output; Inputting the target feature image into a disease recognition model, classifying and identifying the diseases of the bridge bearings in the target feature image through the disease recognition model, and outputting a disease recognition result, wherein the disease recognition model is constructed based on a support vector machine optimized by a sparrow search algorithm; The severity of the disease of the bridge bearing is determined based on the disease identification result. When the disease reaches a warning threshold, a warning signal is issued in time and a corresponding warning strategy is formulated, wherein the warning threshold is set according to the disease type in the disease identification result.
2. A bridge safety monitoring and early warning method based on image recognition as claimed in claim 1, characterized in that: The image preprocessing operation is performed on the collected initial support image, and the image preprocessing operation is completed by smoothing, gamma correction and histogram equalization to obtain a preprocessed support image, including: The initial support image is converted from the RGB space to the HSV space, and the converted initial support image is smoothed: ; In the formula, represents the trade-off parameter between the control fidelity term and the gradient term, represents the weight matrix, which is used to distinguish edge structure and texture. represents the horizontal and vertical difference operators, and are the 1-norm and 2-norm respectively, is the matrix representation of the initial support image in RGB space, Represents the new image matrix obtained after conversion to HSV Mus space, M represents the result of applying a smoothing filter to M; The gamma correction function is used to correct the global illumination component of the initial support image after smoothing: ; ; ; In the formula, E represents the pixel value after Gamma correction, L represents the pixel value of the initial support image after smoothing, It represents the elevation ratio of the straight line passing through the origin and tangent to the curve. represents the horizontal coordinate of the tangent point, Indicates the exponential value of brightness adjustment; The contrast of the initial support image after Gamma correction is equalized by histogram equalization to obtain the preprocessed support image.
3. A bridge safety monitoring and early warning method based on image recognition as claimed in claim 2, characterized in that: The step of using histogram equalization to adjust the contrast of the initial support image after the gamma correction process includes: Obtain the initial support image after Gamma correction, and calculate the mean and standard deviation of the histogram of the corresponding illumination image; Set the lower threshold based on the mean and standard deviation of the histogram and upper threshold : ; In the formula, represents the histogram mean, represents the histogram standard deviation; The histogram frequencies that are less than the lower threshold and greater than the upper threshold in the histogram are weighted to obtain a weighted histogram: ; ; In the formula, Represents a weighted histogram, K represents the number of gray levels of the image, represents the weighting coefficient, represents the histogram frequency; The weighted histogram is normalized and equalized in turn, and the processed illumination image is gray-scale mapped; The grayscale-mapped illumination image and the reflected image of the initial support image after Gamma correction are equivalently transformed to obtain an enhanced brightness component, which is then converted into RGB space to obtain a preprocessed support image.
4. The bridge safety monitoring and early warning method based on image recognition according to claim 1, characterized in that: The attention mechanism module is added at the end of the backbone network of the YOLOv8 network model, including: The attention mechanism module includes two 1×1 parallel branches and one 3×3 branch path. In the 1×1 branch, a one-dimensional global average pooling operation in the horizontal / vertical directions is used to obtain the dependencies between all channels: ; ; In the formula, C represents the number of channels, , represents the dimension of the input feature space, X represents the input feature, Represents the feature vector Medium Category The characteristic value of Indicates category In the feature vector No. elements, and represents the column index of the eigenvector, Represents the feature vector Medium Category The characteristic value of Indicates category In the feature vector No. elements; The binomial distribution after linear convolution is fitted by two Sigmoid nonlinear functions, and then the aggregation of the channel attention map within each group is realized through multiplication operation; The output of one 1×1 branch is normalized using a 2D global average pooling group to encode the global spatial information. In another branch, a 3×3 convolution is used to obtain local cross-channel interaction features to expand the feature space and convert the output into the corresponding dimensional shape. The linear transformation is fitted through the Softmax nonlinear function, and the outputs of the two branches are connected, and then the connected results are multiplied by matrix multiplication to obtain the spatial attention map and the spatial position information attention map; The sigmoid activation function is used on the spatial attention map and the spatial position information attention map to obtain an independent spatial selection mask for each large kernel. The mask is weighted with the corresponding feature map row to capture the pixel-level pairwise relationship and the global context of all pixels, and the attention feature is obtained by fusing them through the convolutional layer.
5. The bridge safety monitoring and early warning method based on image recognition according to claim 1, characterized in that: The CG block is fused with the C2f module to obtain the C2f_CGblock module, the neck network of the YOLOv8 network model is reconstructed, and the adaptive feature fusion ASFF module and the MPDIoU loss function are introduced, including: After the C2f_CGblock module performs 1×1 convolution on the input image, it enters the parallel branch processing of local feature extraction and surrounding context feature extraction. The local feature extraction learns the local features in the input image through convolution, and the surrounding context feature extraction uses dilated convolution to expand the receptive field around the local features. After branch processing, the features extracted by different branches are input into the joint feature extractor, and the feature maps of different scales are spliced in the channel dimension. The spliced feature maps are input into the global context extractor after batch normalization and parameterized linear units. The feature information of the whole image is extracted in the global context extractor through global average pooling, and then the effective representation of the global context is refined through two fully connected layers; In the PAN structure of the neck network, multiple feature maps are input through different paths, and spatial information is captured by using multiple 1×1 and 3×3 convolution blocks. The feature learning is repeated multiple times using 3×3 convolution blocks and 3×3 convolution blocks to enhance the expression ability of the features. Finally, the output is integrated through CSPNet connection. The adaptive feature fusion ASFF module performs channel fusion through three 1×1 convolution kernels, and then uses a 1×1 convolution kernel to compress the channels to 3. Each channel corresponds to a feature level, and the weight is calculated through the Softmax operation. Then, the feature maps of the three levels are weighted fused, and finally a 3×3 convolution kernel is used to adjust the size of the feature map and output the fused features.
6. The bridge safety monitoring and early warning method based on image recognition according to claim 1, characterized in that: The process of constructing the disease recognition model based on the sparrow search algorithm to optimize the support vector machine includes: Initializing the population using the Sine chaotic mapping strategy, calculating the initial fitness value through cross-checking, and obtaining the global optimal fitness value and the global optimal population based on the initial fitness value; Dynamic adaptive weights are introduced to update the position information according to the position of the discoverer during each iteration: ; ; In the formula, represents the global optimal solution of the jth dimension in the previous generation, represents the maximum number of iterations, represents the position of the i-th sparrow in the j-th (j∈[1,d]) dimension in the t-th iteration, represents random numbers that conform to the standard normal distribution, and Represents the alarm value and safety threshold, ST∈[0.5,1], ∈[0,1], Indicates the current iteration number, Inertia weight, represents the random disturbance term, Indicates the updated position; The remaining sparrows are treated as joiners and the Levy flight strategy is used to update the position: ; In the formula, Indicates the position of the individual with the worst fitness value. Indicates the position of the individual with the best fitness value. represents the population size, represents the position of the i-th sparrow in the j-th dimension in the t-th iteration, Indicates the offset distance of the flight strategy. represents the number of remaining sparrows, Indicates the position of the remaining sparrows at time t+1; Update the fitness value to get a better global optimal value: ; In the formula, represents the current global optimal position, θ represents the step size control parameter, K represents a random number and K∈[-1,1], Indicates the fitness value of the current sparrow individual, and Respectively represent the current global best and worst fitness values, ε represents the smallest constant, The position of the individual with the worst fitness value, Indicates the current iteration number; Determine whether the maximum number of iterations has been reached. If not, continue to iterate. If reached, stop iterating and output the optimal parameters to assign to the support vector machine to construct a disease recognition model. The optimal parameters at least include the kernel function parameters and penalty factors of the support vector machine.
7. The bridge safety monitoring and early warning method based on image recognition as claimed in claim 1, characterized in that: Inputting the target feature image into a defect recognition model, classifying and identifying the defects of the bridge bearings in the target feature image through the defect recognition model, and outputting a defect recognition result, including: The target feature image is converted into a vector in a high-dimensional feature space by the PCA algorithm, the converted feature vector is used as the input of the disease recognition model, and the radial basis kernel function is used as the kernel function of the disease recognition model for classification: ; In the formula, represents the Lagrange multiplier and ∈(0, b), b represents the penalty factor, Indicates the classification category, represents the threshold value, represents the support vector machine kernel function, Represents a signature function, Indicates the sequence number of the sample point, Indicates the total number of sample points; For each input feature vector, different defect categories are identified through the defect recognition model to obtain a classification decision, and a defect category label is assigned to the target feature image to output a defect recognition result, wherein the defect recognition result at least includes abnormal hanging height, shear deformation, uneven bulging of rubber, abnormal crack width, abnormal transverse bridge angle, abnormal longitudinal bridge angle, and eversion of the rubber sheet.
8. A bridge safety monitoring and early warning system based on image recognition, characterized in that: The bridge safety monitoring and early warning system based on image recognition includes an image acquisition module, an image preprocessing module, a model building module, a feature extraction module, a disease recognition module and a disease early warning module, wherein: An image acquisition module is used to install multiple high-definition image sensors around the bridge bearings between the bridge deck and the bridge piers, and to acquire real-time images of the bridge bearings through the high-definition image sensors to obtain initial bearing images; An image preprocessing module, used to perform image preprocessing operation on the collected initial support image, complete the image preprocessing operation through smoothing, Gamma correction and histogram equalization processing, and obtain a preprocessed support image; The model building module is used to build an improved YOLOv8 network model. By adding an attention mechanism module to the end of the backbone network of the YOLOv8 network model and fusing the CG block with the C2f module to obtain the C2f_CGblock module, the neck network of the YOLOv8 network model is reconstructed, and the adaptive feature fusion ASFF module and MPDIoU loss function are introduced to obtain the improved YOLOv8 network model. A feature extraction module is used to input the preprocessed support image into the improved YOLOv8 network, perform feature extraction on the preprocessed support image through the improved YOLOv8 network to characterize the structural characteristics and disease characteristics of the bridge support, and output a target feature image; A disease recognition module is used to input the target feature image into a disease recognition model, classify and recognize the diseases of the bridge bearings in the target feature image through the disease recognition model, and output a disease recognition result, wherein the disease recognition model is constructed based on a support vector machine optimized by a sparrow search algorithm; The disease warning module is used to determine the severity of the disease of the bridge bearing based on the disease identification result. When the disease reaches the warning threshold, a warning signal is issued in time and a corresponding warning strategy is formulated, wherein the warning threshold is set according to the disease type in the disease identification result.
9. A bridge safety monitoring and early warning system based on image recognition as claimed in claim 8, characterized in that: The image preprocessing module includes a smoothing processing submodule, a gamma correction submodule and a histogram equalization submodule, wherein: The smoothing submodule is used to convert the initial support image from the RGB space to the HSV space, and perform smoothing on the converted initial support image: ; In the formula, represents the trade-off parameter between the control fidelity term and the gradient term, represents the weight matrix, which is used to distinguish edge structure and texture. represents the horizontal and vertical difference operators, and are the 1-norm and 2-norm respectively, is the matrix representation of the initial support image in RGB space, Represents the new image matrix obtained after conversion to HSV Mus space, M represents the result of applying a smoothing filter to M; The Gamma correction submodule is used to correct the global illumination component of the initial support image after smoothing using the Gamma correction function: ; ; ; In the formula, E represents the pixel value after Gamma correction, L represents the pixel value of the initial support image after smoothing, It represents the elevation ratio of the straight line passing through the origin and tangent to the curve. represents the horizontal coordinate of the tangent point, Indicates the exponential value of brightness adjustment; The histogram equalization submodule is used to use histogram equalization to equalize the contrast of the initial support image after the gamma correction processing to obtain a preprocessed support image.
10. The bridge safety monitoring and early warning system based on image recognition as claimed in claim 8, characterized in that: The disease identification module includes a mapping submodule, a first updating submodule, a second updating submodule, a third updating submodule and a judging submodule, wherein: A mapping submodule is used to initialize the population using a Sine chaotic mapping strategy, calculate an initial fitness value through cross-checking, and obtain a global optimal fitness value and a global optimal population based on the initial fitness value; The first update submodule is used to introduce dynamic adaptive weights and update the location information according to the position of the discoverer during each iteration: ; ; In the formula, represents the global optimal solution of the jth dimension in the previous generation, represents the maximum number of iterations, represents the position of the i-th sparrow in the j-th (j∈[1,d]) dimension in the t-th iteration, represents random numbers that conform to the standard normal distribution, ( ∈[0,1]) and (ST∈[0.5,1]) represents the alarm value and safety threshold, ST∈[0.5,1], ∈[0,1], Indicates the current iteration number, Inertia weight, represents the random disturbance term, Indicates the updated position; The second update submodule is used to take the remaining sparrows as joiners and update their positions using the Levy flight strategy: ; In the formula, Indicates the position of the individual with the worst fitness value. Indicates the position of the individual with the best fitness value. represents the population size, represents the position of the i-th sparrow in the j-th dimension in the t-th iteration, Indicates the offset distance of the flight strategy. represents the number of remaining sparrows, Indicates the position of the remaining sparrows at time t+1; The third update submodule is used to update the fitness value to obtain a better global optimal value: ; In the formula, represents the current global optimal position, θ represents the step size control parameter, K represents a random number and K∈[-1,1], Indicates the fitness value of the current sparrow individual, and Respectively represent the current global best and worst fitness values, ε represents the smallest constant, The position of the individual with the worst fitness value, Indicates the current iteration number; The judgment submodule is used to judge whether the maximum number of iterations has been reached. If not, the iteration continues. If reached, the iteration is stopped and the optimal parameters are output and assigned to the support vector machine to construct a disease recognition model, where the optimal parameters at least include the kernel function parameters and penalty factors of the support vector machine.
Citation Information
Patent Citations
Multi-threshold-value LBP face recognition method based on Gabor wavelet
CN105809129A
Bayesian Retinex deep sea image enhancement method based on multi-constraint prior
CN115393209A
Bridge disease detection system and method based on improved Yolov8s model
CN117994655A
Low-illumination target detection method based on YOLOv8 improvement and loading and operation device
CN118115841A
Lightweight weed detection method and device
CN118230156A
Cited By
Enhanced YOLO-based health status early warning method for artificially cultivated shellfish larvae
CN120375412A
Slurry pump operation state recognition method and system based on image recognition
CN120747648A
