Road damage identification method and device based on RD-YOLO network

Through the method based on the RD-YOLO network, channel-by-channel convolution and multi-scale interactive fusion modules are used to solve the problems of irregular shapes and non-uniform scales in road disease detection, and achieve accurate identification and efficient detection of road diseases.

CN118429329BActive Publication Date: 2024-09-27STREAMAP TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410815858.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-24
Publication Date
2024-09-27
Estimated Expiration
2044-06-24

AI Technical Summary

Technical Problem

Existing road disease detection methods have poor detection results and are difficult to accurately identify due to the irregular shapes and difficult-to-unify scales of road diseases.

Method used

Using a method based on the RD-YOLO network, road images are obtained and input into the pre-established RD-YOLO network model, and the channel-by-channel convolution module, channel spatial residual attention mechanism module and multi-scale interactive fusion module are used to enhance features. Maps and adaptively select features for fusion to achieve accurate identification of road diseases.

Benefits of technology

It improves the accuracy and efficiency of road disease detection, can better handle targets of different scales and shapes, reduces the amount of calculation and parameters, reduces the model's dependence on hardware resources, and makes detection more efficient and reliable.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118429329B
    Figure CN118429329B
Patent Text Reader

Abstract

The embodiment of the present application provides a road damage identification method and device based on the RD-YOLO network, which obtains an image of a road to be identified; inputs the image into a pre-established RD-YOLO network model to determine the road damage category, wherein the RD-YOLO network model includes: a backbone network, a neck network and a detection head connected in sequence, the backbone network includes: a channel-by-channel convolution module, the channel-by-channel convolution module is used to convolve the features of each channel using a convolution kernel, the neck network includes: a channel space residual attention mechanism module and a multi-scale interactive fusion module, the channel space residual attention mechanism module is used to enhance the feature map, and the multi-scale interactive fusion module is used to adaptively select features according to targets of different scales for fusion, so as to realize more accurate identification of road damage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the technical field of road damage detection, and in particular, relates to a road damage identification method and device based on RD-YOLO network. Background Art

[0002] With the continuous advancement of urbanization and the growing transportation tasks, roads, as an important part of infrastructure, bear huge traffic pressure. However, during the use of roads, due to the influence of various factors, such as the natural environment, traffic load, material aging, etc., various defects such as cracks, potholes, and subsidence will gradually appear in the road structure. These defects will not only affect the safety and comfort of road traffic, but also reduce the service life of the road and increase maintenance costs. With the continuous advancement and innovation of science and technology, road disease diagnosis technology is also constantly developing. From the initial manual inspection and field survey to the current application of technical means such as automated detection and intelligent identification, the existing detection methods still have the problem of poor detection effect due to the irregular shape of road diseases and the difficulty in unifying the size of the scale. Summary of the invention

[0003] In response to the above problems, the embodiments of the present application provide a road damage identification method and device based on the RD-YOLO network, which can achieve relatively accurate identification of road damage.

[0004] The embodiment of the present application provides a road damage identification method based on the RD-YOLO network, including:

[0005] Acquire an image of a road to be identified;

[0006] The image is input into a pre-established RD-YOLO network model to determine the disease category of the road, wherein the RD-YOLO network model includes: a backbone network, a neck network and a detection head connected in sequence, the backbone network includes: a channel-by-channel convolution module, the channel-by-channel convolution module is used to convolve the features of each channel using a convolution kernel, and splice the features of each channel after the convolution, the neck network includes: a channel space residual attention mechanism module and a multi-scale interactive fusion module, the channel space residual attention mechanism module is used to enhance the feature map, and the multi-scale interactive fusion module is used to adaptively select features for fusion according to targets of different scales.

[0007] In some embodiments, the channel-by-channel convolution module includes: a first channel-by-channel convolution module, a second channel-by-channel convolution module, a third channel-by-channel convolution module, a fourth channel-by-channel convolution module and a fifth channel-by-channel convolution module, and the backbone network also includes: a first channel intelligent selection module, a second channel intelligent selection module, a third channel intelligent selection module, a fourth channel intelligent selection module and a spatial pyramid pooling module, the first channel-by-channel convolution module is used to input an image, the first channel-by-channel convolution module, the second channel-by-channel convolution module, the first channel intelligent selection module, the third channel-by-channel convolution module, the second channel intelligent selection module, the fourth channel-by-channel convolution module, the third channel intelligent selection module, the fifth channel-by-channel convolution module, the fourth channel intelligent selection module and the spatial pyramid pooling module are connected in sequence, the second channel intelligent selection module is used to output the first feature information to the neck network, the third channel intelligent selection module is used to output the second feature information to the neck network, and the spatial pyramid pooling module is used to output the third feature information to the neck network.

[0008] In some embodiments, the neck network also includes: a feature pyramid network module, the feature pyramid network module, the channel space residual attention mechanism module and the multi-scale interactive fusion module are connected in series in sequence, the input of the feature pyramid network module is the output of the second channel intelligent selection module, the third channel intelligent selection module and the spatial pyramid pooling module, and different feature information is output to the channel space residual attention mechanism module respectively.

[0009] In some embodiments, the channel spatial residual attention mechanism module includes: a channel attention mechanism module and a spatial attention mechanism module connected in sequence, the input of the channel attention mechanism module is the output of the feature pyramid network module, wherein the channel attention mechanism module is used to determine the weight of each channel, and weightedly process the features of each channel based on the weight of each channel to enhance or weaken the feature information of each channel, and the spatial attention mechanism module is used to determine the weight in the spatial direction, and weight the feature information in different spatial directions based on the weight in the spatial direction to highlight important areas.

[0010] In some embodiments, the channel attention mechanism module determines the weight of each channel by a first mathematical expression, wherein the first mathematical expression includes:

[0011]

[0012] in, It is a feature The result after average pooling in the channel direction is: It is a feature The result after the maximum pooling in the channel direction, is the weight of the fully connected layer in the channel attention mechanism module, is the ReLU activation function, is the Sigmoid activation function, which is used to normalize the weights to between 0 and 1.

[0013] In some embodiments, the spatial attention mechanism module determines the weight in the spatial direction by a second mathematical expression, wherein the second mathematical expression includes:

[0014]

[0015] in, It is a feature The result after average pooling in the spatial direction is It is a feature The result after the maximum pooling in the spatial direction, Represents a convolution operation with a kernel size of 1 and a stride of 1.

[0016] In some embodiments, the feature pyramid network module includes: an FPN module or a PAN module.

[0017] The present application embodiment provides a road disease identification device, comprising:

[0018] An acquisition module, used for acquiring an image of a road to be identified;

[0019] A determination module is used to input the image into a pre-established RD-YOLO network model to determine the disease category of the road, wherein the RD-YOLO network model includes: a backbone network, a neck network and a detection head connected in sequence, the backbone network includes: a channel-by-channel convolution module, the channel-by-channel convolution module is used to convolve the features of each channel using a convolution kernel, the neck network includes: a channel space residual attention mechanism module and a multi-scale interactive fusion module, the channel space residual attention mechanism module is used to enhance the feature map, and the multi-scale interactive fusion module is used to adaptively select features for fusion according to targets of different scales.

[0020] An embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any of the above-described methods when executing the computer program.

[0021] An embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, any of the above-mentioned methods is implemented.

[0022] An embodiment of the present application provides a computer program product. When the computer program product is executed on a terminal device, the electronic device executes any one of the above methods.

[0023] The embodiments of the present application provide a road damage identification method, device, electronic device and storage medium based on the RD-YOLO network, which obtain an image of a road to be identified; input the image into a pre-established RD-YOLO network model to determine the road damage category, wherein the RD-YOLO network model includes: a backbone network, a neck network and a detection head connected in sequence, the backbone network includes: a channel-by-channel convolution module, the channel-by-channel convolution module is used to convolve the features of each channel using a convolution kernel, the neck network includes: a channel space residual attention mechanism module and a multi-scale interactive fusion module, the channel space residual attention mechanism module is used to enhance the feature map, and the multi-scale interactive fusion module is used to adaptively select features according to targets of different scales for fusion, so as to realize more accurate identification of road damage. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Hereinafter, the present application will be described in more detail based on embodiments and with reference to the accompanying drawings.

[0025] Figure 1 A schematic diagram of the implementation process of a road damage identification method based on RD-YOLO network provided for the implementation of this application;

[0026] Figure 2 A structural diagram of a DWC module provided in an embodiment of the present application;

[0027] Figure 3 A schematic diagram of a processing flow of a multi-scale fusion interaction module provided in an embodiment of the present application;

[0028] Figure 4 A schematic diagram of the structure of an RD-YOLO network model provided in an embodiment of the present application;

[0029] Figure 5 A schematic diagram of a processing flow of a channel attention mechanism module provided in an embodiment of the present application;

[0030] Figure 6 A schematic diagram of a processing flow of a spatial attention mechanism module provided in an embodiment of the present application;

[0031] Figure 7 A schematic diagram of the structure of a road damage identification device provided in an embodiment of the present application;

[0032] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0033] In the drawings, the same components use the same selection of welding guns, and the drawings are not drawn according to the actual scale. DETAILED DESCRIPTION

[0034] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.

[0035] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0036] If similar descriptions of "first\second\third" appear in the application documents, the following instructions are added. In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged in a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0037] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0038] Based on the problems existing in the related art, the embodiment of the present application provides a road damage identification method based on the RD-YOLO network. The road damage identification method based on the RD-YOLO network provided in the embodiment of the present application can be applied to electronic devices such as mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, laptops, ultra-mobile personal computers (UMPC), netbooks, personal digital assistants (PDA), etc. The embodiment of the present application does not impose any restrictions on the specific types of electronic devices.

[0039] The functions implemented by the road damage identification method based on the RD-YOLO network provided in the embodiment of the present application can be implemented by calling a program code by a processor of an electronic device, wherein the program code can be stored in a computer storage medium.

[0040] The present application embodiment provides a road damage identification method based on RD-YOLO network. Figure 1 A schematic diagram of the implementation process of a road damage identification method based on RD-YOLO network provided for the implementation of this application is as follows: Figure 1 As shown in the figure, the road damage recognition method based on RD-YOLO network includes:

[0041] Step S101, obtaining an image of a road to be identified.

[0042] In the embodiment of the present application, the image of the road to be identified can be acquired by shooting with a camera, a drone or other image acquisition equipment.

[0043] In some embodiments, when using a camera, the camera may be placed on a vehicle, and the image to be identified may be collected by moving the vehicle. The image may include: a picture or a video.

[0044] In some embodiments, the electronic device may also obtain images of the road to be identified via the Internet.

[0045] Step S102: input the image into a pre-established RD-YOLO network model to determine the road damage category.

[0046] In the embodiment of the present application, the image can be input into the pre-established RD-YOLO network model, and after being processed by the model, the disease category of the road is determined. In the embodiment of the present application, the full name of RD-YOLO is: Road Disease-YouOnly Look Once, which is a road disease detection model and is a target detection algorithm based on deep learning.

[0047] In the embodiment of the present application, the damage category may include: one or more of sink, longitudinal crack (crack_p), longitudinal crack patch (patch_crack_p), transverse crack (crack_t), transverse crack patch (patch_crack_t), net crack (net), and net crack patch (patch_net).

[0048] In an embodiment of the present application, the RD-YOLO network model includes: a backbone network, a neck network and a detection head connected in sequence, the backbone network includes: a channel-by-channel convolution module, the channel-by-channel convolution module is used to convolve the features of each channel using a convolution kernel, and splice the features of each channel after the convolution, the neck network includes: a channel space residual attention mechanism module and a multi-scale interactive fusion module, the channel space residual attention mechanism module is used to enhance the feature map, and the multi-scale interactive fusion module is used to adaptively select features for fusion according to targets of different scales.

[0049] In the embodiment of the present application, the feature may be a feature graph.

[0050] In the embodiment of the present application, the channel-by-channel convolution DWC module uses a convolution kernel to perform convolution on each input channel, thereby reducing the number of parameters to reduce the amount of calculation. Figure 2 A structural diagram of a DWC module provided in an embodiment of the present application is shown in FIG. Figure 2 As shown in the figure, each input corresponds to a convolution kernel (Filter), and each convolution kernel corresponds to a feature map MAP. The ordinary convolution layer extracts local features from the input data through convolution operations, and further processes and analyzes these features. Compared with traditional convolution operations, it is particularly important for improving the operating efficiency of the model, especially on resource-constrained devices. If the input feature map has Then for the first input channels and the corresponding convolution kernel, output feature map Each pixel in a channel can be expressed as:

[0051] in, is the output feature map Channels at position The pixel value of is the size of the convolution kernel, It is The convolution kernels are located at The weight of is the input feature map No. Channels at position The pixel value of .

[0052] The channel-by-channel convolution DWC module converts this The output feature maps of the channels are concatenated in sequence to obtain a channel The output feature map of .

[0053] In the embodiment of the present application, the multi-scale fusion interaction module MFI is an improved feature pyramid network, which is used to enhance features. Compared with the traditional feature pyramid network FPN (Feature Pyramid Network), MFI can solve the problem of inconsistent prediction targets of the same feature layer during multi-scale prediction, and improves the performance of the RD-YOLO network model through the advantages of adaptive feature fusion, hierarchical feature representation, reduced computational complexity and strong scalability. MFI adaptively selects appropriate features for fusion according to targets of different scales through automatic learning. This adaptive feature fusion strategy can better handle targets of different scales and shapes and improve the performance of target detection. MFI reduces the amount of computation and parameters by reducing unnecessary feature calculations and redundant information, and improves the efficiency and performance of the model. This helps to reduce the model's dependence on hardware resources, making it more efficient and reliable in practical applications.

[0054] Figure 3 A schematic diagram of a processing flow of a multi-scale fusion interaction module provided in an embodiment of the present application is shown in FIG. Figure 3 As shown, the feature map level1 with stride=32 is recorded as , the feature map level2 with stride=16 is recorded as , and record the feature map level 3 with stride=8 as . It represents the fusion interaction of three scales at level 1. It represents the fusion interaction of three scales at level 2. Represents the fusion interaction of three scales at level 3.

[0055] for Operation, see equation (1) to equation (3):

[0056]

[0057]

[0058]

[0059] for Operation, see equation (4) to equation (6):

[0060]

[0061]

[0062]

[0063] for Operation, see formula (7)-formula (9):

[0064]

[0065]

[0066]

[0067] in, is a maximum pooling operation with a stride of 2, is a convolution operation with a kernel size of 3 and a stride of 2. is the Softmax function, concat is the concatenation operation, is an upsampling operation with a multiple of 2, is an upsampling operation with a multiple of 4, yes The output after the operation, yes The output after the operation, yes Output after the operation.

[0068] In the embodiment of the present application, by accessing the MFI module, the problem of difficulty in unifying the scales of road damage can be solved, and multi-scale features can be fused adaptively.

[0069] In the embodiment of the present application, the RD-YOLO network model can be constructed by improving the YOLO series network. The network can be trained using a sample data set to obtain the RD-YOLO network model, which can detect and identify road surface images taken by the vehicle-mounted camera in real time, and automatically classify and locate the detected road diseases.

[0070] The embodiment of the present application provides a road damage identification method based on the RD-YOLO network, which obtains an image of a road to be identified; inputs the image into a pre-established RD-YOLO network model to determine the road damage category, wherein the RD-YOLO network model includes: a backbone network, a neck network and a detection head connected in sequence, the backbone network includes: a channel-by-channel convolution module, the channel-by-channel convolution module is used to convolve the features of each channel using a convolution kernel, the neck network includes: a channel space residual attention mechanism module and a multi-scale interactive fusion module, the channel space residual attention mechanism module is used to enhance the feature map, and the multi-scale interactive fusion module is used to adaptively select features according to targets of different scales for fusion, so as to realize more accurate identification of road damage.

[0071] In some embodiments, the channel-by-channel convolution module includes: a first channel-by-channel convolution module, a second channel-by-channel convolution module, a third channel-by-channel convolution module, a fourth channel-by-channel convolution module and a fifth channel-by-channel convolution module, and the backbone network also includes: a first channel intelligent selection module, a second channel intelligent selection module, a third channel intelligent selection module, a fourth channel intelligent selection module and a spatial pyramid pooling module, the first channel-by-channel convolution module is used to input an image, the first channel-by-channel convolution module, the second channel-by-channel convolution module, the first channel intelligent selection module, the third channel-by-channel convolution module, the second channel intelligent selection module, the fourth channel-by-channel convolution module, the third channel intelligent selection module, the fifth channel-by-channel convolution module, the fourth channel intelligent selection module and the spatial pyramid pooling module are connected in sequence, the second channel intelligent selection module is used to output the first feature information to the neck network, the third channel intelligent selection module is used to output the second feature information to the neck network, and the spatial pyramid pooling module is used to output the third feature information to the neck network.

[0072] In an embodiment of the present application, the channel intelligent selection module may be a CSP (Cross Stage Partial) layer. The CSP Layer is a cross-stage local feature rematching technology used to improve feature reuse and information flow of neural networks. The CSP Layer can effectively reuse features extracted from different stages, thereby improving the feature utilization and generalization ability of the model. By establishing connections between local features between different stages, the CSP Layer can promote better transmission and exchange of information, thereby enhancing the learning ability and performance of the model. The CSP Layer can help deepen the depth of the network and improve the representation ability and learning effect of the model. By introducing a cross-stage partial feature rematching mechanism, the CSP Layer can effectively improve the feature reuse ability of the neural network, and is conducive to the transmission of information and the increase of network depth, thereby improving the performance and generalization ability of the model.

[0073] In an embodiment of the present application, the spatial pyramid pooling module may be SPPF (Spatial Pyramid Pooling Fusion), which is a spatial pyramid pooling technology for processing images or feature maps with unfixed input sizes. SPPF can encode inputs of different sizes on a fixed-size output by dividing the image or feature map into grids of different sizes and performing a pooling operation within each grid. SPPF can help neural networks maintain the richness of spatial information when processing inputs of different sizes.

[0074] In the embodiment of the present application, the first feature, the second feature and the third feature may be feature graphs of different scales.

[0075] Figure 4 A schematic diagram of the structure of an RD-YOLO network model provided in an embodiment of the present application is shown in FIG. Figure 4 As shown in the figure, the channel-by-channel convolution module is represented by C2RFC, the channel intelligent selection module is represented by C2F, the spatial pyramid pooling module is represented by SPPF, Backbone is the backbone network, Neck is the neck network, and Head is the detection head.

[0076] In some embodiments, the neck network also includes: a feature pyramid network module, the feature pyramid network module, the channel space residual attention mechanism module and the multi-scale interactive fusion module are connected in series in sequence, the input of the feature pyramid network module is the output of the second channel intelligent selection module, the third channel intelligent selection module and the spatial pyramid pooling module, and different feature information is output to the channel space residual attention mechanism module respectively.

[0077] In the present application, see Figure 4 , the feature pyramid network module can be an FPN (FeaturePyramid Network) module and / or a PAN (Path Aggregation Network) module. In the embodiment of the present application, the FPN module is mainly used to process multi-scale target detection tasks and extract and utilize features at different scales of the image. The FPN module realizes feature transfer and information fusion from shallow to deep layers by constructing a pyramid feature map between different network layers. FPN effectively integrates multi-scale features through top-down feature propagation and bottom-up semantic information enhancement, thereby improving the performance and accuracy of target detection. The PAN module is a network module for semantic segmentation tasks, which realizes information propagation and integration by constructing aggregation paths between different network layers. In the process of semantic segmentation, the PAN module achieves more accurate pixel-level classification by aggregating multi-scale feature information and contextual information. The PAN module improves the pixel accuracy and segmentation effect of the semantic segmentation task through bottom-up information transfer and aggregation.

[0078] In some embodiments, the channel spatial residual attention mechanism module includes: a channel attention mechanism module and a spatial attention mechanism module connected in sequence, the input of the channel attention mechanism module is the output of the feature pyramid network module, wherein the channel attention mechanism module is used to determine the weight of each channel, and weightedly process the features of each channel based on the weight of each channel to enhance or weaken the feature information of each channel, and the spatial attention mechanism module is used to determine the weight in the spatial direction, and weight the feature information in different spatial directions based on the weight in the spatial direction to highlight important areas.

[0079] In an embodiment of the present application, the channel-space residual attention mechanism CSRA module is a residual attention mechanism module that combines channels and space. Starting from the two scopes of channel and spatial, it introduces two analysis dimensions of spatial attention and channel attention to realize the sequential residual attention structure from channel to space. The channel attention mechanism module usually focuses on the importance of features on different channels and is used to process the distribution relationship of feature map channels. The spatial attention mechanism module focuses on the pixel areas in the image that play a decisive role in classification and ignores insignificant areas. The combination of the two allows the RD-YOLO network model to perform adaptive feature recalibration (re-calibration) from both channel and spatial dimensions, thereby more effectively extracting information and improving the performance of the model. At the same time, two forms of attention mechanisms are integrated into the residual learning framework to enhance the model's fine-grained processing capabilities for features.

[0080] In an embodiment of the present application, the channel attention mechanism module can be represented by a CRA module, the spatial attention mechanism module can be represented by an SRA module, and the channel spatial residual attention mechanism module can be represented by a CSRA.

[0081] In the embodiment of the present application, the CSRA module is composed of a CRA module and an SRA module connected in series in sequence. There is no large number of convolution structures inside, only a small number of pooling layers and feature fusion operations, which avoids the large amount of calculations caused by convolution multiplication, making its module low in complexity and small in calculation amount.

[0082] In an embodiment of the present application, the channel attention mechanism module enhances or weakens the information of certain channels by weighting the features of each channel. Figure 5 A processing flow diagram of a channel attention mechanism module provided in an embodiment of the present application is shown in FIG. Figure 5 As shown, determining the weight of each channel can be achieved by compressing the spatial dimension and applying global average pooling (AVGPOOL) and global maximum pooling (MAXPOOL) operations. Then, the weight of each channel is calculated through a series of fully connected layers and activation functions, and the intermediate feature (Mid feature) is determined by the weight of each channel. Some series of fully connected layers may include: MLP (Multi-layer Perceptron), MLP is a basic neural network structure in deep learning.

[0083] In the embodiment of the present application, the channel attention mechanism module determines the weight of each channel through a first mathematical expression, and the first mathematical expression includes:

[0084]

[0085] in, It is a feature The result after average pooling in the channel direction is: It is a feature The result after the maximum pooling in the channel direction, is the weight of the fully connected layer in the channel attention mechanism module, is the ReLU activation function, is the Sigmoid activation function, which is used to normalize the weights to between 0 and 1.

[0086] In an embodiment of the present application, the spatial attention mechanism module focuses on different areas of the feature map and highlights important areas by weighting features at different spatial positions.

[0087] Figure 6 A schematic diagram of a processing flow of a spatial attention mechanism module provided in an embodiment of the present application is shown in FIG. Figure 6 As shown in the figure, after obtaining the intermediate feature (Mid feature), global average pooling and global maximum pooling operations are performed, and then the weight of each spatial direction is calculated through a series of fully connected layers and activation functions, and finally the feature (Output feature) is output.

[0088] In the embodiment of the present application, the spatial attention mechanism module determines the weight in the spatial direction through a second mathematical expression, wherein the second mathematical expression includes:

[0089] in, It is a feature The result after average pooling in the spatial direction is It is a feature The result after the maximum pooling in the spatial direction, Represents a convolution operation with a kernel size of 1 and a stride of 1.

[0090] In the embodiment of the present application, the channel space residual attention module is constructed by connecting the channel attention mechanism module and the spatial attention mechanism module in series. The final output feature map can be expressed as:

[0091]

[0092] in, and They are the normalized weights obtained by the channel attention mechanism module and the spatial attention mechanism module, respectively, which are multiplied by the original feature map And the feature map is enhanced by element-wise addition.

[0093] In an embodiment of the present application, the channel attention mechanism module and the spatial attention mechanism module are integrated to obtain a channel space module, so as to perform targeted attention learning on the problem of irregular shapes of road defects.

[0094] Continue to see Figure 4 In an embodiment of the present application, the detection head may include a Conv (convolution) layer, a BN (BatchNormalization) layer, and a SILU (Sigmoid-Weighted Linear Unit) layer, wherein the Conv layer is used to extract features from the input feature map, and the convolution operation extracts local information on the input feature map by sliding a convolution kernel (filter), and then obtains the output feature map through the convolution operation. The BN layer uses a normalization technique for neural networks, which can accelerate the convergence of the network and improve the generalization ability of the network. The BN layer standardizes each channel of each feature map, reducing the internal covariate shift. In the SILU layer, SILU is an activation function that introduces the characteristics of the Sigmoid function while retaining the nonlinear characteristics of ReLU. The SILU function is defined as f(x) = x *sigmoid(x). Compared with the simple threshold function of ReLU, SILU reduces the problem of gradient disappearance to a certain extent, making the gradient update smoother, which is helpful for training deep neural networks. SILU is connected to the loss function. In the embodiment of the present application, the sequence is Conv-BN-SILU, which means convolution first, batch normalization second, and SILU activation last. Such a structure can help improve the performance and generalization ability of the network and accelerate the training and optimization process of the network. The output of the SILU layer is the input of the loss function. The loss function in the detection head includes: regression loss and classification loss.

[0095] In some embodiments, before step S102, the method further includes:

[0096] Step S1021, obtaining a sample data set.

[0097] In the embodiment of the present application, the sample data set may be a data set of road damage.

[0098] Road damage is marked in the images in the sample data set. In the embodiment of the present application, a camera or other image acquisition device can be used to capture images in the real world. The captured images are labeled to mark the road damage. Special image annotation tools such as LabelImg, CVAT, etc. can be used to annotate the road damage in each image. The annotated images and the corresponding annotation data are then organized into a data set. Once the sample data set is obtained, it can be used to train the RD-YOLO network model.

[0099] In the embodiment of the present application, the sample data set includes 7 types of road diseases: sink, longitudinal crack (crack_p), longitudinal crack patch (patch_crack_p), transverse crack (crack_t), transverse crack patch (patch_crack_t), net crack (net), and net crack patch (patch_net). At the same time, it also includes pictures of multiple complex scenes such as multiple cities, multiple road sections, and multiple time periods.

[0100] Step S1022, training the initial RD-YOLO network model based on the sample data set to obtain the RD-YOLO network model.

[0101] In the embodiment of the present application, the sample data set can be preprocessed, and the preprocessing may include operations such as scaling, cropping, and rotating the image, as well as formatting and processing the labeled data to make it suitable for the training requirements of the RD-YOLO network model. Then the initial RD-YOLO network model can be selected, and the selected initial RD-YOLO network model is trained using the sample data set. During the training process, the model will learn how to accurately detect road diseases in the image through multiple iterations. During the training process, the hyperparameters of the model may need to be tuned to obtain better performance. This may include adjustment of hyperparameters such as learning rate, batch size, and number of iterations. The RD-YOLO network model obtained by training needs to be evaluated. Then the model with the best performance on the validation set evaluation index is used as the final RD-YOLO network model, which can be deployed in practical applications for abnormal urban facilities.

[0102] In some embodiments, step S1022 may be implemented by the following steps:

[0103] Step S1, divide the sample data set into a training set and a validation set.

[0104] In the embodiment of the present application, the training set accounts for the majority of the total data set (eg, 70-80%), while the validation set accounts for a smaller portion (20-30%).

[0105] Step S2, training the initial RD-YOLO network model based on the training set, and testing the trained initial RD-YOLO network model through the validation set to obtain an evaluation index.

[0106] In the embodiment of the present application, the initial RD-YOLO network model is trained using the training set, and the model training and tuning are performed according to the steps mentioned above.

[0107] In the embodiment of the present application, the evaluation index may include: one or more of precision, recall, average precision, and average precision mean, wherein the calculation method of the evaluation index is as follows:

[0108] Precision (P), also known as the accuracy rate, refers to the proportion of correctly predicted road damage to all predicted road damage, as shown in the formula:

[0109] , where TP is the number of samples predicted by the model as positive and actually positive; FP is the number of samples predicted by the model as positive but actually negative.

[0110] Recall (R), also known as the recall rate, refers to the proportion of correctly predicted road damage to all actual road damage, as shown in the formula:

[0111] , where FN represents false negatives, that is, the number of samples that the model predicts to be negative but are actually positive.

[0112] Average precision (AP) is calculated from precision and recall. Draw a line graph of precision based on the recall value and calculate the area under the line, as shown in the formula:

[0113] .

[0114] The mean average precision (mAP) is the average of the average precision AP of different road damage categories, as shown in the formula:

[0115] .

[0116] Step S3, when the evaluation index meets the optimal requirement, the trained initial RD-YOLO network model is determined as the RD-YOLO network model.

[0117] In the embodiment of the present application, if the performance of the model does not meet the requirements, it may be necessary to adjust the structure, hyperparameters, etc. of the model and then retrain and evaluate the model.

[0118] Based on the aforementioned RD-YOLO network model, the RD-YOLO network model and the YOLOv8s network were used to perform model training on the self-built data set, and the performance on the validation set was statistically analyzed. The comparison of the evaluation indicators is shown in the following table, wherein, during the verification, the hardware environment for the experimental run was: the processor was Intel(R) Xeon(R) Platinum 8255C CPU, 314 G memory, the graphics card was NVIDIA Tesla V100 32 G, CentOS 8.5.2 64-bit operating system, and the deep neural network was built on the PyTorch deep learning framework. The input image size of the network is [640,640], and a multi-scale training mode is adopted. The data input batch is 64, the training epoch is 300, and the AdamW optimizer with an initial learning rate of 0.01 and a cosine decay strategy are adopted. Table 1 is a comparison table of evaluation indicators provided in an embodiment of the present application, as shown in Table 1,

[0119]

[0120] By analyzing the table, we can find that:

[0121] Compared with the YOLOv8s network, the RD-YOLO network model provided in the embodiment of the present application not only has fewer parameters and less computation, but also has a 0.6% increase in precision P, a 2.6% increase in recall R, and a 1.5% increase in mAP0.5. Compared with the YOLOv8s network, the RD-YOLO network model provided in the embodiment of the present application has the greatest improvement in the three categories of subsidence, longitudinal crack patches, and network crack patches, with mAP increased by 2.6%, 2.2%, and 4.1%, respectively.

[0122] The experimental results show that the RD-YOLO network model solves the problems of complex shapes and non-uniform scales of road damage to a certain extent, thereby improving the detection accuracy of road damage.

[0123] Based on the foregoing embodiments, the embodiments of the present application provide a road defect identification device, and the modules included in the device and the units included in each module can be implemented by a processor in a computer device; of course, they can also be implemented by a specific logic circuit; in the implementation process, the processor can be a central processing unit (CPU, Central Processing Unit), a microprocessor (MPU, Microprocessor Unit), a digital signal processor (DSP, Digital Signal Processing) or a field programmable gate array (FPGA, Field Programmable Gate Array), etc.

[0124] The present application provides a road damage identification device. Figure 7 A schematic diagram of a road hazard identification device provided in an embodiment of the present application is shown in FIG. Figure 7 As shown, the road disease identification device 700 includes:

[0125] An acquisition module 701 is used to acquire an image of a road to be identified;

[0126] The determination module 702 is used to input the image into a pre-established RD-YOLO network model to determine the disease category of the road, wherein the RD-YOLO network model includes: a backbone network, a neck network and a detection head connected in sequence, the backbone network includes: a channel-by-channel convolution module, the channel-by-channel convolution module is used to convolve the features of each channel using a convolution kernel, and splice the features of each channel after the convolution, the neck network includes: a channel space residual attention mechanism module and a multi-scale interactive fusion module, the channel space residual attention mechanism module is used to enhance the feature map, and the multi-scale interactive fusion module is used to adaptively select features for fusion according to targets of different scales.

[0127] In some embodiments, the channel-by-channel convolution module includes: a first channel-by-channel convolution module, a second channel-by-channel convolution module, a third channel-by-channel convolution module, a fourth channel-by-channel convolution module and a fifth channel-by-channel convolution module, and the backbone network also includes: a first channel intelligent selection module, a second channel intelligent selection module, a third channel intelligent selection module, a fourth channel intelligent selection module and a spatial pyramid pooling module, the first channel-by-channel convolution module is used to input an image, the first channel-by-channel convolution module, the second channel-by-channel convolution module, the first channel intelligent selection module, the third channel-by-channel convolution module, the second channel intelligent selection module, the fourth channel-by-channel convolution module, the third channel intelligent selection module, the fifth channel-by-channel convolution module, the fourth channel intelligent selection module and the spatial pyramid pooling module are connected in sequence, the second channel intelligent selection module is used to output the first feature information to the neck network, the third channel intelligent selection module is used to output the second feature information to the neck network, and the spatial pyramid pooling module is used to output the third feature information to the neck network.

[0128] In some embodiments, the neck network also includes: a feature pyramid network module, the feature pyramid network module, the channel space residual attention mechanism module and the multi-scale interactive fusion module are connected in series in sequence, the input of the feature pyramid network module is the output of the second channel intelligent selection module, the third channel intelligent selection module and the spatial pyramid pooling module, and different feature information is output to the channel space residual attention mechanism module respectively.

[0129] In some embodiments, the channel spatial residual attention mechanism module includes: a channel attention mechanism module and a spatial attention mechanism module connected in sequence, the input of the channel attention mechanism module is the output of the feature pyramid network module, wherein the channel attention mechanism module is used to determine the weight of each channel, and weightedly process the features of each channel based on the weight of each channel to enhance or weaken the feature information of each channel, and the spatial attention mechanism module is used to determine the weight in the spatial direction, and weight the feature information in different spatial directions based on the weight in the spatial direction to highlight important areas.

[0130] In some embodiments, the channel attention mechanism module determines the weight of each channel by a first mathematical expression, wherein the first mathematical expression includes:

[0131]

[0132] in, It is a feature The result after average pooling in the channel direction is: It is a feature The result after the maximum pooling in the channel direction, is the weight of the fully connected layer in the channel attention mechanism module, is the ReLU activation function, is the Sigmoid activation function, which is used to normalize the weights to between 0 and 1.

[0133] In some embodiments, the spatial attention mechanism module determines the weight in the spatial direction by a second mathematical expression, wherein the second mathematical expression includes:

[0134] in, It is a feature The result after average pooling in the spatial direction is It is a feature The result after the maximum pooling in the spatial direction, Represents a convolution operation with a kernel size of 1 and a stride of 1.

[0135] In some embodiments, the feature pyramid network module includes: an FPN module or a PAN module.

[0136] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0137] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 8 As shown, the electronic device 3 of this embodiment may include: at least one processor 30 ( Figure 8 Only one processor 30 is shown in the figure), a memory 31, and a computer program 32 stored in the memory 31 and executable on at least one processor 30. When the processor 30 executes the computer program 32, the steps in any of the above-mentioned method embodiments are implemented, for example Figure 1 Steps S101 to S102 in the illustrated embodiment. Alternatively, when the processor 30 executes the computer program 32, the functions of each module / unit in the above-mentioned device embodiments are implemented, for example Figure 7 Functions of modules 701 to 702 are shown.

[0138] Exemplarily, the computer program 32 may be divided into one or more modules / units, one or more modules / units are stored in the memory 31, and are executed by the processor 30 to complete the present application. One or more modules / units may be a series of computer program 32 instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program 32 in the electronic device 3.

[0139] The embodiment of the present application further provides a computer-readable storage medium, which stores a computer program 32. When the computer program 32 is executed by the processor 30, the steps in the above-mentioned method embodiments can be implemented.

[0140] An embodiment of the present application provides a computer program product. When the computer program product runs on an electronic device, the electronic device can implement the steps in the above-mentioned method embodiments when executing the computer program product.

[0141] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. According to this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program 32, and the computer program 32 can be stored in a computer-readable storage medium. When the computer program 32 is executed by the processor 30, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program 32 includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the terminal, a recording medium, a computer memory, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), an electric carrier signal, a telecommunication signal, and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.

[0142] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0143] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0144] In the embodiments provided in the present application, it should be understood that the disclosed devices / network equipment and methods can be implemented in other ways. For example, the device / network equipment embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0145] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0146] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A road damage identification method based on RD-YOLO network, characterized in that: include: Acquire an image of a road to be identified; The image is input into a pre-established RD-YOLO network model to determine the disease category of the road, wherein the RD-YOLO network model includes: a backbone network, a neck network and a detection head connected in sequence, the backbone network includes: a channel-by-channel convolution module, the channel-by-channel convolution module is used to convolve the features of each channel using a convolution kernel, and splice the features of each channel after the convolution, the neck network includes: a channel space residual attention mechanism module and a multi-scale interactive fusion module, the channel space residual attention mechanism module is used to enhance the feature map, the multi-scale interactive fusion module is used to adaptively select features according to targets of different scales for fusion, and the channel-by-channel convolution module includes: A channel-by-channel convolution module, a second channel-by-channel convolution module, a third channel-by-channel convolution module, a fourth channel-by-channel convolution module and a fifth channel-by-channel convolution module, the backbone network also includes: a first channel intelligent selection module, a second channel intelligent selection module, a third channel intelligent selection module, a fourth channel intelligent selection module and a spatial pyramid pooling module, the first channel-by-channel convolution module is used to input an image, the first channel-by-channel convolution module, the second channel-by-channel convolution module, the first channel intelligent selection module, the third channel-by-channel convolution module, the second channel intelligent selection module, the fourth channel-by-channel convolution module, the third channel intelligent selection module, the fifth channel-by-channel convolution module, the fourth channel intelligent selection module, and the spatial pyramid pooling module are connected in sequence, the The second channel intelligent selection module is used to output the first feature information to the neck network, the third channel intelligent selection module is used to output the second feature information to the neck network, and the spatial pyramid pooling module is used to output the third feature information to the neck network. The neck network also includes: a feature pyramid network module, the feature pyramid network module, the channel space residual attention mechanism module and the multi-scale interactive fusion module are connected in series in sequence, the input of the feature pyramid network module is the output of the second channel intelligent selection module, the third channel intelligent selection module and the spatial pyramid pooling module, and different feature information is output to the channel space residual attention mechanism module respectively, and the channel space residual attention mechanism The module includes: a channel attention mechanism module and a spatial attention mechanism module connected in sequence, the input of the channel attention mechanism module is the output of the feature pyramid network module, wherein the channel attention mechanism module is used to determine the weight of each channel, and weight the features of each channel based on the weight of each channel to enhance or weaken the feature information of each channel, the spatial attention mechanism module is used to determine the weight in the spatial direction, and weight the feature information in different spatial directions based on the weight in the spatial direction to highlight the important area, the detection head includes: a Conv layer, a BN layer, and a SILU layer, the Conv layer, the BN layer, and the SILU layer are connected in sequence, the Conv layer is used to extract features from the input feature map,The BN layer normalizes each channel of each feature map, and the SILU layer is used for SILU activation.

2. The method according to claim 1, characterized in that The channel attention mechanism module determines the weight of each channel through a first mathematical expression, wherein the first mathematical expression includes: in, It is a feature The result after average pooling in the channel direction is: It is a feature The result after the maximum pooling in the channel direction, is the weight of the fully connected layer in the channel attention mechanism module, is the ReLU activation function, is the Sigmoid activation function, which is used to normalize the weights to between 0 and 1.

3. The method according to claim 1, characterized in that The spatial attention mechanism module determines the weight in the spatial direction through a second mathematical expression, wherein the second mathematical expression includes: in, It is a feature The result after average pooling in the spatial direction is It is a feature The result after the maximum pooling in the spatial direction, It represents a convolution operation with a kernel size of 1 and a stride of 1. is the Sigmoid activation function.

4. The method according to claim 1, characterized in that: The feature pyramid network module includes: an FPN module or a PAN module.

5. A road damage identification device based on RD-YOLO network, characterized in that: include: An acquisition module, used for acquiring an image of a road to be identified; A determination module is provided, which is used to input the image into a pre-established RD-YOLO network model to determine the disease category of the road, wherein the RD-YOLO network model includes: a backbone network, a neck network and a detection head connected in sequence, the backbone network includes: a channel-by-channel convolution module, the channel-by-channel convolution module is used to convolve the features of each channel using a convolution kernel, and splice the features of each channel after the convolution, the neck network includes: a channel space residual attention mechanism module and a multi-scale interactive fusion module, the channel space residual attention mechanism module is used to enhance the feature map, the multi-scale interactive fusion module is used to adaptively select features for fusion according to targets of different scales, and the channel-by-channel convolution module The block includes: a first channel-by-channel convolution module, a second channel-by-channel convolution module, a third channel-by-channel convolution module, a fourth channel-by-channel convolution module and a fifth channel-by-channel convolution module, the backbone network also includes: a first channel intelligent selection module, a second channel intelligent selection module, a third channel intelligent selection module, a fourth channel intelligent selection module and a spatial pyramid pooling module, the first channel-by-channel convolution module is used to input an image, the first channel-by-channel convolution module, the second channel-by-channel convolution module, the first channel intelligent selection module, the third channel-by-channel convolution module, the second channel intelligent selection module, the fourth channel-by-channel convolution module, the third channel intelligent selection module, the fifth channel-by-channel convolution module, the fourth channel intelligent selection module, and the spatial pyramid pooling module are sequentially connected The second channel intelligent selection module is used to output the first feature information to the neck network, the third channel intelligent selection module is used to output the second feature information to the neck network, and the spatial pyramid pooling module is used to output the third feature information to the neck network. The neck network also includes: a feature pyramid network module, the feature pyramid network module, the channel space residual attention mechanism module and the multi-scale interactive fusion module are connected in series in sequence, the input of the feature pyramid network module is the output of the second channel intelligent selection module, the third channel intelligent selection module and the spatial pyramid pooling module, and different feature information is output to the channel space residual attention mechanism module respectively, and the channel space residual attention The mechanism module includes: a channel attention mechanism module and a spatial attention mechanism module connected in sequence, the input of the channel attention mechanism module is the output of the feature pyramid network module, wherein the channel attention mechanism module is used to determine the weight of each channel, and weight the features of each channel based on the weight of each channel to enhance or weaken the feature information of each channel, the spatial attention mechanism module is used to determine the weight in the spatial direction, and weight the feature information in different spatial directions based on the weight in the spatial direction to highlight the important area, the detection head includes: a Conv layer, a BN layer, and a SILU layer, the Conv layer, the BN layer, and the SILU layer are connected in sequence, the Conv layer is used to extract features from the input feature map,The BN layer normalizes each channel of each feature map, and the SILU layer is used for SILU activation.

6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 4 is implemented.

7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.