A road defect detection method based on YOLO-MSD
Patent Information
- Application Number
- CN202610813955.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-08
- Publication Date
- 2026-08-18
- Estimated Expiration
- 2046-06-08
AI Technical Summary
将多尺度方向感知门控线性单元模块作为YOLOv11n中C2PSA模块的PSABlock中原有多头自注意力机制的替代组件,构建YOLO-MSD道路缺陷检测模型,能够针对性解决现有YOLOv11n模型在道路缺陷检测中存在的多尺度特征提取能力不足、方向性缺陷感知弱及小目标缺陷检测精度低的问题
[0031]本发明基于YOLOv11n模型,在主干特征提取网络中最后一个C2PSA模块的各PSABlock内,将原有的多头自注意力机制替换为多尺度方向感知门控线性单元模块。该模块的门控感知支路通过多个不同扩张率的空洞卷积分支提取多尺度特征并生成门控权重矩阵,能够同时捕获点状坑洼、线状裂纹及网状裂纹等具有显著尺度差异的道路缺陷特征,解决了原有自注意力机制注意力权重分布均匀、无法聚焦局部细微缺陷及缺乏方向性建模能力的问题。
Smart Images

Figure CN122368057B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a road defect detection method based on YOLO-MSD, belonging to the field of visual image processing technology. Background Technology
[0002] In intelligent transportation systems, roads serve as core infrastructure, and their health is directly related to traffic safety and efficiency. Over long-term use, roads are susceptible to various defects such as transverse cracks, longitudinal cracks, network cracks, and potholes due to environmental erosion, vehicle cyclic loads, and aging of pavement materials. Failure to detect and repair these defects in a timely manner will accelerate pavement damage, increase road maintenance costs, and may even lead to traffic accidents such as vehicle bumps or loss of control. Therefore, developing high-precision, high-efficiency road defect detection technologies is a key requirement for the operation and maintenance of intelligent transportation infrastructure.
[0003] Current road defect detection technologies are mainly divided into three categories: First, manual inspection methods, which rely on manual observation or measurement with simple tools by inspectors. These methods suffer from high subjectivity, low detection coverage, poor data consistency, and low detection efficiency, making them difficult to meet the needs of large-scale road maintenance. Second, traditional vehicle-mounted sensing methods, which collect road surface data based on vibration sensors or lidar equipment. Although they have digitized part of the detection process, they are limited by sampling density and detection speed, and the purchase and maintenance costs of equipment are high, making it difficult to promote and apply them on a large scale. Third, digital image processing methods, which extract defect features through traditional algorithms such as edge detection, threshold segmentation, or wavelet multi-scale analysis. However, their feature expression capabilities are limited to low-level features designed manually. In real-world scenarios with changes in lighting, road surface noise interference, and complex texture backgrounds, the generalization performance of the algorithms drops sharply, and the defect false detection rate and false detection rate are both at a high level.
[0004] In recent years, deep learning methods based on convolutional neural networks have significantly improved the accuracy and efficiency of road defect detection due to their powerful autonomous feature learning capabilities. The YOLO series of algorithms, as typical single-stage target detection algorithms, have become the mainstream choice in the field of road defect detection because they balance detection speed and recognition accuracy. YOLOv11n, as a new generation of lightweight YOLO models, has further optimized feature extraction efficiency and detection accuracy, but it still suffers from weak response to subtle defect features and a high rate of missed detection for small targets in road defect detection scenarios. In-depth analysis reveals that the reason for these problems lies in the fact that the PSABlock of the C2PSA module in the YOLOv11n backbone network adopts a multi-head self-attention mechanism. While this mechanism can capture global contextual information, it lacks the ability to explicitly model the directionality of the feature space, and the attention weights are relatively evenly distributed. For road defects with extremely small spatial proportions, such as slender cracks and small potholes, its attention response is significantly weakened, causing the feature representation to be submerged by background information.
[0005] Convolutionally gated linear units (CLUs), as efficient feature fusion and enhancement modules, selectively filter, fuse, and enhance input features based on gating mechanisms, effectively preserving valid information and suppressing invalid background noise. However, standard CLUs employ a single, ordinary convolution operation, resulting in a fixed receptive field and a lack of multi-scale feature extraction capabilities, making it difficult to simultaneously capture road defect features with significant scale differences, such as point-like potholes, linear cracks, and network cracks. To address this limitation, it is necessary to propose a multi-scale orientation-aware gated linear unit module. This module captures multi-scale defect features by setting dilated convolution branches with different dilation rates in parallel, and utilizes gating mechanisms to achieve adaptive feature enhancement and fusion. By using the multi-scale orientation-aware gated linear unit module as a replacement for the original multi-head self-attention mechanism in the PSABlock of the C2PSA module in YOLOv11n, a YOLO-MSD road defect detection model is constructed. This model can specifically address the problems of insufficient multi-scale feature extraction capabilities, weak directional defect perception, and low accuracy in detecting small target defects in existing YOLOv11n models. Summary of the Invention
[0006] The present invention provides a road defect detection method based on YOLO-MSD to solve the problems existing in the prior art.
[0007] The technical solutions adopted in this invention are as follows:
[0008] A road defect detection method based on YOLO-MSD includes the following steps:
[0009] S1: Obtain a road defect image dataset and preprocess the road defect image dataset;
[0010] S2: Construct a YOLO-MSD road defect detection model, which is an improvement on the YOLOv11n model. The YOLOv11n model includes a backbone feature extraction network, a neck feature extraction network, and a head detection network. The improvements include:
[0011] (1) In each PSABlock of the last C2PSA module in the backbone feature extraction network, the original multi-head self-attention mechanism is replaced with a multi-scale orientation perception gated linear unit module; the multi-scale orientation perception gated linear unit module includes a main feature branch and a gated perception branch. The gated perception branch extracts multi-scale features and generates a gated weight matrix through multiple dilated convolution branches with different dilation rates. The gated weight matrix is weighted and fused with the main feature map output by the main feature branch to obtain the output features of the multi-scale orientation perception gated linear unit module.
[0012] (2) The gated perception loss function is used for optimization. The gated perception loss function uses the gated weight matrix generated by the multi-scale orientation perception gated linear unit module of the last PSABlock of the last C2PSA module in the backbone feature extraction network. After resolution alignment, it is matched with the feature map of each detection layer of the head detection network in the spatial dimension. Based on the matched spatial gated weight map, the classification loss and regression loss of the corresponding detection layer are weighted respectively.
[0013] S3: Train the YOLO-MSD road defect detection model using the preprocessed road defect image dataset;
[0014] S4: Input the road image to be detected into the trained YOLO-MSD road defect detection model, and output the road defect category, bounding box coordinates, and confidence score.
[0015] Furthermore, in the gated perception branch, each dilated convolutional branch outputs a multi-scale gated feature map; the multi-scale gated feature maps are concatenated along the channel dimension and then input into the orientation-aware weight prediction network. The orientation-aware weight prediction network outputs a fused weight map group through two 1×1 convolutional layers and a Softmax activation function. The fused weight map group contains elements corresponding to each of the multi-scale gated features. Figure 1 A corresponding adaptive fusion weight map is generated, and the sum of the channel values of the fusion weight map group at the same pixel position is 1; each of the adaptive fusion weight maps is element-wise multiplied with the corresponding multi-scale gated feature maps and then summed to obtain a fusion gated feature map; a Sigmoid activation function is applied to the fusion gated feature map to generate the gated weight matrix.
[0016] Furthermore, in the multi-scale orientation perception gated linear unit module, the main feature branch and the gated perception branch respectively process the input feature map through two completely independent 1×1 convolutions;
[0017] The gated perception branch is configured with three 3×3 dilated convolutional branches with dilation rates of 1, 2, and 4 in parallel. The output features of each 3×3 dilated convolutional branch are batch normalized and then fused element-wise. After fusion, a Sigmoid activation function is applied to generate the gated weight matrix. The gated weight matrix is then multiplied element-wise with the main feature map to obtain the output features of the multi-scale orientation perception gated linear unit module.
[0018] Furthermore, in the gated perception loss function, the classification loss is weighted by the binary cross-entropy loss based on the perception enhancement coefficient, and the expression for the classification loss is:
[0019] ,
[0020] in, This represents the total number of pixels in the multi-scale feature maps output by all detection layers. For the spatial location index of the feature map; For position The true label is set to 1, which indicates that the location belongs to a defect area, and 0, which indicates the background. Predicting location for the model The probability that it is a defect; For spatial gating weighted graphs at location The possible values of ; The magnification factor is and ; For position The perceptual enhancement coefficient is defined as follows: .
[0021] Furthermore, in the gated perception loss function, the regression loss is the product of the pixel average of the spatial gated weight map within the predicted bounding box region and the perfect intersection-union ratio loss. The expression for the regression loss is:
[0022] ,
[0023] in, To predict the bounding box region; To predict the pixel position index within the bounding box; For spatial gating weighted graphs at location The possible values of ; To predict the total number of pixels within the bounding box; To predict the average pixel value of the spatial gating weight map within the bounding box region, it is defined as follows: ; The loss is calculated for complete intersection and union.
[0024] Furthermore, the total loss of the gated perception loss function is the sum of the classification loss and the balance coefficient multiplied by the regression loss, and the expression for the total loss is:
[0025] ,
[0026] in, For gating perception classification loss; For gated perception regression loss; The balance coefficient and .
[0027] Furthermore, the resolution alignment employs bilinear interpolation for upsampling or downsampling.
[0028] Furthermore, the road defect image dataset is the RDD2022 dataset, which contains four types of road defect images: longitudinal cracks, transverse cracks, network cracks, and potholes. The dataset is divided into training and validation sets in an 8:2 ratio.
[0029] Furthermore, the head detection network is a decoupled detection head, which is set in parallel on the three detection scales P3, P4, and P5 output by the neck feature extraction network.
[0030] The present invention has the following beneficial effects:
[0031] This invention, based on the YOLOv11n model, replaces the original multi-head self-attention mechanism with a multi-scale orientation-aware gated linear unit module within each PSABlock of the last C2PSA module in the backbone feature extraction network. This module's gated perception branch extracts multi-scale features and generates a gated weight matrix through multiple dilated convolutional branches with different dilation rates. This enables it to simultaneously capture road defect features with significant scale differences, such as point-like potholes, linear cracks, and network cracks. This solves the problems of the original self-attention mechanism, such as uniform attention weight distribution, inability to focus on localized subtle defects, and lack of directional modeling capability.
[0032] This invention employs a gated perception loss function for optimization. This loss function utilizes the gate weight matrix generated by the multi-scale orientation-gated linear unit module of the last PSABlock in the last C2PSA module of the backbone feature extraction network. After resolution alignment, this matrix is spatially matched with the feature maps of each detection layer in the head detection network. Based on the matched spatial gate weight map, the classification and regression losses of the corresponding detection layers are weighted respectively. This loss function uses the gate weight matrix as a spatial attention guide, dynamically enhancing the loss contribution of potential defect regions. This forces the model to focus its learning on difficult samples and small defect regions during training, effectively suppressing background noise interference and further improving the recall and localization accuracy of small target defects.
[0033] The multi-scale orientation-aware gated linear unit module mainly employs 1×1 convolution and 3×3 dilated convolution, resulting in fewer parameters and lower computational cost compared to the original multi-head self-attention mechanism. The constructed YOLO-MSD model achieves improved detection accuracy while maintaining the inherent advantages of YOLOv11n's lightweight design and high inference speed. It can be directly deployed in resource-constrained scenarios such as edge computing devices or road inspection vehicle terminals, meeting the engineering requirements for real-time on-site detection of road defects.
[0034] In the gated perception branch, each dilated convolutional branch outputs multi-scale gated feature maps, which are then concatenated along the channel dimension and input into the orientation perception weight prediction network. Two 1×1 convolutional layers and a Softmax activation function output a fused weight map group. The multi-scale gated feature maps are then weighted and fused based on the adaptive fused weight map. This approach enables the network to dynamically select the optimal multi-scale feature combination weights based on the current input features, further improving the model's ability to represent road defects of different scales and morphologies compared to fixed summation fusion. Attached Figure Description
[0035] Figure 1 This is a schematic diagram of the overall process of the road defect detection method based on YOLO-MSD of the present invention.
[0036] Figure 2 This is a schematic diagram of the network structure of the YOLO-MSD model of the present invention.
[0037] Figure 3 This is a schematic diagram of the internal structure of an adaptive weighted fusion embodiment of the multi-scale orientation sensing gated linear unit module (MSD module).
[0038] Figure 4 A schematic diagram of the internal structure of a fixed summation and fusion embodiment for the MSD module.
[0039] Figure 5 This is a diagram showing the internal framework of the C2PSA-MSD module and the internal structure of PSABlock in this invention.
[0040] Figure 6 This is a schematic diagram illustrating the mechanism of the gated sensing loss function of the present invention. Detailed Implementation
[0041] The invention will now be further described with reference to the accompanying drawings.
[0042] like Figure 1 As shown, this invention discloses a road defect detection method based on YOLO-MSD, comprising three stages: dataset preprocessing, model training, and model performance testing and deployment. First, the RDD2022 road defect dataset is preprocessed and output to the network. Then, a pre-trained YOLOv11 model is loaded to construct an improved YOLO-MSD model, which is trained using the preprocessed dataset. The detection head classifies and regresses the fused features and outputs predicted bounding boxes and categories. Finally, the YOLO-MSD algorithm performance is tested, and the trained model is deployed on a computing device to perform state detection on road images and videos to be detected.
[0043] like Figure 2As shown, the YOLO-MSD road defect detection model is based on the YOLOv11n model and improves upon its original three-level network architecture, including the backbone feature extraction network, the neck feature extraction network, and the head detection network.
[0044] The backbone feature extraction network extracts hierarchical features layer by layer along the original YOLOv11n structure. At its end, a C2PSA-MSD module is set to inject multi-scale orientation-aware gated linear unit modules into the deep features to enhance the defect representation capability.
[0045] The neck feature extraction network uses Upsample, Concat channel concatenation, and C3K2 feature fusion modules to fuse deep and shallow features output from the backbone network at multiple scales. The head detection network is configured in parallel on the three detection scales output by the neck network, outputting detection results at large, medium, and small scales respectively.
[0046] like Figure 5 The C2PSA-MSD module receives the input feature map, whose dimensions are denoted as [H, W, C], where H, W, and C represent the height, width, and number of channels of the feature map, respectively. The input features are first processed by a 1×1 convolution (K=1, s=1) for channel mapping, and then channel segmentation is performed, which are then fed into the PSABlock sequence and bypass connections.
[0047] The PSABlock sequence contains multiple cascaded PSABlocks, each of which replaces the original multi-head self-attention mechanism with the multi-scale orientation-aware gated linear unit module. After the PSABlock sequence is output, it is concatenated with the bypass features and then fused by a 1×1 convolution to output a final feature map with dimensions [H, W, C].
[0048] Figure 5 The left side of the image shows the channel splitting, PSABlock sequence, and channel splicing process of the C2PSA-MSD module. Figure 5 As shown on the right, the internal structure of a single PSABlock includes a multi-scale attention branch and a feedforward network branch. After the input features are normalized by the LayerNorm layer, they enter the multi-scale orientation-aware gated linear unit (MSD) module, then are mapped by the projection layer, and subsequently added to the input features through a residual connection. The result is normalized again by the LayerNorm layer, then enters the feedforward network FFN, then is mapped by the projection layer, and finally added to the output of the previous stage through a residual connection to obtain the output features with dimensions [H, W, C].
[0049] Example 1: Adaptive weighted fusion structure of MSD module.
[0050] like Figure 3 As shown, the multi-scale orientation sensing gated linear unit module receives an input feature map X with dimensions [H, W, C], where H, W, and C represent the height, width, and number of channels of the feature map, respectively.
[0051] The multi-scale orientation-aware gated linear unit module includes a main feature branch and a gated perception branch. The main feature branch processes the input feature map X through a parameter-independent 1×1 convolution, outputting a main feature map V. The gated perception branch processes the input feature map X through another parameter-completely independent 1×1 convolution, outputting a reference feature map Xg. The two 1×1 convolutions have independent weight matrices and bias parameters, which are learned and updated separately during training.
[0052] The gated perception branch is configured with three parallel 3×3 dilated convolutional branches with dilation rates of 1, 2, and 4, respectively, outputting multi-scale gated feature maps G1, G2, and G3. All three branches use the same padding and a convolutional stride of 1. The number of input and output channels for each branch is consistent with the number of channels in the baseline feature map Xg, and batch normalization is performed on the outputs of each branch.
[0053] The multi-scale gated feature maps G1, G2, and G3 are concatenated along the channel dimension to obtain concatenated features [G1, G2, G3], which are then input into the orientation-aware weight prediction network.
[0054] The orientation-aware weight prediction network has a serial structure. The input is reduced in dimensionality by 1×1 convolution, then increased in dimensionality to 3 channels by 1×1 convolution, and finally outputs a fused weight map group by the Softmax activation function.
[0055] The fusion weight map group includes adaptive fusion weight maps W1, W2, and W3 that correspond one-to-one with G1, G2, and G3, respectively, and the sum of the channel values at the same pixel position in the fusion weight map group is 1.
[0056] Each of the adaptive fusion weight maps is element-wise multiplied with its corresponding multi-scale gated feature map, i.e., W1⊙G1, W2⊙G2, W3⊙G3. The three product results are then summed element-wise to obtain the fusion gated feature map. A Sigmoid activation function is applied to the fusion gated feature map to generate a gated weight matrix. ,in The gate weight matrix Perform an element-wise product with the main feature map V output by the main feature branch, i.e. The output feature Y of the multi-scale orientation sensing gated linear unit module is obtained.
[0057] like Figure 6As shown, the gated perception loss function utilizes the gated weight matrix generated by the multi-scale orientation perception gated linear unit module of the last PSABlock of the last C2PSA module in the backbone feature extraction network. Optimization is performed. Due to the gate weight matrix... Generated at the end of the backbone network, its spatial resolution differs from the resolution of the multi-scale feature maps in each detection layer. Therefore, bilinear interpolation is first used to... Upsampling or downsampling to the resolution corresponding to the feature map of each detection layer yields a spatially gated weight map that matches the feature map of each detection layer of the head detection network in the spatial dimension.
[0058] For any pixel location on the feature map Define the perceptual enhancement coefficient :
[0059] ,
[0060] in, For the spatial gating weight map at position The possible values of ; As the amplification factor, λ=3 is preferably used in this embodiment. When When approaching 0, When the value is close to 1, maintain the normal loss weight; when When it approaches 1, The loss generated at this location is amplified, thereby guiding the model to focus on potential defect areas.
[0061] The gated perception classification loss is weighted by the binary cross-entropy loss based on the perception enhancement coefficient, and its expression is as follows:
[0062] ,
[0063] in, This represents the total number of pixels in the multi-scale feature maps output by all detection layers. For the spatial location index of the feature map; For position The true label is set to 1, which indicates that the location belongs to a defect area, and 0, which indicates the background. Predicting location for the model The probability of it being a defect.
[0064] The gated perception regression loss is the product of the pixel average of the spatial gated weight map within the predicted bounding box region and the perfect intersection-union ratio loss, and its expression is:
[0065] ,
[0066] in, To predict the bounding box region; To predict the pixel position index within the bounding box; For the spatial gating weight map at position The value of M is the total number of pixels within the predicted bounding box; To predict the average pixel value of the spatial gating weight map within the bounding box region, it is defined as:
[0067] ,
[0068] The loss is calculated for complete intersection and union.
[0069] The total loss function is the sum of the gated perception classification loss and the balance coefficient multiplied by the gated perception regression loss, and its expression is:
[0070] ,
[0071] in, For gating perception classification loss; For gated perception regression loss; For the balance coefficient, this embodiment preferably uses... .
[0072] The parameters are updated by backpropagation based on the total loss.
[0073] The model training process is as follows: First, the constructed RDD2022 dataset is preprocessed, including image normalization and resizing. Then, SGD is used as the optimizer, loading the pre-trained weights from YOLOv11n.pt, setting the learning rate to 0.01 and the weight decay coefficient to 0.0005. Training hyperparameters are set as follows: batch size of 8 and iterations of 200. The constructed YOLO-MSD road defect detection model is trained using the training set. After each training round, the model's precision, recall, and mean precision are calculated on the validation set to obtain the optimal algorithm model. The mean precision includes mAP50 at an intersection-over-union (IoU) threshold of 0.5 and mAP50:95 for IoU thresholds between 0.5 and 0.95. The model with the highest mAP50 on the validation set is selected as the optimal YOLO-MSD road defect detection model.
[0074] The optimal YOLO-MSD road defect detection model, trained to its best performance, is deployed to a computing device. Images or videos of the road to be detected are acquired, preprocessed, and then input into the deployed YOLO-MSD road defect detection model. After inference, the model outputs the category of the road defect, the bounding box coordinates, and the confidence score, thus completing the road defect detection.
[0075] Example 2: Fixed summation and fusion structure of MSD module.
[0076] like Figure 4 As shown, in another embodiment of the present invention, the multi-scale orientation-aware gated linear unit module also receives the input feature map X[H, W, C], and obtains the main feature X through parameter-independent dual 1×1 convolution branches. v Compared with the baseline feature map X g .
[0077] The gated sensing branch is configured with three 3×3 dilated convolutional branches in parallel, with dilation rates of 1, 2, and 4, respectively, outputting multi-scale gated feature maps and G1, G2, and G3. Each branch output undergoes batch normalization. The difference from Embodiment 1 is that in this embodiment, the multi-scale gated feature maps are directly fused element-wise after batch normalization to obtain the fused feature G. fuse Then, a sigmoid activation function is applied to generate a gated weight matrix. The gate weight matrix With the main feature X v Element-wise multiplication is performed to obtain the output feature Y.
[0078] This embodiment adopts a fixed summation and fusion method, which has a simpler structure and lower computational overhead, making it suitable for edge deployment scenarios with higher requirements for inference speed.
[0079] The above description is only a preferred embodiment of the present invention. It should be noted that those skilled in the art can make several improvements without departing from the principle of the present invention, and these improvements should also be considered within the scope of protection of the present invention.
Claims
1. A road defect detection method based on YOLO-MSD, characterized in that: Includes the following steps: S1: Obtain a road defect image dataset and preprocess the road defect image dataset; S2: Construct a YOLO-MSD road defect detection model, which is an improvement on the YOLOv11n model. The YOLOv11n model includes a backbone feature extraction network, a neck feature extraction network, and a head detection network. The improvements include: (1) In each PSABlock of the last C2PSA module in the backbone feature extraction network, the original multi-head self-attention mechanism is replaced with a multi-scale orientation perception gated linear unit module; the multi-scale orientation perception gated linear unit module includes a main feature branch and a gated perception branch. The gated perception branch extracts multi-scale features and generates a gated weight matrix through multiple dilated convolution branches with different dilation rates. The gated weight matrix is weighted and fused with the main feature map output by the main feature branch to obtain the output features of the multi-scale orientation perception gated linear unit module. (2) The gated perception loss function is used for optimization. The gated perception loss function uses the gated weight matrix generated by the multi-scale orientation perception gated linear unit module of the last PSABlock of the last C2PSA module in the backbone feature extraction network. After resolution alignment, it is matched with the feature map of each detection layer of the head detection network in the spatial dimension. Based on the matched spatial gated weight map, the classification loss and regression loss of the corresponding detection layer are weighted respectively. S3: Train the YOLO-MSD road defect detection model using the preprocessed road defect image dataset; S4: Input the road image to be detected into the trained YOLO-MSD road defect detection model, and output the road defect category, bounding box coordinates, and confidence score.
2. The road defect detection method based on YOLO-MSD as described in claim 1, characterized in that: In the gated perception branch, each dilated convolutional branch outputs a multi-scale gated feature map; the multi-scale gated feature maps are concatenated along the channel dimension and then input into the orientation perception weight prediction network. The orientation perception weight prediction network outputs a fused weight map group through two 1×1 convolutional layers and a Softmax activation function. The fused weight map group contains an adaptive fused weight map that corresponds one-to-one with each of the multi-scale gated feature maps, and the sum of the channel values at the same pixel position in the fused weight map group is 1. The adaptive fusion weight map is multiplied element-wise with the corresponding multi-scale gated feature map and then summed to obtain the fusion gated feature map. The fused gated feature map is subjected to a Sigmoid activation function to generate the gated weight matrix.
3. The road defect detection method based on YOLO-MSD as described in claim 1, characterized in that: In the multi-scale orientation perception gated linear unit module, the main feature branch and the gated perception branch process the input feature map through two completely independent 1×1 convolutions; The gated perception branch is configured with three 3×3 dilated convolutional branches with dilation rates of 1, 2, and 4 in parallel. The output features of each 3×3 dilated convolutional branch are batch normalized and then fused element-wise. After fusion, a Sigmoid activation function is applied to generate the gated weight matrix. The gated weight matrix is then multiplied element-wise with the main feature map to obtain the output features of the multi-scale orientation perception gated linear unit module.
4. The road defect detection method based on YOLO-MSD as described in claim 1, characterized in that: In the gated perception loss function, the classification loss is weighted by the binary cross-entropy loss based on the perception enhancement coefficient. The expression for the classification loss is: , in, This represents the total number of pixels in the multi-scale feature maps output by all detection layers. For the spatial location index of the feature map; For position The true label is set to 1, which indicates that the location belongs to a defect area, and 0, which indicates the background. Predicting location for the model The probability that it is a defect; For spatial gating weighted graphs at location The possible values of ; The magnification factor is and ; For position The perceptual enhancement coefficient is defined as follows: .
5. The road defect detection method based on YOLO-MSD as described in claim 1, characterized in that: In the gated perception loss function, the regression loss is the product of the average pixel value of the spatial gated weight map within the predicted bounding box region and the perfect intersection-union ratio loss. The expression for the regression loss is: , in, To predict the bounding box region; To predict the pixel position index within the bounding box; For spatial gating weighted graphs at location The possible values of ; To predict the total number of pixels within the bounding box; To predict the average pixel value of the spatial gating weight map within the bounding box region, it is defined as follows: ; The loss is calculated for complete intersection and union.
6. The road defect detection method based on YOLO-MSD as described in claim 1, characterized in that: The total loss of the gated perception loss function is the sum of the classification loss, the balance coefficient, and the regression loss. The expression for the total loss is: , in, For gating perception classification loss; For gated perception regression loss; The balance coefficient and .
7. The road defect detection method based on YOLO-MSD as described in claim 1, characterized in that: The resolution alignment uses bilinear interpolation for upsampling or downsampling.
8. The road defect detection method based on YOLO-MSD as described in claim 1, characterized in that: The road defect image dataset is the RDD2022 dataset, which contains images of four types of road defects: longitudinal cracks, transverse cracks, network cracks, and potholes. The dataset is divided into training and validation sets in an 8:2 ratio.
9. The road defect detection method based on YOLO-MSD as described in claim 1, characterized in that: The head detection network is a decoupled detection head, which is set in parallel on the three detection scales P3, P4, and P5 output by the neck feature extraction network.
Citation Information
Patent Citations
Crack defect detection method based on improved YOLOv8 model
CN119295391A
Road defect detection method under complex weather based on improved RT-DETR
CN121837726A