A pavement crack detection method based on improved FPHBN network structure
By introducing multi-scale dilated convolution and spatial attention mechanism into the FPHBN network, combined with the weight factor of the cross-entropy loss function, the problem of noise misjudgment in pavement crack detection is solved, and high-accuracy detection in complex backgrounds is achieved.
Patent Information
- Application Number
- CN202210253650.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-15
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2042-03-15
AI Technical Summary
The existing pavement crack detection method based on FPHBN network structure is easy to misjudge road stains and noise information as cracks in complex background environments, and the noise reduction capability is insufficient.
By introducing multi-scale atrous convolution into the backbone network, integrating the spatial attention mechanism into the feature pyramid module, and adding weight factors to the cross-entropy loss function, the balance between simple samples and difficult samples is adjusted to reduce the impact of noise and improve the model. Accuracy of detection of cracks.
It significantly improves the accuracy and noise resistance of pavement crack detection in complex background environments, enhances the model's ability to focus on cracks, and improves detection accuracy and robustness.
Smart Images

Figure CN114638802B
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of road detection, and in particular to a road surface crack detection method with an improved FPHBN network structure. Background Art
[0002] Pavement crack detection is one of the important tasks of highway maintenance. Timely tracking and tracing of pavement cracks is an important prerequisite for ensuring road driving safety. With the rapid development of computer technology and the improvement of computing power, more and more researchers have proposed pavement crack detection methods based on deep learning. Among them, Feature Pyramid and Hierarchical Boosting Network (FPHBN) is an end-to-end crack detection method based on multi-scale feature fusion proposed by Yang et al. FPHBN adopts hierarchical feature extraction. The backbone network consists of conv1 to conv5 of HED. The feature pyramid fusion module is used to introduce context information from the deep layer to the shallow layer. The side network of deep supervised learning is used to integrate multi-level features. This method can detect crack pixels more accurately in clean road scenes and obtain better detection results. However, for crack images with complex topological structures, road stains, spots and other noise information are easily regarded as crack pixels, and the denoising ability of the model still needs to be improved. Summary of the invention
[0003] The purpose of the present invention is to provide a pavement crack detection method with an improved FPHBN network structure, which can accurately detect pavement cracks in a complex background environment.
[0004] To achieve the above object, the present invention provides a pavement crack detection method with an improved FPHBN network structure, comprising:
[0005] Collecting road surface image sets;
[0006] Screening images containing cracks in the pavement image set, cropping them into a fixed size of 256×256, and manually annotating them to obtain GroundTrue data for constructing a training set and a test set;
[0007] Adjust the FPHBN model and parameters, and use the DeepCrack dataset to train the improved FPHBN model;
[0008] Put the collected pavement crack image into the trained FPHBN model for testing. If the test result is unqualified, adjust the FPHBN model structure and parameters and retrain until the test is qualified;
[0009] The crack images are classified and the damage extent is evaluated using the FPHBN model that has passed the test.
[0010] The adjusting of the FPHBN model and parameters and training of the improved FPHBN model include:
[0011] The crack images with the same size are sent to the improved FPHBN model;
[0012] The input data is forward propagated through the improved FPHBN model to obtain an output value;
[0013] Calculating the error value between the output value and the target value using an improved loss function;
[0014] When the error value is greater than the expected value, the error value is transmitted back to the network, and the model is re-derivated with the current error value using the stochastic gradient descent algorithm, and the model weights are updated by back propagation;
[0015] The training ends when the number of iterations reaches the specified number or the error value is equal to or less than the expected value.
[0016] The output values obtained by forward propagation of the input data through the improved FPHBN model include:
[0017] Use the improved HED backbone network to extract multi-level and multi-scale convolutional feature maps;
[0018] Integrate the spatial attention mechanism into the feature pyramid module, introduce deep semantic features into the shallow network layer by layer, and send the feature map of each layer to the spatial attention module after fusion with the feature map of the upper layer to reduce the impact of image noise;
[0019] A side deep supervision network is used to predict each side output separately, and an improved cross entropy loss function is used to supervise each side separately;
[0020] Finally, the five prediction results are fused and spliced to obtain the final convolution feature prediction output result.
[0021] Among them, the improved HED backbone network introduces multi-scale hole convolution on the basis of HED to extract effective context information.
[0022] Among them, the improved feature fusion module adds a spatial attention mechanism on the basis of the original feature pyramid module.
[0023] The improved cross entropy loss function is based on the original cross entropy loss function and adds a weight factor for balancing simple samples and difficult samples.
[0024] The present invention discloses a pavement crack detection method with an improved FPHBN network structure. The method introduces multi-scale hole convolution into the backbone network through the improved FPHBN network structure, extracts deeper semantic information while retaining image detail information; integrates the spatial attention mechanism into the feature pyramid module, introduces deep semantic information into the shallow network layer by layer, and uses the spatial attention module to strengthen the model's focus on cracks, thereby reducing the impact of noise; further improves the loss function of the deep supervision side network, and introduces a weight factor to adjust the imbalance problem between simple samples and difficult samples, so as to accurately detect pavement cracks in a complex background environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0026] Figure 1 It is a flow chart of a pavement crack detection method of the present invention with an improved FPHBN network structure.
[0027] Figure 2 It is a flow chart of adjusting the FPHBN model and parameters and training the improved FPHBN model according to the present invention.
[0028] Figure 3 It is a flow chart of obtaining output values by forward propagating the input data of the present invention through the improved FPHBN model.
[0029] Figure 4 It is a schematic diagram of the structure of the improved FPHBN network of the present invention.
[0030] Figure 5 It is a structural schematic diagram of the spatial attention module of the present invention.
[0031] Figure 6 It is a structural schematic diagram of the side feature map fusion network of the present invention.
[0032] Figure 7 It is the test result image on the DeepCrack dataset.
[0033] Figure 8 It is the test result image on the CRKWH100 dataset.
[0034] Fig. 9 It is the test result image on the CrackTree260 dataset.
[0035] Fig.10 It is a chart of evaluation index results on the DeepCrack dataset.
[0036] Fig.11 This is a chart of evaluation index results on the CRKWH100 dataset.
[0037] Fig.12 This is a chart of evaluation index results on the CrackTree260 dataset. DETAILED DESCRIPTION
[0038] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.
[0039] See also Figures 1 to 12 The present invention provides a road crack detection method with an improved FPHBN network structure, comprising:
[0040] S1 collects road surface image sets;
[0041] Use a vehicle-mounted or airborne digital camera to continuously shoot toward the road surface to collect a road surface image set.
[0042] S2 selects images containing cracks in the pavement image set, crops them into a fixed size of 256×256, and then annotates them to obtain Ground True data for constructing a training set and a test set;
[0043] The collected pavement image set is screened to select images containing cracks, and the images are cropped into small-resolution images of a fixed size. The pavement crack images are manually annotated to obtain Ground True data for constructing a training set and a test set.
[0044] S3 adjusts the FPHBN model and parameters, and trains the improved FPHBN model using the DeepCrack dataset;
[0045] The specific steps are:
[0046] S31 sends the crack images with the same size to the improved FPHBN model;
[0047] First, the crack images of the same size are sent to the improved FPHBN model.
[0048] S32 input data is forward propagated through the improved FPHBN model to obtain an output value;
[0049] The specific steps are:
[0050] S321 uses an improved HED backbone network to extract multi-level and multi-scale convolutional feature maps;
[0051] The improved HED-based backbone network introduces multi-scale hole convolution on the basis of HED to extract effective context information. HED reduces the image resolution through pooling operation, increases the receptive field of the convolution kernel, and thus extracts more effective context information. The HED network structure is divided into 5 convolution stages. After the pooling operation in the 5th convolution stage, the resolution of the crack image is only 32×32, which is 8 times smaller than the input image. The reduction in image resolution will lead to the loss of a large amount of detail information in the image. To solve this problem, the present invention introduces hole convolution into the model structure, cancels the maximum pooling operation in the 4th and 5th convolution stages, and uses hole rates of 1, 3, and 5 in the three convolution layers of each stage. The use of hole rates of different scales allows more pixels in the feature map to participate in the convolution operation, thereby enhancing the correlation between pixels. The improved HED backbone network has the ability to integrate different receptive fields and enhances the overall network model's ability to characterize cracks.
[0052] HED is used as the backbone network. HED is a multi-level network structure, which is divided into 5 convolution stages from bottom to top to obtain multi-scale features at different levels. The improved backbone network cancels the maximum pooling operation from the 4th convolution stage, and uses hole convolution to replace the ordinary standard convolution, which neither reduces the image resolution nor increases the receptive field of the convolution kernel. However, it was found through experiments that multiple superpositions of convolution layers with the same hole rate will cause some pixels in the feature map to not participate in the calculation from beginning to end, which is not obvious for pixel-level crack prediction. In order to solve the grid effect problem caused by hole convolutions with the same hole rate, the present invention adopts a jagged hole rate and captures multi-scale contextual information by setting different hole rates. Therefore, hole rates of 1, 3, and 5 are used in the three convolution layers of the fourth and fifth convolution stages of the network to enhance the correlation between crack pixels.
[0053] S322 integrates the spatial attention mechanism into the feature pyramid module, introduces deep semantic features into the shallow network layer by layer, and sends the feature map of each layer to the spatial attention module after fusion with the feature map of the upper layer to reduce the impact of image noise;
[0054] The improved feature fusion module adds a spatial attention mechanism on the basis of the original feature pyramid module. The original feature fusion module upsamples the feature map of this layer twice to the same size as the previous layer and then splices and fuses it, and then continues the same operation until it is fused with the top layer. The deep semantic information of the bottom feature map will be continuously diluted in the process of continuous fusion with the previous layer, resulting in the weak role of deep semantic information in the shallow network. For this reason, the feature map after each layer is fused with the upper layer is sent to the spatial attention module. After the spatial attention module, the focus on the meaningful feature positions in the feature map can be strengthened, and the weight of the semantic information will be increased while reducing the impact of noise. After passing through the spatial attention module, the feature map F will generate a spatial attention coefficient Ms. Multiplying Ms by F will obtain the adaptively adjusted feature map.
[0055] For road crack images with complex backgrounds, noise is easily regarded as crack pixels, which affects the detection effect. Therefore, it is necessary to solve how to make the model ignore noise and focus on crack pixels. Based on the feature pyramid module, the present invention introduces a spatial attention mechanism (SAM) to strengthen the model's focus on crack pixels. The spatial attention module (such as Figure 5 ), after compressing the channels of the feature map, global maximum pooling and global average pooling operations are performed along the channel axis. After the pooling operation, two feature maps are obtained and concatenated and fused. The spatial attention coefficient Ms is obtained through the Sigmoid activation function, and finally multiplied with the original feature map for feature adaptive adjustment.
[0056] On the one hand, the deep semantic information will be continuously diluted when it is fused with the upper-layer features, and the role of deep semantics becomes weaker and weaker; on the other hand, in order to solve the problem of low detection accuracy caused by a large amount of image noise, the improved feature pyramid module sends the features of each layer fused with the previous layer to the spatial attention module to strengthen the model's focus on the location of meaningful information in the feature map. As a lightweight network module, the spatial attention module can not only strengthen the model's focus on crack pixels, but also does not increase the model's computational complexity, and has great improvements in the model's noise resistance, detection accuracy and robustness.
[0057] S323 uses a side deep supervision network to predict each side output separately, and uses an improved cross entropy loss function to supervise each side separately;
[0058] The side fusion network predicts cracks independently for each side output, so each side output needs to be supervised separately and a loss function is applied to reduce the gap between input and output. Considering that the number of background pixels in the crack image accounts for the majority of the entire image, the number of negative samples is much larger than the number of positive samples. In this case, the negative samples, i.e., the image background, will play a dominant role in the calculation of the loss function. The original FPHBN model adds a weight factor α to balance the imbalance between the number of positive and negative samples. In order to address the problem of a large number of simple samples, that is, the imbalance between the number of easy-to-classify samples and the number of difficult samples, the improved method of the present invention is to add a weight factor γ on the basis of the original loss function, as shown in the following formula,
[0059] l n =-α(p n ) γ log(p n )-(1-α)(1-p n ) γ log(1-p n )
[0060] pn represents the probability of predicting a positive or negative sample, n represents the number of pixel values in the sample image, and α represents the weight factor used to balance the imbalance between the number of positive and negative samples;
[0061] If γ is set to 2, when the predicted probability of a positive sample is 0.9, it is definitely a simple sample. According to the formula (1-0.9), γ After calculation, the value will become smaller and the contribution to the loss value will also become smaller. Similarly, for negative samples, the result of predicting 0.1 will have a smaller loss value than the sample loss value of predicting 0.7, so adding a weight factor can adjust the prediction probability of simple samples.
[0062] After passing through the feature pyramid module based on the spatial attention mechanism, 5 feature maps at different levels are obtained. The 5 side output feature maps are multi-scale features fused from different convolution stages, which contain rich crack detail information and semantic information.
[0063] S324 finally merges and splices the five prediction results to obtain the final convolution feature prediction output result;
[0064] The five side output feature maps are respectively subjected to a convolution layer with a convolution kernel of 1 for dimensionality reduction, and then upsampled to the same size as the input image through a transposed convolution. Finally, the upsampled feature maps are fused to obtain the final prediction result.
[0065] S33 calculates the error value between the output value and the target value using an improved loss function;
[0066] S34: when the error value is greater than the expected value, the error value is transmitted back to the network, a stochastic gradient descent algorithm is used to re-derive the model with the current error value, and the model weight is updated by back propagation;
[0067] S35 ends the training until the number of iterations reaches a specified number or the error value is equal to or less than an expected value;
[0068] The process from step S31 to step S34 is iterated until the number of iterations reaches a specified number or the error is equal to or less than the expected value, and the training is terminated.
[0069] S4: putting the collected pavement crack image into the trained FPHBN model for testing. If the test result is unqualified, adjusting the FPHBN model structure and parameters and retraining until the test is qualified;
[0070] The trained model is tested, and the precision, recall, and F-score evaluation indicators are calculated. The cracks are analyzed and evaluated based on the detection results to see if the model performance meets the application requirements. If so, the model is saved for detecting pavement cracks. Otherwise, the FPHBN model structure and model parameters are adjusted and retrained.
[0071] S5: using the FPHBN model that has passed the test to classify the crack image and evaluate the damage degree;
[0072] After the FPHBN model is tested to be qualified, the FPHBN model is used to classify the crack image and evaluate the degree of damage.
[0073] In order to verify the effectiveness of the proposed method in pavement crack detection, training and testing were carried out on three public crack datasets, DeepCrack, CRKWH100, and CrackTree260. The commonly used evaluation indicators Precision, Recall, and F-score in the field of crack detection were used to evaluate our network model, and compared with the current DeepCrack, HED, CrackSeg, SegNet, and FPHBN methods to comprehensively illustrate the effectiveness of the present invention.
[0074] The test results on three datasets are as follows Figure 7-Figure 9 As shown ( Figure 7-Figure 9 From left to right in the figure are original image, mark, DeepCrack, HED, CrackSeg, SegNet, FPHBN, and the present invention). Figure 7 is the test result on the DeepCrack dataset. Figure 8 The test results on the CRKWH100 dataset are: Fig. 9The test results on the CrackTree260 dataset are shown in Figure 2. From the visual effect, this method has strong feature extraction capabilities on all three datasets. It can resist gray noise on the CRKWH100 and CrackTree260 datasets with poor environments, and the detected cracks have good continuity.
[0075] The evaluation index results on the three datasets are as follows Figure 8 As shown, the results show that the F-Score values of the method invented in this paper on the three data sets are all the highest and better than the comparison methods, which proves that the method proposed in this paper has certain practicality.
[0076] The present invention discloses a pavement crack detection method with an improved FPHBN network structure. The method introduces multi-scale hole convolution into the backbone network through the improved FPHBN network structure, extracts deeper semantic information while retaining image detail information; integrates the spatial attention mechanism into the feature pyramid module, introduces deep semantic information into the shallow network layer by layer, and uses the spatial attention module to strengthen the model's focus on cracks, thereby reducing the impact of noise; further improves the loss function of the deep supervision side network, and introduces a weight factor to adjust the imbalance problem between simple samples and difficult samples, so as to accurately detect pavement cracks in a complex background environment.
[0077] What is disclosed above is only a preferred embodiment of the present invention, and it certainly cannot be used to limit the scope of rights of the present invention. Ordinary technicians in this field can understand that all or part of the processes of the above embodiment and equivalent changes made according to the claims of the present invention still fall within the scope of the invention.
Claims
1. A pavement crack detection method with an improved FPHBN network structure, characterized in that: include: Collecting road surface image sets; Screening images containing cracks in the pavement image set, cropping them into a fixed size of 256×256, and then annotating them to obtain Ground True data for constructing a training set and a test set; Adjust the FPHBN model and parameters, and use the DeepCrack dataset to train the improved FPHBN model; Put the collected pavement crack image into the trained FPHBN model for testing. If the test result is unqualified, adjust the FPHBN model structure and parameters and retrain until the test is qualified; Using the FPHBN model that has passed the test to classify the crack image and evaluate the degree of damage; The output values obtained by forward propagation of the improved FPHBN model after input data include: Use the improved HED backbone network to extract multi-level and multi-scale convolutional feature maps; Integrate the spatial attention mechanism into the feature pyramid module, introduce deep semantic features into the shallow network layer by layer, and send the feature map of each layer to the spatial attention module after fusion with the feature map of the upper layer to reduce the impact of image noise; A side deep supervision network is used to predict each side output separately, and an improved cross entropy loss function is used to supervise each side separately; Finally, the five prediction results are fused and spliced to obtain the final convolution feature prediction output result; The improved HED backbone network introduces multi-scale hole convolution on the basis of HED to extract effective context information; The improved feature fusion module adds a spatial attention mechanism on the basis of the original feature pyramid module; The improved cross entropy loss function is based on the original cross entropy loss function and adds a weight factor for balancing simple samples and difficult samples.
2. A pavement crack detection method with an improved FPHBN network structure as claimed in claim 1, characterized in that: The adjusting of the FPHBN model and parameters and training of the improved FPHBN model include: Sending the crack images with the same size into the improved FPHBN model; The input data is forward propagated through the improved FPHBN model to obtain an output value; Calculating the error value between the output value and the target value using an improved loss function; When the error value is greater than the expected value, the error value is transmitted back to the network, and the model is re-derivated with the current error value using the stochastic gradient descent algorithm, and the model weights are updated by back propagation; The training ends when the number of iterations reaches the specified number or the error value is equal to or less than the expected value.
