Lightweight road defect detection method and device based on deep learning and medium

Through a lightweight road defect detection method based on the YOLOv8 model, combined with an aggregated multi-channel coordinate attention mechanism and a lightweight shared convolution detection head, the problems of low detection efficiency and resource waste in the existing technology are solved, and an efficient, Accurate road defect detection, suitable for deployment on embedded devices.

CN118710620APending Publication Date: 2024-09-27SHANDONG JIANZHU UNIV
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202410874093.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-02
Publication Date
2024-09-27

AI Technical Summary

Technical Problem

Existing road defect detection technology is time-consuming and labor-intensive, and is easily affected by subjective factors. Automatic detection of vehicles is costly and the model is large, making it unsuitable for deployment on embedded devices, resulting in low detection efficiency and waste of resources.

Method used

Build a lightweight road defect detection model based on the YOLOv8 model, use the FasterNet module to replace the convolution layer, and add an aggregated multi-channel attention mechanism after the SPPF layer, design a lightweight shared convolution detection head, and optimize the model parameters and calculations quantity, suitable for deployment on embedded devices.

Benefits of technology

It improves the efficiency and accuracy of road defect detection, enhances the model's practicality and deployment flexibility under resource-constrained conditions, enables real-time detection, and reduces memory usage and computing requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118710620A
    Figure CN118710620A
Patent Text Reader

Abstract

The invention provides a lightweight road defect detection method and device based on deep learning and a medium, and belongs to the technical field of image processing and target detection. According to the scheme, a lightweight road defect detection model is constructed, a FasterNet module is used for replacing a convolutional layer in a Backbone network, and an aggregation multi-path coordinate attention mechanism (AMCA) and a lightweight shared convolutional detection head (LSCD) are introduced, so that the detection precision and speed of the road surface defects are effectively improved, and meanwhile, the parameter quantity and the calculation quantity of the model are reduced. The improved YOLOv8 model is remarkably improved in parameter quantity, calculation quantity, detection speed and precision, meets the real-time detection requirement, and is suitable for being deployed on embedded equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a lightweight road defect detection method, device and medium based on deep learning, and belongs to the technical field of image processing and target detection. Background Art

[0002] Asphalt pavement damage can have an adverse effect on the road's serviceability. With increasing traffic load and age, pavement conditions can deteriorate rapidly, potentially reducing the life of the road and even endangering driving safety. Therefore, transportation agencies should continuously evaluate pavement conditions and make appropriate maintenance planning decisions. Pavement inspection technologies that can accurately and timely assess the number and severity of pavement conditions such as cracks are very important and have therefore received widespread attention from researchers and transportation agencies.

[0003] Traditional automatic detection of road conditions involves image processing using edge detection and image thresholding. Cracks are detected based on the edge gradient changes generated by the intensity difference compared to the background and extracted by threshold segmentation. This method is greatly affected by the environment during image acquisition, including light conditions.

[0004] With the rapid development of machine learning and deep learning algorithms, most of the most advanced road distress detection algorithms are based on convolutional neural networks (CNNs). CNNs have evolved from the early LeNet to AlexNet, VGGnet, GoogLeNet, and ResNet. These network models form the backbone of object detection algorithms and can generate feature maps to obtain image features. CNNs can be used for image classification of different types of cracks (horizontal and vertical). Using sliding window technology, CNNs have shown robust performance with high accuracy in crack classification, localization, and segmentation. In recent years, object detection algorithms using CNNs have become popular. Object detection algorithms can not only provide classification results, but also generate prediction boxes for object localization. Object detection algorithms can be divided into two categories: anchor-based algorithms and anchor-free algorithms. Anchor-based methods, such as Faster R-CNN and YOLOv3, are widely used for object detection. These algorithms use previous anchors to obtain the final object location by regressing the anchors. Anchor-free algorithms, such as CornerNet and CenterNet, use key points instead of anchors. Compared with anchor-based algorithms, anchor-free algorithms have faster real-time detection speed, but may have slightly lower accuracy. Anchor-based object detection algorithms, including Faster R-CNN, YOLOv3, and YOLOv4, are often used by researchers for road condition detection.

[0005] However, existing technologies have some shortcomings. Manual detection wastes human resources, is time-consuming and labor-intensive, and is easily affected by subjective factors of the inspectors. Manual detection also affects traffic. Automatic road inspection vehicles are expensive and not suitable for large-scale promotion. In addition, models such as YOLOv3 are large in size, slow in detection speed, and not suitable for deployment on edge devices such as embedded systems. Summary of the invention

[0006] The purpose of the present invention is to provide a lightweight road defect detection method, device and medium based on deep learning, which improves the efficiency and accuracy of road defect detection and significantly enhances the practicality and deployment flexibility of the model under resource-constrained conditions.

[0007] In order to achieve the above object, the present invention is implemented through the following technical solutions: Collect road defect images, pre-process and annotate them, and divide them into training set, test set and validation set; A lightweight road defect detection model is built based on the YOLOv8 model. The convolutional layer in the Backbone network is replaced with the FasterNet module. An aggregated multi-coordinate attention mechanism is added after the SPPF layer. The detection head in the Head network is a lightweight shared convolutional detection head. The training set is input into the lightweight road defect detection model for training, and the model performance is verified through the validation set to obtain the model with the best performance; Deploy the trained lightweight road defect detection model on embedded devices to achieve real-time road defect detection.

[0008] Preferably, the marking types include road defects, including longitudinal cracks, transverse cracks, mesh cracks, potholes, and road repairs.

[0009] Preferably, the Backbone is composed of a first FasterNet module, a second FasterNet module, a third FasterNet module, a fourth FasterNet module, a third FasterNet module, an SPFF module, and an aggregated multi-way coordinate attention mechanism in sequence, and the modules are in input and output relationship in sequence.

[0010] Preferably, the FasterNet module includes a PConv layer, a PWConv layer, a normalization layer, an activation layer and a PWConv layer in sequence.

[0011] Use the FasterNet module structure to reduce the number of model parameters and computational complexity.

[0012] Preferably, the aggregated multi-coordinate attention mechanism is as follows: First, the input feature map is averaged and pooled in the height, width and global directions to generate three attention tensors of different sizes, namely 1×H×1, 1×1×W and C×1×1. Concatenate the attention tensors in the height and width directions and extract features through a convolutional layer to obtain features Figure 1 ; Features Figure 1 Branch operations are as follows: Branch 1: Features Figure 1 Perform Split operation to split into feature maps in height direction The feature map in the sum and width directions ; Branch 2: Using convolutional layers to process features Figure 1 , and obtain the features through the sigmoid activation function Figure 2 , the feature Figure 2 Perform Split operation to split into feature maps in height direction The feature map in the sum and width directions ; The feature map and feature map Multiply to get features Figure 3 , the feature map and feature map Multiply to get features Figure 4 ; Use global average pooling to enhance channel information and transform features Figure 2 Perform averaging and then multiply it with the global average pooled attention tensor to obtain feature map 5; The characteristics Figure 3 ,feature Figure 4 , feature map 5 is multiplied by the original input feature map to obtain the final feature map.

[0013] Preferably, the lightweight shared convolutional detection head uses GN to improve the performance of detection head positioning and classification, and fuses three different scale feature maps through a shared convolutional layer for feature interaction and parameter sharing; The lightweight shared convolution detection head processes the feature map as follows: The feature maps P3, P4, and P5 output from the Neck network are processed by the Conv_GN layer respectively, and then processed by two shared Conv-GN layers in turn to obtain the feature maps ; Feature Map The bounding box prediction result and the category prediction result are obtained by processing the Con_Reg convolution layer and the Con_Cls convolution layer in each detection head respectively; Con_Reg is used to predict the coordinate information of the bounding box, and Con_Cls outputs the number of channels of the number of categories, which is used to predict the category probability; The bounding box prediction result of each detection head is scaled through the Scale layer to adjust the scale of the bounding box prediction; The detection result is obtained by concatenating the bounding box prediction result after scaled resizing of each detection head with the category prediction result.

[0014] Preferably, the model training hyperparameters are set as follows: learning rate = 0.001, input image size = 640 × 640, batch size = 32, Epoch = 200, learning rate momentum = 0.937, optimizer = SGD, weight decay = 0.0005.

[0015] The advantages of the present invention are: The present invention designs an aggregated multi-coordinate attention mechanism, which enhances the model's feature extraction capability and improves detection accuracy by performing height, width and global average pooling on the input feature map respectively.

[0016] A new lightweight shared convolutional detection head structure is proposed. Group Normalization is used to improve the performance of the detection head. The model parameters are reduced by sharing convolutional layers, which reduces memory usage and computing requirements, and is conducive to deployment on resource-constrained devices.

[0017] The lightweight road defect detection model building method of the present invention reduces the number of model parameters and the amount of calculation while maintaining high accuracy and speed by optimizing the YOLOv8 network model and using FasterNet as the backbone. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention.

[0019] Figure 1 It is a schematic diagram of the process of the present invention.

[0020] Figure 2 It is a schematic diagram of the model structure of the present invention.

[0021] Figure 3 It is a schematic diagram of the AMCA structure of the present invention.

[0022] Figure 4 It is a schematic diagram of the LSCD structure of the present invention. DETAILED DESCRIPTION

[0023] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0024] Example 1 like Figure 1 As shown, a lightweight road defect detection method based on deep learning includes: S1: Collect road defect images, preprocess and annotate them, and divide them into training set, test set and validation set.

[0025] S2: A lightweight road defect detection model is built based on the YOLOv8 model. The convolutional layer in the Backbone network is replaced by the FasterNet module. An aggregated multi-coordinate attention mechanism is added after the SPPF layer. The detection head in the Head network is a lightweight shared convolutional detection head.

[0026] S3: Input the training set into the lightweight road defect detection model for training, verify the model performance through the validation set, and obtain the model with the best performance.

[0027] S4: Deploy the trained lightweight road defect detection model on embedded devices to achieve real-time road defect detection.

[0028] As a refinement of the above embodiment, the specific method of collecting road defect images in step S1 is as follows: collect images containing road defects through network search, on-site shooting, map street view images, etc. A total of 2900 images were collected, and the size of the collected images was 600×600. The collected images were labeled with different types of road defects using the labeling software labelImg. The types of annotations include longitudinal cracks, transverse cracks, mesh cracks, potholes, and road repairs. The corresponding labeled labels are D00, D10, D20, D40 and Repair. The sample data set is randomly divided into a training set (1740 images), a validation set (580 images), and a test set (580 images) in a ratio of 6:2:2. The label format annotated by labelImg is in .xml format, and it needs to be converted into a .txt format label available to the YOLO model using a python program.

[0029] As a refinement of the above embodiment, in step S2, a lightweight road defect detection model is built. The present invention makes three improvements to the original YOLOv8 model. The structure is as follows: Figure 2 As shown, the details are as follows: (1) In order to minimize the number of model parameters while maintaining high accuracy and speed, FasterNet is used to replace the convolutional layers in the Backbone network in the YOLOv8 network model. The FasterNet module includes PConv layer, PWConv layer, normalization layer, activation layer and PWConv layer in sequence; to maintain feature diversity and achieve lower latency. In addition, batch normalization is used and merged into other adjacent Convs for faster inference. PConv only needs to apply regular convolution (Conv) on part of the input channel for spatial feature extraction, and keeps the remaining channels unchanged, reducing redundancy. In order to more fully integrate information from all channels, PWConv is further attached to PConv. This structure looks similar to a T-shaped Conv on the input feature map. Compared with regular Conv, it focuses more on the center position and further reduces the number of floating-point operations (FLOPs) by making full use of the redundancy between layers.

[0030] (2) In view of the similarity between road surface defect features and some background environment features, it is particularly important to improve the model's ability to extract defect features. The attention mechanism is a simple and effective method to enhance neural representation. Commonly used channel attention mechanisms such as SE and CA are used to encode global spatial information for channel attention encoding, but the SE attention mechanism compresses the global spatial information into the channel descriptor, making it difficult to preserve location information. In addition, although CA retains some location information, when the weight of the feature information of a part of a channel is high, but the overall attention weight of the channel is low, some important information in the channel will be lost, thereby affecting the prediction results. To address the above problems, an aggregated multi-coordinate attention mechanism (Aggregate Multiple Coordinate Attention AMCA) is proposed. Figure 3 As shown, the specific implementation method is: S2-1: Perform average pooling on the input feature map in the height direction, width direction and globally to form attention tensors of three sizes.

[0031] S2-2: The height and width of the attention tensor are concatenated and the features are extracted through a convolutional layer to obtain the features Figure 1 .

[0032] S2-3: Features Figure 1 Perform two branch operations, one branch for the feature Figure 1Split into feature maps in the height direction The feature map in the sum and width directions .

[0033] The other branch uses a convolutional layer to perform feature Figure 1 Process it and use the sigmoid activation function to get the feature Figure 2 , then for the features Figure 2 Split into feature maps in the height direction The feature map in the sum and width directions .

[0034] S2-4: Feature map and feature map Multiply to get features Figure 3 , the feature map and feature map Multiply to get features Figure 4 .

[0035] S2-5: Global average pooling branch, used to strengthen channel information, and to prevent the information of this channel from being isolated, the feature Figure 2 The averaging process is performed to match the dimensional shapes, and then the two feature maps are multiplied to obtain feature map 5.

[0036] S2-6: Final pair of features Figure 3 , 4 , 5 and the original input feature map are multiplied to obtain the final feature map. The AMCA structure is as follows Figure 3 shown.

[0037] (3) In road defect detection, the shape of defects is irregular and varies greatly. In addition, each detection head is input by a separate feature map. The lack of information interaction between the detection heads may lead to the loss of some information, resulting in a decrease in detection effect. In order to solve the above problems, a lightweight shared convolutional detection head (LSCD) is proposed. LSCD uses group normalization to improve the performance of detection head positioning and classification. And through a shared convolutional layer, three feature maps of different scales are fused for feature interaction and parameter sharing. This design reduces the number of model parameters, memory usage and computing requirements of the model. The shared convolutional layer enables the model to reduce resource consumption while maintaining efficient processing capabilities, which is conducive to deployment on resource-constrained or edge computing devices. During the LSCD detection process, the anchor point and step size can be dynamically adjusted, and its internal parameters can be automatically adjusted according to the size of the input image and the changes in the feature map, thereby improving the adaptability to inputs of different sizes and the detection accuracy.

[0038] like Figure 4 As shown in the figure, the lightweight shared convolution detection head processes the feature map as follows: The feature maps P3, P4, and P5 output from the Neck network are processed by the Conv_GN layer respectively, and then processed by two shared Conv-GN layers in turn to obtain the feature maps ; Feature Map The bounding box prediction result and the category prediction result are obtained by processing the Con_Reg convolution layer and the Con_Cls convolution layer in each detection head respectively; Con_Reg is used to predict the coordinate information of the bounding box, and Con_Cls outputs the number of channels of the number of categories, which is used to predict the category probability; The bounding box prediction result of each detection head is scaled through the Scale layer to adjust the scale of the bounding box prediction; The detection result is obtained by concatenating the bounding box prediction result after scaled resizing of each detection head with the category prediction result.

[0039] As a refinement of the above embodiment, step S3 includes: Configure the environment: Download the official YOLOv8 source code from Github, create a virtual environment through Anaconda, and install various corresponding code libraries according to the requirements file of the YOLOv8 source code, including matplotlib>=3.2.2, opencv-python>=4.6, Pillow>=7.1, requests>=2.23, scipy>=1.4, torch>=1.10.0, torchvision>=0.11, tqdm>=4.64.0, timm==0.9.8, efficientnet_pytorch==0.7.1, einops==0.1.1, grad-cam==1.4.8, dill==0.3.6, albumentations==1.3.1, pytorch_wavelets==1.3.0, etc. Configure model training hyperparameters: learning rate = 0.001, input image size = 640 × 640, batch size = 32, Epoch = 200, learning rate momentum = 0.937, optimizer = SGD, weight decay = 0.0005.

[0040] The preprocessed training set and validation set are input into the improved YOLOv8 detection model, and the model training is started according to the set hyperparameters. The specific experimental environment is as follows: the operating system is ubuntu20.04, the programming language is Python3.8.13, the deep learning framework is Pytorch1.13.0, the CPU is AMD EPYC 9754 128-CoreProcessor, the GPU is NVIDIA RTX 4090D (24GB), and the memory size is 60GB.

[0041] The specific training process includes: S3-1: Input the data-enhanced training set images into the backbone network of the improved YOLOv8 model for feature extraction, and convert the input images into multi-level feature maps.

[0042] S3-2: The obtained feature map is passed to the Neck network to fuse the feature maps from different levels and generate multi-scale feature representations. This enables the model to detect objects of different sizes at the same time and pass these features to the head layer.

[0043] S3-3: The head is responsible for generating the final detection results. It includes multiple convolutional layers to predict the target class, bounding box, and objectness score in each feature map. For each grid cell, the detection head outputs multiple bounding box predictions, each of which contains the class probability, bounding box regression parameters, and objectness score.

[0044] S3-4: Based on the prediction results and the true annotations, the bounding box regression loss is calculated using the CIOU loss function. The cross entropy loss is calculated for the matched prediction box and the category of the true target to obtain the classification loss. The binary cross entropy loss is calculated for all prediction boxes to evaluate the confidence that the prediction box contains the target, thereby obtaining the target confidence loss. The gradient is calculated using the backpropagation algorithm, and the model parameters are updated using the optimizer (SGD). This process will be iterated multiple times on the entire training dataset until the set epoch (200) is reached, and the training is completed.

[0045] S3-5: After the training is completed, the model is tested and the weight file generated by the training is loaded into the test program to obtain the test results of the improved model. The defect type, defect category and confidence level will be marked in the figure.

[0046] As a refinement of the above embodiment, in step S4, the lightweight road defect detection model is deployed on Jetson Nano, including: Jetson Nano needs to install JetPack SDK, which includes necessary components such as CUDA and cuDNN. Download and burn JetPackSDK to an SD card, insert the SD card into Jetson Nano, start the device and complete the initial setup. Install specific versions of PyTorch and Torchvision on JetsonNano, which are optimized to run efficiently on the Jetson platform, as well as other dependent packages used by the above deep learning models (such as numpy, pillow, etc.). The lightweight deep learning model obtained after training is converted into an inference engine with faster inference speed on the embedded system through TensorRT, and deployed on the JetsonNanoB01 embedded device with limited computing resources in an industrial environment to realize road defect detection on the mobile terminal.

[0047] Reasoning and result display on the Jetson Nano B01 device: By connecting Jetson Nano to a camera to obtain real-time road images, the acquired road images are transmitted to the deep learning model deployed on Jetson Nano to obtain reasoning results, which are then displayed on the on-site display and the output results are saved in the SD card.

[0048] It should be noted that: In order to objectively evaluate the performance of the road defect detection model, a series of evaluation indicators are used, including GFLOPS (Giga floating-point operations per second), parameters, FPS (frames per second), mAP (mean average precision) and F1-Score. These indicators are used to measure the execution time, size and complexity, detection speed, accuracy, and comprehensive performance and stability of the model. GFLOPS is used to measure the execution efficiency of the network model, indicating the number of floating-point operations that the model can perform in one second. Parameters are used to measure the size and complexity of the model, referring to the total number of trainable parameters in the model. FPS is used to evaluate the real-time detection capability of the model, indicating the number of frames that can be processed per second. mAP is an important indicator for evaluating the detection accuracy of the model, and its calculation formula is shown in Formula 1. F1-Score is the weighted average of precision and recall, reflecting the comprehensive performance and stability of the model, and its calculation formula is shown in Formula 2.

[0049] (1) (2) In formula 1, N represents the total number of categories, and PA represents the area under the curve formed by recall as the horizontal axis and precision as the vertical axis. mAP@0.5 refers to the average precision when the threshold is 0.5. In formula 2, Precision reflects the ability of the model to distinguish negative samples. The higher the precision, the stronger the model's ability to distinguish negative samples; Recall reflects the ability of the model to identify positive samples. The higher the recall, the stronger the model's ability to identify positive samples. F1-Score is a comprehensive evaluation indicator of precision and recall. The higher the F1-Score, the better the overall performance of the model and the stronger its stability.

[0050] The improved YOLOv8 model has 8.23M parameters, 19.1GFLOPs of computation, 89.6% mAP@0.5, 88.9% Precision, 85.1% Recall, and 92.4 FPS, which can meet the requirements of real-time detection. The performance comparison between the lightweight model and the original model is shown in Table 1. Compared with the original model, the average mAP@0.5 is improved by 4.8%, the number of parameters is reduced by 25.99%, and the amount of computation is reduced by 32.74%. The experimental results are shown in Table 1. Table 1 Experimental results Example 2 The embodiment of the present disclosure also provides a lightweight road defect detection device based on deep learning, including a processor and a memory. Optionally, the device may also include a communication interface and a bus. The processor, the communication interface, and the memory may communicate with each other through the bus. The communication interface may be used for information transmission. The processor may call the logic instructions in the memory to execute the lightweight road defect detection method based on deep learning of the above embodiment.

[0051] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product.

[0052] The memory, as a computer-readable storage medium, can be used to store software programs and computer executable programs, such as program instructions / modules corresponding to the method in the embodiment of the present disclosure. The processor executes the function application and data processing by running the program instructions / modules stored in the memory, that is, realizing the lightweight road defect detection method based on deep learning in the above embodiment.

[0053] The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function; the data storage area may store data created according to the use of the terminal device, etc. In addition, the memory may include a high-speed random access memory and may also include a non-volatile memory.

[0054] An embodiment of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured to execute the above-mentioned lightweight road defect detection method based on deep learning.

[0055] The computer-readable storage medium mentioned above may be a transient computer-readable storage medium or a non-transitory computer-readable storage medium.

[0056] The technical solution of the embodiment of the present disclosure can be embodied in the form of a software product, which is stored in a storage medium and includes one or more instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in the embodiment of the present disclosure. The aforementioned storage medium may be a non-transient storage medium, including: a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a disk or an optical disk, and other media that can store program codes, or a transient storage medium.

[0057] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A lightweight road defect detection method based on deep learning, characterized in that: include: Collect road defect images, pre-process and annotate them, and divide them into training set, test set and validation set; A lightweight road defect detection model is built based on the YOLOv8 model. The convolutional layer in the Backbone network is replaced with the FasterNet module. An aggregated multi-coordinate attention mechanism is added after the SPPF layer. The detection head in the Head network is a lightweight shared convolutional detection head. The training set is input into the lightweight road defect detection model for training, and the model performance is verified through the validation set to obtain the model with the best performance; Deploy the trained lightweight road defect detection model on embedded devices to achieve real-time road defect detection.

2. The light-weight road defect detection method based on deep learning according to claim 1, characterized in that: The annotation types include road defects, including longitudinal cracks, transverse cracks, network cracks, potholes, and road repairs.

3. The light-weight road defect detection method based on deep learning according to claim 1, characterized in that: The Backbone is composed of a first FasterNet module, a second FasterNet module, a third FasterNet module, a fourth FasterNet module, a third FasterNet module, an SPFF module, and an aggregated multi-way coordinate attention mechanism, and each module has an input and output relationship in turn.

4. The light-weight road defect detection method based on deep learning according to claim 1, characterized in that: The FasterNet module includes a PConv layer, a PWConv layer, a normalization layer, an activation layer, and a PWConv layer in sequence. Use the FasterNet module structure to reduce the number of model parameters and computational complexity.

5. The light-weight road defect detection method based on deep learning according to claim 3, characterized in that: The aggregation multi-coordinate attention mechanism is as follows: First, the input feature map is averaged and pooled in the height direction, width direction, and globally to generate three attention tensors of different sizes, namely 1×H×1, 1×1×W, and C×1×1. Concatenate the attention tensors in the height and width directions, and extract features through a convolutional layer to obtain feature map 1; The branch operation of feature map 1 is as follows: Branch 1: Split feature map 1 into feature maps in the height direction The feature map in the sum and width directions ; Branch 2: Use the convolution layer to process feature map 1, and obtain feature map 2 through the sigmoid activation function. Perform a Split operation on feature map 2 to split it into feature maps in the height direction. The feature map in the sum and width directions ; The feature map and feature map Multiply to get feature map 3, and convert the feature map and feature map Multiply to get feature map 4; Use global average pooling to enhance channel information, average feature map 2, and then multiply it with the attention tensor of global average pooling to obtain feature map 5; Multiply feature map 3, feature map 4, feature map 5 with the original input feature map to obtain the final feature map.

6. The light-weight road defect detection method based on deep learning according to claim 5, characterized in that: The lightweight shared convolutional detection head uses GN to improve the performance of detection head positioning and classification, and fuses three different scale feature maps through a shared convolutional layer for feature interaction and parameter sharing; The lightweight shared convolution detection head processes the feature map as follows: The feature maps P3, P4, and P5 output from the Neck network are processed by the Conv_GN layer respectively, and then processed by two shared Conv-GN layers in turn to obtain the feature maps ; Feature Map The bounding box prediction result and category prediction result are obtained by processing the Con_Reg convolution layer and Con_Cls convolution layer in each detection head respectively; The bounding box prediction result of each detection head is scaled through the Scale layer to adjust the scale of the bounding box prediction; The detection result is obtained by concatenating the bounding box prediction result after scaled resizing of each detection head with the category prediction result.

7. The light-weight road defect detection method based on deep learning according to claim 1, characterized in that: The model training hyperparameters are set as follows: learning rate = 0.001, input image size = 640 × 640, batch size = 32, Epoch = 200, learning rate momentum = 0.937, optimizer = SGD, weight decay = 0.0005.

8. A lightweight road defect detection device based on deep learning, comprising a processor and a memory storing program instructions, characterized in that: The processor is configured to execute the lightweight road defect detection method based on deep learning as described in any one of claims 1-7 when running the program instructions.

9. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the program is executed by a processor, the method described in any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Backlight plate defect detection method of lightweight network for industrial scene

    CN118967662A

  • Lightweight bamboo chip defect detection method and device based on deep learning

    CN119850590A

  • A lightweight bamboo defect detection method and device based on deep learning

    CN119850590B