Pavement crack detection method based on position-aware recurrent convolution and cascade fusion

By using position-aware cyclic convolution and cascade fusion technology in pavement crack detection, the problems of equipment deployment, receptive field smallness and environmental noise are solved, and efficient and accurate pavement crack detection is achieved.

CN118762288BActive Publication Date: 2024-11-15EAST CHINA JIAOTONG UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411246315.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-06
Publication Date
2024-11-15
Estimated Expiration
2044-09-06

AI Technical Summary

Technical Problem

The existing pavement crack detection technology has high-performance models that rely on a large number of parameters and memory resources, are difficult to deploy on low-computing equipment, are incomplete detection due to small receptive fields, affect the recognition accuracy of environmental noise, and insufficient fusion parameters of lightweight modules. question.

Method used

The road surface crack detection method based on position-aware cyclic convolution and cascade fusion is adopted. The global feature information is extracted through position-aware cyclic convolution, and the reverse residual and dual attention modules are used to enhance the model's attention to the crack area, and the level is passed. Combination improves feature fusion capabilities.

Benefits of technology

Efficient road crack detection is realized on low-cost equipment, reducing the negative impact of environmental noise on identification, improving the amount of feature fusion parameters, enhancing the multi-scale feature fusion capability of the model, and improving the accuracy and completeness of crack detection .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118762288B_ABST
    Figure CN118762288B_ABST
Patent Text Reader

Abstract

The present invention discloses a pavement crack detection method based on position-aware circular convolution and cascade fusion. Position-aware circular convolution is used to extract complete pavement crack feature information. Position-aware circular convolution has a global receptive field and can generate local position-sensitive features at the same time, so that crack information can be obtained more comprehensively. The dual-branch reverse residual module and the dual attention module are integrated to reduce the negative impact of environmental factors during recognition, so that PACNet pays more attention to the crack area. An encoder is obtained by cascading multiple sub-trunk networks, so that the parameters of the feature extraction module can be shared with the feature fusion module, so as to improve the multi-scale feature fusion capability of the model without increasing the total number of model parameters. The patent of the present invention can not only accurately predict the location and shape of cracks, but also can be directly deployed on edge devices with low computing power, solving the problem that pavement crack segmentation models usually require a large number of parameters and memory resources, saving a lot of time and cost, and the recognition results are accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of automatic detection of pavement cracks, and in particular relates to a pavement crack detection method based on position-aware circular convolution and cascade fusion. Background Art

[0002] Cracks, as one of the most common road surface defects, will accelerate road damage and increase the risk of traffic accidents. If not repaired in time, the service life of the road surface will be seriously reduced.

[0003] Early pavement crack detection mainly relied on maintenance personnel to inspect with the naked eye, which was inefficient, costly, and easily affected by subjective factors. With the rapid development of computer vision, deep learning has been widely used in the field of pavement crack detection, mainly including target detection and semantic segmentation technology. Target detection aims to find all target objects in a given image and determine their location and category. This technology can only locate the approximate location of the crack and cannot determine the shape of the crack; semantic segmentation refers to dividing the image into multiple categories of regions and assigning each pixel its corresponding category label. Compared with target detection, the pixel-level recognition capability of semantic segmentation technology can more accurately locate crack location information and determine crack shape.

[0004] Although the research on semantic segmentation technology has made some progress in recent years, there are still some problems: 1. High-performance segmentation models usually need to rely on a large number of parameters and memory resources, which makes them difficult to deploy on edge devices with low computing power; 2. Pavement cracks are usually long and narrow lines. The receptive field size of conventional convolutional neural networks (CNN) is small, and it is difficult to obtain all crack information, resulting in incomplete segmentation results of the detection model. Vision Transformer (VIT) uses self-attention to obtain excellent global feature extraction capabilities, but it needs to rely on a large number of parameters and memory resources; 3. The background of pavement crack images is complex, including environmental noise such as light shadows, water stains, and leaves. These noises will increase the false positive rate during network recognition, thereby reducing the accuracy of crack recognition; 4. Existing pavement crack segmentation models usually use lightweight module fusion features. The number of parameters in the fusion module is limited, which will directly affect the multi-scale feature fusion capability of the model.

[0005] Therefore, it is urgent to design a lightweight pavement crack detection method that can be deployed on actual equipment, perform special processing on narrow and long cracks, solve the negative impact of environmental noise on recognition, and allocate more parameters for feature fusion.

[0006] The information disclosed in this background technology section is only intended to enhance the understanding of the overall background of the invention and should not be regarded as an acknowledgment or any form of suggestion that the information constitutes the prior art already known to a person skilled in the art. Summary of the invention

[0007] The purpose of the present invention is to provide a pavement crack detection method based on position-aware circular convolution and cascade fusion, which extracts the global feature information of the cracks through position-aware circular convolution, utilizes the reverse residual and dual attention modules to make the model pay more attention to the crack area, adjusts the overall structure of the model, and increases the model feature fusion capability at a low cost, thereby overcoming the defects in the above-mentioned prior art.

[0008] To achieve the above object, the present invention provides a pavement crack detection method based on position-aware circular convolution and cascade fusion, the steps of which are as follows:

[0009] S01. Build a Position Aware Cascade Network (PACNet): The PACNet construction process is divided into preprocessing, encoding, and decoding stages;

[0010] In the preprocessing stage, the decoupled downsampling module is used to perform preliminary processing on the image; in the encoding stage, the encoder consists of two sub-trunk networks, each of which contains a position-aware circular convolution block Parc Block, a dual-branch inverse residual module DBIRM, a dual attention module DAM, and a link block Link Block. The link block in the first sub-trunk network performs feature fusion on the feature map output by the network and serves as the input of the second sub-trunk network. The output of the link block in the second sub-trunk network is spliced ​​with the multi-scale feature image output by the network and serves as the input of the decoder; in the decoding stage, the segmentation head is used to refine the multi-scale features of the multi-scale feature image, and the final prediction result is obtained by bilinear interpolation.

[0011] S02. Prepare training and test sets: Use the public dataset Crack500. Since the pavement crack image dataset is scarce, in order to make full use of this data, randomly crop the images in the public dataset Crack500 into non-overlapping images with a resolution of 640×360 pixels, and obtain 3364 new road crack images. These images are divided into two groups of images, Group A and Group B, in a ratio of 8:2. 2690 images in Group A are selected as the training set, and the training set is enhanced using four methods: rotation, flipping, brightness enhancement, and contrast enhancement; 674 images in Group B and the public dataset DeepCrack537 are selected as the test set; Group B images are used to test the prediction effect of PACNet when facing similar cracks and test the recognition ability of PACNet, and the public dataset DeepCrack537 is used to test the prediction effect of PACNet when facing unfamiliar cracks and test the generalization ability of PACNet;

[0012] S03, training PACNet: using the training set prepared in step S02 for PACNet training; the training process is: using the road crack images in the training set and their corresponding true labels as the input of PACNet; randomly selecting images and their corresponding true labels from the training set at a ratio of 5:1 as the validation set; setting the learning rate, training epoch and optimizer of PACNet, the initial learning rate is set to 1e-4, using the learning rate adjustment strategy OneCycleLR to automatically adjust the learning rate during training, the training epoch is set to 100, using stochastic gradient descent SGD as the optimizer, the momentum is set to 0.9, the weight decay is set to 1e-4, and the PACNet weights and biases are continuously updated to find the optimal weights to obtain the final trained PACNet;

[0013] S04. Test PACNet: Input the test set images to test the trained PACNet and verify the comprehensive segmentation performance of PACNet; use precision, recall rate and F1 score to evaluate the comprehensive segmentation performance of PACNet;

[0014] S05. Output crack segmentation results: Save the prediction image of PACNet in PNG format. The prediction image is a black-and-white binary pixel image, where white represents the crack area and black represents the background area. Save the evaluation index of each image in a csv file, and calculate the average index of all images recognized by PACNet as the final evaluation index of the test set.

[0015] Preferably, in the technical solution, in step S01, the preprocessing stage performs a downsampling operation on the input image, uses a decoupled downsampling module to decouple the downsampling operation, uses a common convolution block to generate a shared feature map, and splits the convolution and pooling operations into two paths to downsample the shared feature map respectively. The specific process is as follows:

[0016] ;

[0017] in, represents the original input image, for , , The convolution operation, For batch normalization, is the output of the common convolutional block, is the point convolution operation, is a linear rectification function, is the output of the convolution path, is the maximum pooling operation, is the output of the pooling path, for Splicing operation, for , , The convolution operation, Decouple the output of the downsampling module.

[0018] Preferably, in the technical solution, in step S01, feature extraction is performed in the encoding stage, and the position-aware circular convolution block Parc Block uses position-aware circular convolution (ParC) based on the improved convolutional neural network CNN to extract the global feature information of the pavement crack image; ParC has two types, vertical and horizontal, the vertical direction is ParC-V, covering all pixels in the same column, and the horizontal direction is ParC-H, covering all pixels in the same row, and the global feature information is obtained by jointly using ParC-V and ParC-H; assuming that the shape of the input feature map x is c×h×w, c is the number of channels of the current input feature image, the output of ParC-V for the pixel point (i, j) is as follows:

[0019] ;

[0020] in, Encodes the instance position in the vertical direction, A collection of vertical position codes; is a bilinear interpolation function used to adjust the size of the position encoding to the size of the input; Encode the position of vertical expansion; is the expansion function in the vertical direction, copy After that, splice in the horizontal direction to generate ; is the instance kernel of each vertical feature matrix, It is a collection of vertical feature matrix instance kernels, which enables PACNet to better understand and process data; and Add to get the input after embedding the vertical position code ; t is a variable, (i+t) modh represents the horizontal coordinate of x in the feature map; The process can be expressed more directly in code: , F.conv2D() represents a two-dimensional convolution operation, and torch.cat() represents a concatenation operation function; is the h-1th pixel position in the vertical feature matrix, and h is the height of the vertical feature matrix; is the instance kernel corresponding to the h-1th pixel position in the vertical feature matrix;

[0021] Similarly, the output of ParC-H for pixel (i, j) can be expressed as:

[0022] ;

[0023] in, Encode the instance position in the horizontal direction; is a set of horizontal position codes; Encode the position of horizontal expansion; is the horizontal expansion function, After copying h times, splice along the vertical direction to generate ; is the instance kernel of each horizontal feature matrix, is the set of horizontal feature matrix instance kernels; and Add to get the input after embedding the horizontal position code ; (j+t) modw represents the ordinate of x in the feature map; The process is expressed in code as follows: ; is the w-1th pixel position in the horizontal feature matrix, w is the width of the horizontal feature matrix; is the instance kernel corresponding to the w-1th pixel position in the horizontal feature matrix.

[0024] Preferably, in the technical solution, in step S01, for the case of complex background in the pavement crack image, a dual-branch reverse residual module and a dual attention module are added to the encoder; the dual attention module captures details from the spatial direction and the channel direction, so that PACNet pays more attention to the crack area; the dual attention module capture process is as follows:

[0025] ;

[0026] in is the result of adding the convolution operation and the point convolution operation. is the dot multiplication operation, is the normalization function, Used after point convolution operation The result of processing, GAP() is the global average pooling, is a S-type nonlinear activation function, yes The output of , FC() is the fully connected layer, It is used after the fully connected layer The output, is the output of the dual attention module;

[0027] The dual-branch reverse residual module increases the feature information contained in the feature map by expanding the number of feature map channels, and then uses convolution operations to remove excess noise; the specific process of the dual-branch reverse residual module is as follows:

[0028] ;

[0029] in, is the output of the dual-branch reverse residual module.

[0030] Preferably, in the technical solution, in step S01, from the perspective of the entire encoding process, the first connection block is located in the feature extraction operation, and the second connection block is used for the final feature fusion. Therefore, the two connection blocks and the middle sub-trunk network can be regarded as fusion modules. The sub-trunk network located after the first connection block, all its parameters participate in both feature extraction and feature fusion, greatly improving the proportion of feature fusion parameters; the connection block adopts a lightweight design, and can fuse feature maps of different scales with extremely small memory and computing costs. The specific operations of the connection block are as follows:

[0031] ;

[0032] in, It is the feature map output by the dual attention module DAM. It is the feature map output by the position-aware circular convolution block Parc Block. The output of the connection block.

[0033] Preferably, in the technical solution, in step S01, in the decoding stage, the segmentation head uses two groups of convolution blocks to process the output of the encoding stage, and in order to prevent the gradient from disappearing and the performance from being degraded due to the excessive depth of the network layer, a residual connection operation is added, and the result of the residual connection is upsampled using the bilinear interpolation method to obtain the final prediction result. The specific process of the segmentation head is as follows:

[0034] ;

[0035] in, is the bilinear interpolation function, is the output of the segmentation head.

[0036] Preferably, in the technical solution, in step S04, the calculation formulas for precision, recall and F1 score are as follows:

[0037] ;

[0038] Among them, TP represents the positive sample predicted by PACNet as the positive class, FP represents the negative sample predicted by PACNet as the positive class, and FN represents the positive sample predicted by PACNet as the negative class;

[0039] The evaluation of PACNet's comprehensive segmentation performance is measured by intersection over union (IOU) and accuracy (Acceracy). The calculation formulas for intersection over union (IoU) and accuracy (Acceracy) are as follows:

[0040] ;

[0041] Where TN represents the negative samples predicted by PACNet as negative classes.

[0042] Preferably, in the technical solution, in step S04, the evaluation of the comprehensive segmentation performance of PACNet also includes the parameter quantity M, the computational quantity GFLOPS and the running speed ms; the stat() function in the torchstat library is used to count the parameter quantity and computational quantity of PACNet, the code is torchstat.stat(), and while testing the performance of PACNet on the test set, the test time spent is recorded. When PACNet starts testing, the current time is recorded as the start time. After the test of the last test image is completed, the completion time is recorded, the time difference between the completion time and the start time is calculated, and the running speed of PACNet processing one image is inferred based on the number of processed images.

[0043] Compared with the prior art, the present invention has the following beneficial effects:

[0044] In the early stage of the network, a decoupled downsampling module is used to preprocess the input image to reduce the number of parameters and computation required for the subsequent operation. Position-aware circular convolution is used to obtain the global feature information of the crack to solve the problem of difficulty in extracting complete crack features. The double-branch reverse residual and dual attention mechanism are used to reduce the negative impact of environmental noise on recognition and make the model pay more attention to the crack area. The cascade fusion method is used for feature fusion, and the feature extraction parameters are contributed to the feature fusion, which will not increase the overall complexity of the model while increasing the proportion of feature fusion parameters. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 It is a flow chart of a pavement crack detection method based on position-aware circular convolution and cascade fusion according to the present invention;

[0046] Figure 2 This is the PACNet structure framework diagram of the present invention;

[0047] Figure 3It is a structural framework diagram of the decoupling downsampling module (Decoupling Downsampling Model, DDSM) of the present invention;

[0048] Figure 4 This is a structural framework diagram of the position-aware circular convolution block ParC Block of the present invention;

[0049] Figure 5 The structure framework diagram of the Inverted Residuals Attention Model (IRAM) and the dual attention module DAM of the present invention;

[0050] Figure 6 This is a schematic diagram of the cascade fusion structure of the present invention;

[0051] Figure 7 It is a structural framework diagram of the Link Block of the present invention;

[0052] Figure 8 This is a structural framework diagram of the segmentation head SegHead of the present invention. DETAILED DESCRIPTION

[0053] The specific embodiments of the present invention are described in detail below, but it should be understood that the protection scope of the present invention is not limited by the specific embodiments.

[0054] Unless explicitly stated otherwise, throughout the specification and claims, the term “comprise” or variations such as “include” or “comprising”, etc., will be understood to include the stated elements or components but not to exclude other elements or components.

[0055] like Figure 1 As shown in FIG, a pavement crack detection method based on position-aware circular convolution and cascade fusion has the following steps:

[0056] S01. Build a Position Aware Cascade Network (PACNet): The PACNet construction process is divided into preprocessing, encoding, and decoding stages;

[0057] In the preprocessing stage, the decoupled downsampling module is used to decouple the downsampling operation to reduce the amount of computation for subsequent feature extraction and feature fusion operations. The structure of the decoupled downsampling module is as follows: Figure 3As shown in the figure, the input feature map is first preprocessed using the convolution operation, and then down-sampling is performed using convolution and maximum pooling operations from two paths at the same time. A point convolution operation is added at the starting position of the convolution path to reduce the number of channels of the feature map. Finally, the outputs of the two paths are spliced ​​and the final output of the module is obtained through a convolution block. The specific process is as follows:

[0058] ;

[0059] in, represents the original input image, for , , The convolution operation, For batch normalization, is the output of the common convolutional block, is the point convolution operation, is a linear rectification function, is the output of the convolution path, is the maximum pooling operation, is the output of the pooling path, for Splicing operation, for , , The convolution operation, is the output of the decoupled downsampling module;

[0060] The encoder in the encoding stage consists of two sub-backbone networks. Each sub-backbone network contains a position-aware recurrent convolution block Parc Block, a dual-branch inverse residual module DBIRM, a dual attention module DAM, and a link block Link Block. The link block in the first sub-backbone network performs feature fusion on the feature map output by the network and serves as the input of the second sub-backbone network. The output of the link block in the second sub-backbone network is concatenated with the multi-scale feature image output by the network and serves as the input of the decoder.

[0061] The position-aware circular convolution block Parc Block uses the improved position-aware circular convolution (ParC) based on the convolutional neural network CNN to extract the global feature information of the pavement crack image; ParC has two types: vertical and horizontal. The vertical direction is ParC-V, which covers all pixels in the same column, and the horizontal direction is ParC-H, which covers all pixels in the same row. The global feature information is obtained by jointly using ParC-V and ParC-H; Figure 4As shown in the figure, assuming that the shape of the input feature map x is c×h×w, c is the number of channels of the current input feature image, a vertical position code c×b×1, after bilinear interpolation function processing to get c×h×1, b is represented as height in ParC-V, the output of ParC-V for pixel (i, j) is as follows:

[0062] ;

[0063] in, Encodes the instance position in the vertical direction, A collection of vertical position codes; is a bilinear interpolation function used to adjust the size of the position encoding to the size of the input; Encode the position of vertical expansion; is the expansion function in the vertical direction, copy After that, splice in the horizontal direction to generate ; is the instance kernel of each vertical feature matrix, It is a collection of vertical feature matrix instance kernels, which enables PACNet to better understand and process data; and Add to get the input after embedding the vertical position code ; t is a variable, (i+t) modh represents the horizontal coordinate of x in the feature map; The process can be expressed more directly in code: , F.conv2D() represents a two-dimensional convolution operation, and torch.cat() represents a concatenation operation function; is the h-1th pixel position in the vertical feature matrix, and h is the height of the vertical feature matrix; It is the instance kernel corresponding to the h-1th pixel position in the vertical feature matrix.

[0064] Similarly, a horizontal position code c×1×b is processed by bilinear interpolation function to obtain c×1×w, where b is represented as width in ParC-H. The output of ParC-H for pixel (i, j) can be expressed as

[0065] ;

[0066] in, is the horizontal instance position code, is a set of horizontal position codes; Encode the position of horizontal expansion; is the horizontal expansion function, After copying h times, splice along the vertical direction to generate ; is the instance kernel of each horizontal feature matrix, is the set of horizontal feature matrix instance kernels; and Add to get the input after embedding the horizontal position code ; (j+t) modw represents the ordinate of x in the feature map; The process is expressed in code as follows: ; is the w-1th pixel position in the horizontal feature matrix, w is the width of the horizontal feature matrix; is the instance kernel corresponding to the w-1th pixel position in the horizontal feature matrix;

[0067] In view of the complex background in the pavement crack image, a dual-branch reverse residual module and a dual attention module are added to the encoder; Figure 5 As shown in the figure, the output of the position-aware circular convolution block ParC Block is used as input. On the one hand, a convolution block with a convolution kernel size of 3×3 is used to expand the number of channels of the input feature map, and its number of channels is expanded to 3 times the original number. Then, the number of channels is reduced through point-by-point convolution operations. On the other hand, the dual attention module DAM is used to refine the input feature map. Finally, the output of the dual attention module DAM is added pixel by pixel to the feature map after the number of channels is reduced to obtain the final output.

[0068] The dual attention module captures details from the spatial direction and the channel direction, allowing PACNet to pay more attention to the crack area; the dual attention module capture process is as follows:

[0069] ;

[0070] in is the result of adding the convolution operation and the point convolution operation. is the dot multiplication operation, is the normalization function, Used after point convolution operation The result of processing, GAP() is the global average pooling, is a S-type nonlinear activation function, yes The output of , FC() is the fully connected layer, It is used after the fully connected layer The output, is the output of the dual attention module;

[0071] The dual-branch reverse residual module increases the feature information contained in the feature map by expanding the number of feature map channels, and then uses convolution operations to remove excess noise; the specific process of the dual-branch reverse residual module is as follows:

[0072] ;

[0073] in, is the output of the dual-branch reverse residual module;

[0074] like Figure 6 As shown in , from the perspective of the entire encoding process, the first connection block is located in the feature extraction operation, and the second connection block is used for the final feature fusion. Therefore, the two connection blocks and the middle sub-trunk network can be regarded as fusion modules. The sub-trunk network located after the first connection block, all its parameters participate in both feature extraction and feature fusion, greatly increasing the proportion of feature fusion parameters; the connection block adopts a lightweight design, which can fuse feature maps of different scales with extremely small memory and computing costs, such as Figure 7 As shown, the specific operations of the connection block are as follows:

[0075] ;

[0076] in, It is the feature map output by the dual attention module DAM. It is the feature map output by the position-aware circular convolution block Parc Block. is the output of the connection block;

[0077] In the decoding stage, the segmentation head is used to refine the multi-scale feature image, and the final prediction result is obtained by bilinear interpolation; Figure 8 As shown in the figure, the segmentation head uses two sets of convolution blocks to process the output of the encoding stage, and in order to prevent the gradient from disappearing and performance degradation due to the excessive depth of the network layer, a residual connection operation is added, and the result of the residual connection is upsampled using the bilinear interpolation method to obtain the final prediction result. The specific process of the segmentation head is as follows:

[0078] ;

[0079] in, is the bilinear interpolation function, is the output of the segmentation head; the final PACNet is as follows Figure 2 shown.

[0080] S02. Prepare training and test sets: Use the public dataset Crack500. Since the pavement crack image dataset is scarce, in order to make full use of this data, randomly crop the images in the public dataset Crack500 into non-overlapping images with a resolution of 640×360 pixels, and obtain 3364 new road crack images. These images are divided into two groups of images, Group A and Group B, in a ratio of 8:2. 2690 images in Group A are selected as the training set, and the training set is enhanced using four methods: rotation, flipping, brightness enhancement, and contrast enhancement; 674 images in Group B and the public dataset DeepCrack537 are selected as the test set; Group B images are used to test the prediction effect of PACNet when facing similar cracks and test the recognition ability of PACNet, and the public dataset DeepCrack537 is used to test the prediction effect of PACNet when facing unfamiliar cracks and test the generalization ability of PACNet;

[0081] S03, training PACNet: using the training set prepared in step S02 for PACNet training; the training process is: using the road crack images in the training set and their corresponding true labels as the input of PACNet; randomly selecting images and their corresponding true labels from the training set at a ratio of 5:1 as the validation set; setting the learning rate, training epoch and optimizer of PACNet, the initial learning rate is set to 1e-4, using the learning rate adjustment strategy OneCycleLR to automatically adjust the learning rate during training, the training epoch is set to 100, using stochastic gradient descent SGD as the optimizer, the momentum is set to 0.9, the weight decay is set to 1e-4, and the PACNet weights and biases are continuously updated to find the optimal weights to obtain the final trained PACNet;

[0082] S04. Test PACNet: Input the test set images to test the final PACNet, and use precision, recall rate and F1 score to evaluate the comprehensive segmentation performance of PACNet; the calculation formulas of precision, recall rate and F1 score are as follows:

[0083] ;

[0084] Among them, TP represents the positive sample predicted by PACNet as the positive class, FP represents the negative sample predicted by PACNet as the positive class, and FN represents the positive sample predicted by PACNet as the negative class;

[0085] Evaluation of PACNet's comprehensive segmentation performance. Since pavement crack detection can be regarded as a binary classification problem, it is also necessary to evaluate the segmentation ability of crack pixels and background pixels. The intersection over union (IOU) and accuracy (Acceracy) are used to measure the performance. The calculation formulas of the intersection over union (IoU) and accuracy (Acceracy) are as follows:

[0086] ;

[0087] Where TN represents the negative samples predicted by PACNet as negative classes;

[0088] The evaluation of PACNet's comprehensive segmentation performance also includes the number of parameters M, the amount of computation GFLOPS, and the running speed ms; the stat() function in the torchstat library is used to count the number of parameters and the amount of computation of PACNet, the code is torchstat.stat(), and while testing the performance of PACNet on the test set, the test time spent is recorded. When PACNet starts testing, the current time is recorded as the start time. After the test of the last test image is completed, the completion time is recorded, the time difference between the completion time and the start time is calculated, and the running speed of PACNet processing one image is estimated based on the number of processed images;

[0089] S05. Output crack segmentation results: Save the prediction image of PACNet in PNG format. The prediction image is a black-and-white binary pixel image, where white represents the crack area and black represents the background area. Save the evaluation index of each image in a csv file, and calculate the average index of all images recognized by PACNet as the final evaluation index of the test set.

[0090] The foregoing description of specific exemplary embodiments of the present invention is for the purpose of illustration and demonstration. These descriptions are not intended to limit the present invention to the precise form disclosed, and it is clear that many changes and variations can be made based on the above teachings. The purpose of selecting and describing the exemplary embodiments is to explain the specific principles of the present invention and its practical application, so that those skilled in the art can realize and utilize various different exemplary embodiments of the present invention and various different selections and changes. The scope of the present invention is intended to be limited by the claims and their equivalents.

Claims

1. A pavement crack detection method based on position-aware circular convolution and cascade fusion, characterized by: The steps are as follows: S01, constructing a location-aware cascade network PACNet: the PACNet construction process is divided into a preprocessing stage, an encoding stage, and a decoding stage; In the preprocessing stage, the decoupled downsampling module is used to perform preliminary processing on the image; in the encoding stage, the encoder consists of two sub-trunk networks, each of which contains a position-aware circular convolution block, a dual-branch reverse residual module, a dual attention module, and a connection block; the connection block in the first sub-trunk network performs feature fusion on the feature map output by the network and serves as the input of the second sub-trunk network. The output of the connection block in the second sub-trunk network is spliced ​​with the multi-scale feature image output by the network and serves as the input of the decoder; in the decoding stage, the segmentation head is used to refine the multi-scale features of the multi-scale feature image, and the final prediction result is obtained by bilinear interpolation. S02. Prepare training and test sets: Randomly crop the images in the public dataset Crack500 into non-overlapping images with a resolution of 640×360 pixels to obtain 3364 new road crack images. Divide these images into two groups of images, group A and group B, in a ratio of 8:

2. Select 2690 images in group A as the training set, and use four methods of rotation, flipping, brightness enhancement, and contrast enhancement to perform data enhancement on the training set. The 674 images in group B and the public dataset DeepCrack537 were selected as the test sets; the images in group B were used to test the prediction effect of PACNet when facing similar cracks and test the recognition ability of PACNet, and the public dataset DeepCrack537 was used to test the prediction effect of PACNet when facing unfamiliar cracks and test the generalization ability of PACNet; S03, training PACNet: using the training set prepared in step S02 for PACNet training; The training process is as follows: the road crack images in the training set and their corresponding true labels are used as the input of PACNet; images and their corresponding true labels are randomly selected from the training set at a ratio of 5:1 as the validation set; the learning rate, training rounds and optimizer of PACNet are set, the initial learning rate is set to 1e-4, the learning rate adjustment strategy is used to automatically adjust the learning rate during training, the training rounds are set to 100, stochastic gradient descent is used as the optimizer, the momentum is set to 0.9, the weight decay is set to 1e-4, the PACNet weights and biases are continuously updated, the optimal weights are found, and the final trained PACNet is obtained; S04. Test PACNet: Input the test set images to test the trained PACNet and verify the comprehensive segmentation performance of PACNet; use precision, recall rate and F1 score to evaluate the comprehensive segmentation performance of PACNet; S05. Output crack segmentation results: Save the prediction image of PACNet in PNG format. The prediction image is a black and white binary pixel image, where white represents the crack area and black represents the background area. The evaluation index of each image is saved in a csv file, and the average index of all images recognized by PACNet is calculated as the final evaluation index of the test set.

2. The pavement crack detection method based on position-aware circular convolution and cascade fusion according to claim 1 is characterized in that: In step S01, the preprocessing stage performs a downsampling operation on the input image, uses a decoupled downsampling module to decouple the downsampling operation, uses a common convolution block to generate a shared feature map, and splits the convolution and pooling operations into two paths to downsample the shared feature map respectively. The specific process is as follows: ; in, represents the original input image, for , , The convolution operation, For batch normalization, is the output of the common convolutional block, is the point convolution operation, is a linear rectification function, is the output of the convolution path, is the maximum pooling operation, is the output of the pooling path, for Splicing operation, for , , The convolution operation, is the output of the decoupled downsampling module.

3. The pavement crack detection method based on position-aware circular convolution and cascade fusion according to claim 2 is characterized in that: In step S01, feature extraction is performed in the encoding stage. The position-aware circular convolution block uses the improved position-aware circular convolution ParC based on the convolutional neural network to extract the global feature information of the pavement crack image. ParC has two types: vertical and horizontal. The vertical direction is ParC-V, covering all pixels in the same column, and the horizontal direction is ParC-H, covering all pixels in the same row. The global feature information is obtained by jointly using ParC-V and ParC-H. Assuming that the shape of the input feature image x is c×h×w, c is the number of channels of the current input feature image, the output of ParC-V for the pixel point (i, j) is as follows: ; in, Encodes the instance position in the vertical direction, A collection of vertical position codes; is a bilinear interpolation function used to adjust the size of the position encoding to the size of the input; Encode the position of vertical extension; is the expansion function in the vertical direction, copy After that, splice in the horizontal direction to generate ; is the instance kernel of each vertical feature matrix, It is a collection of vertical feature matrix instance kernels, which enables PACNet to better understand and process data; and Add together to get the input after embedding the vertical position code ; t is a variable, (i+t) modh represents the horizontal coordinate of x in the feature map; The process can be expressed more directly in code: , F.conv2D() represents a two-dimensional convolution operation, and torch.cat() represents a concatenation operation function; is the h-1th pixel position in the vertical feature matrix, and h is the height of the vertical feature matrix; is the instance kernel corresponding to the h-1th pixel position in the vertical feature matrix; Similarly, the output of ParC-H for pixel (i, j) can be expressed as: ; in, is the horizontal instance position code, is a set of horizontal position codes; Encode the position of horizontal expansion; is the horizontal expansion function, After copying h times, splice along the vertical direction to generate ; is the instance kernel of each horizontal feature matrix, is the set of horizontal feature matrix instance kernels; and Add to get the input after embedding the horizontal position code ; (j+t) modw represents the ordinate of x in the feature map; The process is expressed in code as follows: ; is the w-1th pixel position in the horizontal feature matrix, w is the width of the horizontal feature matrix; is the instance kernel corresponding to the w-1th pixel position in the horizontal feature matrix.

4. The pavement crack detection method based on position-aware circular convolution and cascade fusion according to claim 3 is characterized in that: In step S01, in view of the complex background in the pavement crack image, a dual-branch reverse residual module and a dual attention module are added to the encoder; the dual attention module captures details from the spatial direction and the channel direction, so that PACNet pays more attention to the crack area; the dual attention module capture process is as follows: ; in is the result of adding the convolution operation and the point convolution operation. is the dot multiplication operation, is the normalization function, Used after point convolution operation The result of processing, GAP() is the global average pooling, is a S-type nonlinear activation function, yes The output of , FC() is the fully connected layer, It is used after the fully connected layer The output, is the output of the dual attention module; The dual-branch reverse residual module increases the feature information contained in the feature map by expanding the number of feature map channels, and then uses convolution operations to remove excess noise; the specific process of the dual-branch reverse residual module is as follows: ; in, is the output of the dual-branch reverse residual module.

5. The pavement crack detection method based on position-aware circular convolution and cascade fusion according to claim 4 is characterized in that: In step S01, from the perspective of the entire encoding process, the first connection block is in the feature extraction operation, and the second connection block is used for the final feature fusion. Therefore, the two connection blocks and the middle sub-trunk network can be regarded as fusion modules. The sub-trunk network located after the first connection block, all its parameters participate in both feature extraction and feature fusion. The specific operations of the connection blocks are as follows: ; in, It is the feature map output by the dual attention module DAM. It is the feature map output by the position-aware circular convolution block Parc Block. The output of the connection block.

6. The pavement crack detection method based on position-aware circular convolution and cascade fusion according to claim 5 is characterized in that: In step S01, in the decoding stage, the segmentation head uses two sets of convolution blocks to process the output of the encoding stage, adds a residual connection operation, and uses bilinear interpolation to upsample the result of the residual connection to obtain the final prediction result; the specific process of the segmentation head is as follows: ; in, is the bilinear interpolation function, is the output of the segmentation head.

7. The pavement crack detection method based on position-aware circular convolution and cascade fusion according to claim 1 is characterized in that: In step S04, the calculation formulas for precision, recall and F1 score are as follows: ; Among them, TP represents the positive sample predicted by PACNet as the positive class, FP represents the negative sample predicted by PACNet as the positive class, and FN represents the positive sample predicted by PACNet as the negative class; The evaluation of PACNet's comprehensive segmentation performance is measured by intersection-over-union ratio and accuracy. The calculation formulas for intersection-over-union ratio and accuracy are as follows: ; Where TN represents the negative samples predicted by PACNet as negative classes.

8. The method for pavement crack detection based on location-aware circular convolution and cascade fusion according to claim 1, characterized in that: In step S04, the evaluation of PACNet's comprehensive segmentation performance also includes the number of parameters, the amount of computation, and the running speed. The stat() function in the torchstat library is used to count the number of parameters and the amount of computation of PACNet. The code is torchstat.stat(). While testing the performance of PACNet on the test set, the test time spent is recorded. When PACNet starts testing, the current time is recorded as the start time. After the test of the last test image is completed, the completion time is recorded, the time difference between the completion time and the start time is calculated, and the running speed of PACNet processing one image is estimated based on the number of processed images.