A bridge crack detection method based on a two-stage deep learning strategy
Through a two-stage deep learning strategy, DBCC-Net and YOLOx are used for rough positioning of bridge crack locations and classification network post-processing, and then DDRNet is used for pixel-level segmentation, which solves the problem of information incompatibility and reduced accuracy in bridge crack detection, and achieves Efficient and accurate bridge crack detection.
Patent Information
- Application Number
- CN202210214466.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-04
- Publication Date
- 2024-09-20
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing technology has problems in bridge crack detection, such as information incompatibility, poor robustness, and frequent missed detections and false detections. It is especially difficult to achieve efficient and accurate detection in high-resolution images and complex environments.
A two-stage deep learning strategy is adopted. First, DBCC-Net and YOLOx are used for rough location and filtering of crack locations, and then combined with classification network post-processing and DDRNet for pixel-level segmentation to achieve high-efficiency and high-precision crack detection.
It effectively solves the problem of position sensitivity of the target detection network and decreased accuracy of the semantic segmentation network, achieves fast and accurate detection of high-resolution bridge cracks, and improves the robustness and accuracy of detection.
Smart Images

Figure CN114674827B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of bridge crack detection, and in particular relates to a bridge crack detection method based on a two-stage deep learning strategy. Background Art
[0002] Bridge cracks are a serious bridge disease, and high-coverage and efficient detection has become an indispensable key link in the development of bridge engineering.
[0003] At present, a variety of bridge inspection robots are used in the detection methods of bridge cracks to detect bridge defects. The images collected by bridge inspection robots are used for crack detection, and the image collection volume is large. Therefore, crack detection algorithms based on image processing are of great significance. Traditional image processing methods usually process crack images through thresholds, edges, regions, etc. to achieve crack target extraction or extract crack targets by manually setting features. The target detection method is to manually extract shallow or middle-layer morphological features of the image. For cracks with good continuity and contrast, cracks can be detected with high precision. However, in actual applications, bridge concrete block drop, shadows, stains and other noises make this method based on feature assumptions not robust in complex environments.
[0004] With the deepening of machine learning research, image-based crack detection under complex conditions has become a reality. For example, by building an image database, unsupervised crack extraction can be achieved; another example is to cut the image into small blocks, design a descriptor based on the Haar-like feature extractor to describe the crack features, and score the small blocks through multiple descriptors based on Adaboost to distinguish crack blocks from background blocks. However, these methods rely heavily on the extracted features, so they only have good performance in specific environments. However, due to the complex environment in which cracks are located, it is difficult to find effective features that are applicable to various environments.
[0005] In recent years, the development of deep learning has enabled image processing tasks to fully extract deep semantic features of images, with higher accuracy and stronger anti-interference ability, making image-based crack detection in complex environments a reality. Therefore, it has become the mainstream method in most current image processing tasks, such as using classification networks to identify crack images, using target detection networks to identify crack images, and using semantic segmentation networks to identify crack images. However, they all have the following defects:
[0006] 1. Using classification network to identify cracks: images are cut into patches according to a certain size, each patch is sent to the network for classification, and then the results are spliced. This approach has the following limitations:
[0007] (1) Patches do not communicate with each other, and the receptive field is extremely small, making it impossible to train a robust network;
[0008] (2) With the development of digital imaging technology, the resolution of currently acquired images is greater than 2000×2000, and its applicability in practical problems remains to be verified.
[0009] 2. Using target detection network to identify crack images has the following limitations:
[0010] (1) CNN networks are translation invariant, but target detection requires the network to be sensitive to location information. The coexistence of robustness and sensitivity results in the detection network being unable to accurately locate the image.
[0011] (2) Traditional target detection is usually used in face detection, vehicle positioning, pedestrian counting, etc. In the application scenario of crack detection, the demand for Recall value is higher than the Precision value. It is necessary to find a way to reasonably trade-off between Precision and Recall.
[0012] 3. Using semantic segmentation network to identify crack images has the following limitations:
[0013] (1) The network requires pixel-level image labels for training, and the irregular distribution of cracks makes pixel labeling difficult;
[0014] (2) Compared with traditional semantic segmentation target scenes, crack image scenes have environmental uniformity, irregular crack distribution and noise uncertainty, so missed detection and false detection are often unpredictable, which makes the design of post-processing steps difficult.
[0015] Therefore, a single-structure deep learning network is difficult to meet the needs of complex business scenarios. Summary of the invention
[0016] In view of the deficiencies pointed out in the above background technology, the present invention provides a bridge crack detection method based on a two-stage deep learning strategy, aiming to solve the problems existing in the prior art in the above background technology.
[0017] To achieve the above object, the technical solution adopted by the present invention is:
[0018] A bridge crack detection method based on a two-stage deep learning strategy, the steps are as follows:
[0019] (1) Collect high-resolution bridge crack images and input them into the trained DBCC-Net (Deep Bridge Crack Detection Network). Use YOLOx as the backbone of the network to extract crack feature information. To avoid missed cracks caused by the anchor regression process, prune the head of the YOLOx model to complete the rough positioning of the crack position and filter out the image part containing the crack. There is no need to set anchors or regress the anchors. Only the final prediction layer processed by the fusion block in the prediction is used to determine whether there is a crack in the area corresponding to each point of the feature layer in the original image.
[0020] (2) Classification network post-processing
[0021] During the forward reasoning process, after the crack is classified by DBCC-Net, the patch type corresponding to each point on the feature map in the original image is classified. The crack patch is very close to the actual crack area, but there are still missed detections and false detections. Therefore, the classification network post-processing is performed:
[0022] ① Model modification
[0023] The prediction results obtained by sigmoid processing in the Prediction part of DBCC-Net are mapped into a matrix, and the false detection and missed detection parts in the matrix are corrected to obtain a correction matrix h′;
[0024] ② Slice clustering
[0025] Using the correction matrix, the image portion filtered out in step (1) is sliced and clustered to obtain a complete slice image of the crack;
[0026] (3) DDRNet is used to perform pixel-level segmentation on the slice image and extract the complete morphology of the crack.
[0027] Through the two-stage detection strategy combining the above classification network with the segmentation network, high-efficiency and high-precision crack detection can be achieved, which has high practical value.
[0028] Preferably, in step (2), the specific method of model correction is as follows:
[0029] a. In the mapped matrix, the matrix value of the crack part is set to 1, and the matrix value of the background part is set to 0. For each point with a matrix value of 1, the number of points with a matrix value of 1 in its eight neighborhoods is counted. The points with a matrix value of 1 are called endpoints, and the matrix points with a value greater than or equal to 2 are called midpoints.
[0030] b. Calculate the minimum Euclidean distance between endpoints, set the false detection threshold β, delete isolated points whose distance to other parts is less than β, set the matrix value of the corresponding position from 1 to 0, and obtain the correction matrix of the false detection part;
[0031] c. Calculate the minimum Euclidean distance between endpoints and set the missed detection threshold α. When the distance is less than the threshold α, the two endpoints are considered to be in a breakpoint relationship, and there is a missed crack surface element between the two points. Determine the missed crack surface element and set the matrix value of the corresponding position to 1 to obtain the correction matrix of the missed part.
[0032] Preferably, the method for finding the missed crack surface element is:
[0033] Calculate the horizontal and vertical coordinate differences ΔX and ΔY between the two breakpoints. If ΔX>ΔY, connect them with the x-axis as the main axis. If ΔX≤ΔY, connect them with the y-axis as the main axis. Perform breakpoint iterations until the two points coincide, and the missed crack surface element is found.
[0034] Preferably, in step (2), the specific method of slice clustering is as follows:
[0035] Cluster the connected points in the correction matrix into point sets and determine the minimum horizontal coordinate x of the point set min , the minimum ordinate y min , the maximum horizontal coordinate x max , the maximum ordinate y max , with (x min, y min )、(x max ,y max ) are used as the upper left corner vertex and the lower right corner vertex of the bounding box of the crack part, and the part of the bounding box corresponding to the original image is used as the complete slice image of the crack.
[0036] Compared with the shortcomings and deficiencies of the prior art, the present invention has the following beneficial effects:
[0037] The present invention provides a bridge crack detection method based on a two-stage deep learning strategy, which is used for pixel-level rapid detection of high-resolution bridge crack images. In the first stage: the model roughly locates the crack position through a classification network, and then obtains a complete slice of the crack through model post-processing; by pruning YOLOx, the regression problem of target detection is converted into a binary classification problem to avoid the reduction of network performance caused by the translation invariance of the convolutional neural network; at the same time, in order to improve the performance of the model, a global perception module is embedded in DBCC-Net to avoid the problem that traditional methods slice images and cause information not to be shared between slices. In the second stage: the sliced image is sent to DDRNet, which has the best segmentation performance at present, to achieve fast and high-precision crack segmentation. On the one hand, the present invention solves the problem that the target detection network can only detect the crack position but cannot extract the crack morphological features, and on the other hand, it solves the defects of reduced accuracy and long inference time when the semantic segmentation network is applied to high-resolution images. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 It is a schematic diagram of the DBCC-Net structure provided by an embodiment of the present invention.
[0039] Figure 2 It is a training loss graph for selecting different output layers provided by an embodiment of the present invention.
[0040] Figure 3 It is a classification network post-processing diagram provided by an embodiment of the present invention.
[0041] Figure 4 It is a schematic diagram of finding missed crack surface elements provided by an embodiment of the present invention.
[0042] Figure 5 It is a schematic diagram of bridge crack detection based on a two-stage deep learning strategy provided by an embodiment of the present invention.
[0043] Figure 6 It is a comparison diagram of ROC curves of different classification networks provided by an embodiment of the present invention.
[0044] Figure 7 It is a comparison diagram of PR curves of different target detection networks provided by an embodiment of the present invention.
[0045] Figure 8 It is a comparison chart of different semantic segmentation methods provided by embodiments of the present invention on the embodiment data set.
[0046] Fig. 9 This is a performance comparison chart of the detection method of the present invention provided by an embodiment of the present invention and other crack detection methods based on deep learning. DETAILED DESCRIPTION
[0047] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0048] 1. A bridge crack detection method based on a two-stage deep learning strategy
[0049] Phase 1:
[0050] 1.1 Rough location of bridge cracks
[0051] Collect high-resolution bridge crack images and input them into the trained DBCC-Net. The DBCC-Net structure is as follows: Figure 1 As shown in the figure, YOLOx is used as the backbone of the network to extract crack feature information. According to the subnetwork types and corresponding performance evaluation indicators given by YOLOx, YOLOx-s is selected as a compromise between detection accuracy and speed. In order to avoid missed cracks caused by the regression process of the anchor, the head of the YOLOx model is pruned. The model channel is reduced from 85 (including 80 categories, 4 position regression parameters, and 1 object judgment parameter) to 1. Neither the anchor is set nor the anchor needs to be regressed. Only the final prediction layer after the fusion block in the prediction of DBCC-Net is used to judge whether there is a crack in the area corresponding to each point in the feature layer in the original image. Such a network design converts the regression problem into a classification problem for each point on the feature map, greatly compressing the solution space of the network and avoiding the conflict between the robustness of the convolutional neural network and the position sensitivity of the target detection network.
[0052] The multi-scale output design enables the network to correct training parameters from different feature spaces and enhance the network scale robustness. The loss of the network trained at different scales is as follows: Figure 2 It can be seen that when multi-scale training is used simultaneously, the network converges fastest, and the average loss value at each scale is less than 0.015, and the training effect is the best.
[0053] 1.2 Classification Network Post-Processing
[0054] During the forward reasoning process, after the crack is classified by the DBCC-Net network, each point on the feature map is classified into the patch type corresponding to the original image. The crack patch is very close to the actual crack area, but there are still missed detections and false detections. In order to more accurately locate the missed crack patch, isolate the falsely detected background patch, and completely detect the crack part, the classification network post-processing method is as follows: Figure 3 As shown, it is divided into the following 2 steps.
[0055] Step 1: Model modification
[0056] (1) Figure 1 The prediction results obtained by sigmoid processing in the Prediction part are mapped to the matrix h, in which the matrix value of the crack part is set to 1, and the matrix value of the background part is set to 0. For each point with a matrix value of 1, the number of points with a matrix value of 1 in its eight neighborhoods is counted. The points with a matrix value of 1 are called endpoints, and the matrix points greater than or equal to 2 are called intermediate points.
[0057] (2) Calculate the minimum Euclidean distance between endpoints. The false positive part may be adjacent to the crack part (true positive). If the false positive part is not discarded first, the final correction matrix h′ may be a mixture of the crack part and the non-crack part. Set the false detection threshold β, delete the isolated points whose distance to other parts is less than β, set the matrix value of the corresponding position from 1 to 0, and obtain the correction matrix of the false detection part.
[0058] (3) Calculate the minimum Euclidean distance between endpoints and set a missed detection threshold α. When the distance is less than the threshold α, the two endpoints are considered to be in a breakpoint relationship and there is a missed crack surface element between the two points. The reason for setting the threshold α is to avoid multiple cracks in the same image from being mistakenly connected together. The method for finding the missed crack surface element is as follows: Figure 3 As shown, calculate the horizontal and vertical coordinate differences ΔX and ΔY between the two breakpoints. If ΔX>ΔY, connect them with the x-axis as the main axis. If ΔX≤ΔY, connect them with the y-axis as the main axis. Figure 3 Perform breakpoint iteration until the two points coincide, set the matrix value corresponding to the position of the missed crack surface element found to 1, and obtain the correction matrix of the missed part.
[0059] Step 2: Slice Clustering
[0060] Cluster the connected points in the correction matrix into point sets and determine the minimum horizontal coordinate x of the point set min , the minimum ordinate y min , the maximum horizontal coordinate x max , the maximum ordinate y max , with (x min ,y min )、(x max ,y max ) are used as the upper left corner vertex and the lower right corner vertex of the bounding box of the crack part, and the part of the bounding box corresponding to the original image is used as the complete slice image of the crack.
[0061] Phase 2:
[0062] 1.3 Extracting the complete crack morphology using DDRNet
[0063] DDRNet is used to perform pixel-level segmentation on slice images and extract the complete morphology of cracks.
[0064] It is a time-consuming task to achieve pixel-level detection of high-resolution bridge crack images with a single semantic segmentation network, and the existing network pre-training parameters are usually based on 500×500 low-resolution images, which are not applicable to high-resolution images.
[0065] In order to achieve high efficiency and high precision crack detection and make the proposed method practical, the first stage of the present invention uses DBCC-Net to quickly filter the crack parts contained in the high-resolution image and perform classification network post-processing; the second stage uses DDRNet to perform pixel-level segmentation on the extracted crack image to achieve crack measurement and related damage quantification. Figure 5 shown.
[0066] 2. Experiment
[0067] 2.1 Dataset Construction and Evaluation Metrics
[0068] A total of 385 real bridge images with a resolution of 2560×2560 containing cracks were collected using an I-800 airborne array camera at Zhongshan Bridge in Lanzhou, Gansu Province, and the collected data were annotated at the pixel level as a dataset. The experimental environment is a dual-core Intel(R) Xeon E5-2678 V3 CPU (12 cores and 24 threads), 64GB memory, fourNVIDIAGeForce 3060(12G)GPU, Windows10 operating system, using Python programming and implemented on the Tensorflow-gpu library.
[0069] In the field of image detection, Precision, Recall, F1-score, mAP and mIOU values are generally used as detector performance evaluation indicators. Since the present invention discusses the binary classification problem, mAP = AP, which represents the area under the PR curve of crack patch detection, and mIOU = IOU, which represents the intersection-over-union ratio of the detection result and the ground truth. The evaluation index formula is as follows:
[0070]
[0071]
[0072]
[0073] Where TP represents true positive, i.e., the number of correctly detected crack parts, FP represents false positive, and FN represents false negative.
[0074]
[0075] Among them, interArea is the intersection size of the detection result and the true result, boxAArea is the detection result, and boxBArea is the true result.
[0076] 2.2 Comparison of network performance in the first phase
[0077] To evaluate the performance of the first-stage output of the proposed network, the experiments compare the first-stage model with representative networks in classification and object detection networks.
[0078] (1) Adaboost, CNN, and CrackNet were used as the control group for the classification network. In addition, NFNet, which has achieved SOTA in multiple image classification tasks, was also used. For the convenience of comparison, the output of NFNet was improved, the output of the classification was changed to feature map for prediction, and the ROC curve was generated, as shown in Figure 6 The performance comparison of different classification networks is shown in Table 1:
[0079] Table 1 Performance comparison of different classification networks
[0080]
[0081] Combination Figure 6 As can be seen from Table 1, the Adaboost and CrackNet methods have low robustness, so the ROC curve has oscillation phenomenon, and the comprehensive effect is poor, while the method of the present invention has better accuracy and recall performance. In terms of network volume, CrackNet, CNN and the present invention all have the advantage of lightweight, which makes it easier to deploy the network to mobile devices. In terms of forward reasoning time, the Adaboost method cannot be accelerated on the GPU and can only run on the CPU; the NFNet model has high complexity, resulting in high Flops; although the CNN model is lightweight, it can only predict one patch at a time, and in a high-resolution image of 2560×2560, it requires thousands of inferences. The above methods all have a long reasoning time. The algorithm of the present invention is based on the lightweight network YOLOx-s, and prunes on its basis, reducing the model search space, so it has the fastest reasoning speed.
[0082] (2) The control group with the target detection network uses CrackDN, DE-SSD, YOLOV4-FPM] network, as well as the representative target detection network SSD and Faster-Rcnn. In order to facilitate horizontal comparison based on bounding box, the present invention selects Figure 5 The PR curves of these six methods are as follows Figure 7 As shown, the position with the highest F1 score on each curve is marked. The performance comparison of different target detection networks on the dataset in this article (IOU is calculated only from the True Positive part of the detection) is shown in Table 2:
[0083] Table 2 Performance comparison of different target detection networks
[0084]
[0085] The calculation of IOU in Table 2 is only calculated from the positive samples detected by the detection network that intersect with the groundtruth, combined with Figure 7 As can be seen from the information in Table 2, the common two-stage network in Faster-Rcnn has high accuracy and long inference time, while the one-stage network in SSD has low accuracy and fast inference time. Both methods are designed for multi-classification tasks. The complexity of the assumed solution space when extracting single-category features during training is too high, and the network usually overfits, affecting the detection accuracy. Therefore, CrackDN, YOLOV4-FPM and the present invention all prune on the basis of the original network to increase the speed and avoid overfitting, and have better performance than the baseline. Although the method proposed in this paper is less accurate than CrackDN, it has the highest Recall value, the fastest detection speed and the lightest model compared with other methods, which is more in line with the actual expectations of crack detection.
[0086] 2.3 Comparison of network performance in the second phase
[0087] In the two-stage crack detection strategy of the present invention, the performance of the second stage determines the accuracy of the final pixel-level crack detection. Experiments are conducted on DDRNet and representative semantic segmentation networks SegNet, FCN, U-Net and PSPNet. The performance comparison of the above methods on the experimental dataset is as follows: Figure 8 As shown in the figure, DDRNet shows outstanding speed and excellent performance in crack detection. Compared with other detection frameworks, it has the highest IOU on the dataset, so DDRNet is selected as the pixel-level crack segmentation scheme in the second stage.
[0088] 2.4 Performance comparison between the present invention and other deep learning-based crack detection methods
[0089] The performance comparison between the present invention and other crack detection methods based on deep learning is as follows Fig. 9As shown, it can be seen that on the high-resolution image dataset of this experiment, other deep learning-based methods have only achieved a maximum IOU of 72%. Ideally, if the crack has good continuity and high contrast, and the image resolution is low, these detection methods can detect cracks with high precision. However, in the bridge crack environment, cracks often show poor continuity, low contrast, and blurred edges, which makes the detection results of most current methods poor. The two-stage detection method proposed in the present invention can quickly and accurately extract the crack position in the high-resolution image through the design of the first-stage DBCC-Net and the model post-processing method. The slices of the cracked part are sent to the second-stage semantic segmentation network, which not only improves the network detection speed, but also increases the extraction accuracy of the cracks. In short, the present invention has good performance in generalization ability and detection performance, and has practical value in bridge detection.
[0090] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A bridge crack detection method based on a two-stage deep learning strategy, characterized in that: The following steps are involved: (1) Collect high-resolution bridge crack images and input them into the trained DBCC-Net. YOLOx is used as the backbone of the network to extract crack feature information. The head of the YOLOx model is pruned to complete the coarse positioning of the crack and filter out the image part containing the crack. (2) Classification network post-processing ① Model modification The prediction results obtained by sigmoid processing in the Prediction part of DBCC-Net are mapped into a matrix, and the false positives and missed positives in the matrix are corrected to obtain the corrected matrix h′; The specific method of model correction is as follows: a. In the mapped matrix, set the matrix value of the crack part to 1 and the matrix value of the background part to 0. For each point with a matrix value of 1, count the number of points with a matrix value of 1 in its eight neighborhoods. Points with a matrix value of 1 are called endpoints, and matrix points with a value greater than or equal to 2 are called midpoints. b. Calculate the minimum Euclidean distance between endpoints, set the false positive threshold β, delete isolated points whose distance to other parts is less than β, and set the matrix value at the corresponding position from 1 to 0 to obtain the correction matrix of the false positive part; c. Calculate the minimum Euclidean distance between endpoints and set a missed detection threshold α. When the distance is less than the threshold α, the two endpoints are considered to be in a breakpoint relationship, and there is a missed crack bin between the two points. Identify the missed crack bin and set the matrix value of the corresponding position to 1 to obtain the correction matrix for the missed crack bin. ② Slice clustering Using the correction matrix, the image portion filtered out in step (1) is sliced and clustered to obtain a complete slice image of the crack; (3) Use DDRNet to perform pixel-level segmentation on the slice image and extract the complete morphology of the crack.
2. The bridge crack detection method based on a two-stage deep learning strategy according to claim 1 is characterized in that: The method for finding the missed crack element is: Calculate the horizontal and vertical coordinate differences ΔX and ΔY between the two breakpoints. If ΔX>ΔY, connect them with the x-axis as the main axis. If ΔX≤ΔY, connect them with the y-axis as the main axis. Perform breakpoint iterations until the two points coincide, and the missed crack surface element is found.
3. The bridge crack detection method based on a two-stage deep learning strategy according to claim 2 is characterized in that: In step (2), the specific method of slice clustering is as follows: Cluster the connected points in the correction matrix into point sets and determine the minimum horizontal coordinate x of the point set. min , the minimum ordinate y min , the maximum horizontal coordinate x max , the maximum vertical coordinate y max , with (x min ,y min )、(x max ,y max ) as the upper left corner vertex and the lower right corner vertex of the bounding box of the crack part, and the part of the bounding box corresponding to the original image is used as the complete slice image of the crack.
