Road crack detection method based on YOLOv8 improvement

By introducing the deformable convolution module DCN v2 and CA attention mechanism in YOLOv8, the road crack detection model is optimized, and the problems of low accuracy and difficult deployment in the existing technology are solved, and efficient and accurate automated detection is achieved. .

CN119090798APending Publication Date: 2024-12-06GUILIN UNIVERSITY OF TECHNOLOGY
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202410976715.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-21
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

The existing road crack detection methods have problems such as low accuracy and difficulty in deployment. Traditional manual inspection is time-consuming and labor-intensive and easily subjectively affected. The existing automatic target detection technology still has room for improvement in road crack detection.

Method used

Based on YOLOv8's improved road crack detection method, by introducing the deformable convolution module DCN v2 and CA attention mechanism, the C2f_DCN module and feature extraction network are constructed, the object detection algorithm is optimized, and an improved road crack detection model is formed, and the SGD optimizer is used. Iterative training is carried out to generate road crack detection results.

Benefits of technology

It improves the accuracy and efficiency of road crack detection, reduces the influence of human factors, realizes automated and accurate road crack detection and classification, and improves the performance indicators of the detection model such as accuracy, recall and average accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119090798A_ABST
    Figure CN119090798A_ABST
Patent Text Reader

Abstract

The invention discloses a road crack detection method based on YOLOv8 improvement, and belongs to the field of image target detection, and the method comprises the steps: carrying out the preprocessing of a road crack image, and dividing the preprocessed road crack image into a training set and a verification set; a DCNv2 module is introduced into a C2f module to construct a C2fDCN module, and the C2fDCN module is introduced into a neck network to obtain a feature fusion network; introducing a CA attention mechanism module into the backbone network of the YOLOv8 model to obtain a feature extraction network; inputting the training set into the network model for iterative training to obtain a target network model; and inputting the test set into the target network model for testing to obtain a model detection result and a performance evaluation result. Compared with other mainstream target detection algorithms, the method has the advantages that high detection precision is achieved with low model complexity, cracks existing in the road image can be accurately and automatically marked, and the recognized cracks can be automatically classified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of target detection and deep learning, and relates to a road crack detection method based on an improvement of YOLOv8. Background Art

[0002] As an infrastructure construction, highway is an important project for the rapid development of a country's economy. A complete highway network can promote economic and social development. Therefore, governments of various countries invest a large amount of budget every year to build and maintain roads to promote traffic between different areas of cities and between cities. Due to various reasons such as weather changes, road aging and traffic accidents, roads are prone to damage, and cracks are one of the most common road damages. The appearance of cracks indicates that the structure of the road has been damaged to varying degrees, which will not only accelerate the damage inside the road and reduce the tensile strength of the road, but also pose a potential threat to vehicle driving safety. Therefore, the government needs to conduct regular assessment and inspection of roads.

[0003] Traditional pavement inspection methods are mostly manual inspections. However, manual inspection is not only time-consuming and laborious, but also its inspection results are easily affected by the subjective consciousness of different inspectors. With the development of image processing technology and deep learning, the efficiency and accuracy of automatic target detection technology have been greatly improved compared with traditional manual inspection, and it is not easily interfered by human factors. Target detection based on deep learning can well extract and classify target features, and has the advantages of fast detection speed, high accuracy, strong adaptability, etc., and introduces end-to-end and data-driven ideas. It mainly applies the extraction and classification functions of target features by convolutional neural networks, feature forward propagation and weight sharing methods, which greatly reduces the complexity of the model. Kim et al. introduced a new crack assessment framework for concrete structures, which uses masks and position-based fully convolutional neural networks (Mask R-CNN) to detect cracks and uses some morphological operations on the detected crack masks to quantify cracks. Bang et al. proposed a deep learning-based detection to quantify structural damage by using structured light and depth cameras. In addition, Li et al. proposed a multi-layer feature fusion network based entirely on Faster Region-based Convolutional Neural Network (Faster R-CNN) to obtain automated tunnel surface defect detection. In recent years, many experts have also used the YOLO series of algorithms to achieve real-time detection of road cracks, but there are still problems of low accuracy and difficulty in deployment. Therefore, the present invention is committed to exploring a target detection model that can accurately detect road cracks. Summary of the invention

[0004] In view of the above problems, the present invention provides a road crack detection method based on an improved YOLOv8, which can detect and automatically classify road cracks and help users obtain crack detection results. The method comprises the following steps:

[0005] Step S1, introducing a road crack dataset, converting the format of the annotation file and removing the images with incorrect annotations, and dividing the road crack images into a training set and a validation set;

[0006] Step S2, constructing a C2f_DCN module by introducing a deformable convolution module DCN v2 into the C2f module, optimizing the YOLOv8 target detection algorithm in combination with the CA attention mechanism, and constructing a road crack detection method based on the improved YOLOv8;

[0007] Step S3: input the training set into the improved YOLOv8 model for training to obtain a road crack detection model;

[0008] Step S4: input the test set into the road crack detection model to obtain the road crack detection result.

[0009] The step S1 specifically includes:

[0010] S11. Use the GRDDC2020 road crack image public dataset and divide it into a training set and a validation set in a ratio of 8:2;

[0011] The step S2 specifically includes:

[0012] S21, introducing the C2f_DCN module formed by constructing the C2f module through the variable convolution module DCNv2 into the neck network of YOLOv8 to obtain a feature fusion network;

[0013] S21, introducing the CA attention mechanism into the last layer of the feature extraction network of YOLOv8 to obtain the target feature extraction network;

[0014] The construction step S3 of the C2f_DCN module specifically includes:

[0015] The S31 and C2f modules include a sequentially connected convolution Conv module, a Split module, N parallel connected Bottleneck modules, and a convolution Conv module, and a DCN v2_Bottleneck module is introduced to replace the original Bottleneck module;

[0016] S32, after the input image information passes through a convolution layer, the number of channels is evenly divided into two parts. The image information of half of the number of channels is processed by the DCN v2_Bottleneck module, and the image information of the other half of the number of channels is spliced ​​with the processed information in a residual manner. Finally, the spliced ​​information is processed by a convolution layer.

[0017] The CA attention module is introduced into the last layer of the YOLOv8 backbone network to obtain a feature extraction network.

[0018] The step S4 of inputting the training set into the network model for iterative training comprises:

[0019] S41, inputting the training set into the network model, and performing 200 rounds of iterative training on the network model through the SGD optimizer until the network model converges to obtain the target network model.

[0020] S42: Input the test set into the target network model to obtain a road crack detection result. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 It is a flow chart of a road crack detection method improved based on YOLOv8 of the present invention.

[0022] Figure 2 This is a structural diagram of the YOLOv8 network model of the present invention.

[0023] Figure 3 A C2f_DCN structure diagram provided by the present invention

[0024] Figure 4 This is the improved YOLOv8 network structure diagram of the present invention. DETAILED DESCRIPTION

[0025] The technical solution of the present invention is described in detail below with reference to the accompanying drawings:

[0026] As attached Figure 1 , the present invention provides a road crack detection method based on deep learning network, comprising the following steps:

[0027] S1. Introduce the road crack dataset, convert the format of the annotation file and remove the images with incorrect annotations, and divide the road crack images into training set and validation set.

[0028] The public dataset GRDDC2020 dataset is used in the example of the present invention. The dataset contains 21,041 road images from three different countries, and the sample sizes of the three countries are 10,506, 7,706, and 2,829, respectively. There are 10 categories in the dataset: ['d00', 'd01', 'd0w0', 'd10', 'd11', 'd20', 'd40', 'd43', 'd44', 'd50'], and the meanings of each category are: d00: longitudinal crack; d01 (d0w0 is an incorrect label): longitudinal joint; d10: transverse crack; d11: transverse joint; d20: crack; d40: pothole; d43: blurred intersection; d44: blurred white line; d50: manhole cover. The present invention divides it into a training set and a validation set in a ratio of 8:2. The dataset has different annotated categories for different countries, and only four categories of road crack annotations are retained, namely D00: longitudinal cracks, D10: transverse cracks, D20: mesh cracks, and D40: potholes. The filtered dataset contains 14,007 annotated images, and is randomly divided into training and validation sets in a ratio of 8:2.

[0029] S2. By introducing the deformable convolution module DCN v2 into the C2f module, the C2f_DCN module is constructed, and the YOLOv8 target detection algorithm is optimized by combining the CA attention mechanism to construct a road crack detection method based on the improved YOLOv8.

[0030] First, the C2f_DCN module formed by constructing the C2f module through the variable convolution module DCNv2 is introduced into the neck network of YOLOv8 to obtain a feature fusion network. The C2f module includes a sequentially connected convolution Conv module, a Split module, N parallel connected Bottleneck modules and a convolution Conv module. The DCN v2_Bottleneck module is introduced to replace the original Bottleneck module. The calculation formula of the variable convolution is:

[0031]

[0032] in is the input feature map, is the weight of the variable convolution, is the output feature map, and is the offset value of the input feature map sampling position, and the offset value It can be learned during the training process and can be expressed as:

[0033]

[0034] in is the center of the receptive field, is the learned offset value. The offset value is calculated based on the input feature map and the output feature map, so that the model can learn the most suitable sampling position for each point.

[0035] Then, based on the above, the CA attention mechanism is introduced into the last layer of the YOLOv8 backbone network to obtain the feature extraction network. The calculation formula of the CA attention mechanism is:

[0036]

[0037] in is the input feature map, is the feature map obtained in the height direction, is the feature map obtained in the width direction, is the output feature map.

[0038] S3, input the training set into the improved YOLOv8 model for training to obtain a road crack detection model;

[0039] The training set is input into the network model, and the network model is iteratively trained for 200 rounds through the SGD optimizer until the network model converges to obtain the target network model.

[0040] In the embodiment of the present application, the YOLO v8s model size is used as a training example, and its hyperparameters are set as follows: the initial learning rate is set to 0.01 in the SGD optimizer, the batch size is set to 16, the number of iterations is 200, and the IOU threshold is 0.5. The optimized weight parameter model is obtained through multiple rounds of iterative training as the target network model.

[0041] S4. Input the test set into the road crack detection model to obtain the road crack detection result.

[0042] After the test set is input into the optimal target network model obtained by S3 for testing and the test results are obtained, the performance of the tested target network model is evaluated by the preset evaluation indicators, where the performance evaluation indicators include precision P, recall R, average precision AP, and average AP value mAP.

[0043] The present invention proposes a road crack detection method based on deep learning. First, the road crack data set is preprocessed and the data set is divided. Then, a new target detection network model is improved through a module improvement method. Then, a training set is input into the target network model for iterative training to obtain an optimal target detection model. Finally, a test set is input into the optimal target detection model for testing and outputting the test results. Then, the performance of the model is evaluated through preset evaluation indicators.

Claims

1. A road crack detection method based on improved YOLOv8, characterized in that: The method comprises the following steps: Step S1, introducing a road crack dataset, converting the format of the annotation file and removing the images with incorrect annotations, and dividing the road crack images into a training set and a validation set; Step S2, constructing a C2f_DCN module by introducing a deformable convolution module DCN v2 into the C2f module, optimizing the YOLOv8 target detection algorithm in combination with the CA attention mechanism, and constructing a road crack detection method based on the improved YOLOv8; Step S3: input the training set into the improved YOLOv8 model for training to obtain a road crack detection model; Step S4: input the test set into the road crack detection model to obtain the road crack detection result.

2. According to the improved road crack detection method based on YOLOv8 as described in claim 1, it is characterized in that: The step S1 specifically includes: S11. Use the GRDDC2020 road crack image public dataset and divide it into a training set and a validation set in a ratio of 8:

2.

3. According to the improved road crack detection method based on YOLOv8 as described in claim 1, it is characterized in that: The step S2 specifically includes: S21, introducing the C2f_DCN module formed by constructing the C2f module through the variable convolution module DCNv2 into the neck network of YOLOv8 to obtain a feature fusion network; S21. Introduce the CA attention mechanism into the last layer of the feature extraction network of YOLOv8 to obtain the target feature extraction network.

4. According to the improved road crack detection method based on YOLOv8 as described in claim 3, it is characterized in that: The construction step S3 of the C2f_DCN module specifically includes: The S31 and C2f modules include a sequentially connected convolutional Conv module, a Split module, N parallel connected Bottleneck modules, and a convolutional Conv module. The DCN v2_Bottleneck module is introduced to replace the original Bottleneck module. S32, after the input image information passes through a convolutional layer, the number of channels is evenly divided into two parts; half of the image information of the channels is processed by the DCN v2_Bottleneck module, and the image information of the other half of the channels is spliced ​​with the processed information in a residual manner; finally, the spliced ​​information is processed by a convolutional layer.

5. A road crack detection method based on improved YOLOv8 according to claim 3 or 4, characterized in that: The CA attention module is introduced into the last layer of the YOLOv8 backbone network to obtain a feature extraction network.

6. A road crack detection method based on improved YOLOv8 according to claim 3 or 4, characterized in that: The step S4 of inputting the training set into the network model for iterative training comprises: S41, inputting the training set into the network model, and performing 200 rounds of iterative training on the network model through the SGD optimizer until the network model converges to obtain a target network model; S42: Input the test set into the target network model to obtain a road crack detection result.

Citation Information

Cited By

  • Damage detection method for smart track road

    CN120298991A

  • Ground penetrating radar image crack identification method and system based on frequency domain enhanced YOLOv11

    CN121837191A

  • Underwater concrete structure crack detection method based on deep learning and artificial intelligence

    CN122313238A