Pavement disease detection method based on deep learning
Through deep learning technology and yolov5 network, combined with on-board cameras and Kalman filter algorithms, the problem of low accuracy and efficiency of existing pavement disease detection methods is solved, accurate category detection and real-time counting of pavement diseases are achieved, and detection efficiency is improved. accuracy and efficiency.
Patent Information
- Application Number
- CN202111232233.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-22
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2041-10-22
AI Technical Summary
Existing pavement disease detection methods have problems such as low accuracy, low efficiency, and inability to update in real time. In particular, they cannot accurately detect the specific categories and counts of pavement diseases, which affects road maintenance and maintenance.
A pavement disease detection method based on deep learning is used to capture video frame images through a vehicle camera, and the yolov5 network is used as the detection model. It is combined with the gradient descent method for iterative training to achieve category detection and deduplication counting of road disease, and spatial location merging and Kalman filter algorithm for disease treatment.
It achieves accurate category detection and real-time counting of pavement diseases without affecting highway traffic efficiency, improves detection accuracy and response speed, and is suitable for large-scale pavement disease assessment.
Smart Images

Figure CN113962960B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of image processing, and in particular relates to a road surface disease detection method, which can be used for road surface inspection and maintenance. Technical Background
[0002] The material and structure of highway pavement will be irreversibly affected by long-term exposure to the natural environment, which greatly shortens the service life of the highway pavement. Therefore, the detection of pavement defects is particularly important for the maintenance and inspection of highway pavements. Timely assessment and understanding of pavement defects are required to avoid traffic accidents.
[0003] The most important part of evaluating road pavement performance is the distribution of pavement defects. The detection of pavement defects provides data support for pavement maintenance and repair. At present, the common methods for detecting pavement defects mainly include manual on-site evaluation and visual analysis methods. Among them, the manual on-site evaluation method must first close the traffic, which seriously affects the traffic efficiency of highway traffic. In addition, this method is greatly affected by the subjective factors of the monitoring personnel, has low efficiency, and is not suitable for large-scale pavement defect detection. The visual analysis method mainly collects the type and degree of damage of pavement defects by taking photos and recording videos. There are two main ways to process the collected data: one is to manually complete the analysis of the defects in the video and make a rough analysis of the pavement damage condition, which requires a large amount of data processing calculations; the other is to complete the analysis and processing of the defects in the video with the support of specific image processing algorithms.
[0004] The above two methods for detecting pavement defects have low accuracy, are cumbersome to perform, and are inefficient, and are not suitable for actual development.
[0005] The patent document with application publication number CN106529593A discloses a patent application entitled "Pavement Disease Detection Method and System", and its implementation scheme is as follows: collect a road surface image and divide the road surface image into sub-regions of preset size; determine the gray level co-occurrence matrix of each sub-region, and obtain the structural similarity of each sub-region and each adjacent sub-region according to each gray level co-occurrence matrix; count the number of sub-regions corresponding to the structural similarity greater than the preset structural similarity threshold among the obtained structural similarities; obtain the ratio of the statistical number of sub-regions to the total number of sub-regions divided by the road surface image, and when the ratio is less than the preset ratio threshold, it is determined that the road surface image has road surface diseases. This method uses the collected road surface image and will not affect the traffic efficiency of highway traffic, but this method can only obtain whether there is a road surface disease, and cannot know the specific category of road surface diseases and the accurate count of different categories of diseases, which has great problems in the specific evaluation of road surface diseases.
[0006] The patent document with application publication number CN101565925 discloses a patent application entitled "Pavement Defect Investigation and Processing Method", and its implementation scheme is as follows: first, an electronic satellite map program is run on a networked computer to find the coordinates of the starting point, route turning point and end point of the investigated road section, or on a detailed road traffic map, reference objects on both sides of the road, such as villages, gas stations, intersections, bridges and other information, calculate the length information of the road section and divide the investigated road into sections; then the above-mentioned road section investigation information is imported into a handheld computer, and the handheld computer is used to record the pavement defect location information on site with different marks according to the defect contour, and the defect investigation and statistics are performed through the handheld computer, and then the defect data counted by the handheld computer is opened on the computer, and the pavement defects within each set distance of a certain length are statistically calculated, and the analyzed data tables and charts are saved in the computer. Although this method solves the problem of affecting road traffic efficiency in the traditional road disease detection process, since the road sections are obtained on electronic satellite maps, the real-time performance of road surface updates is poor, and it cannot be applied to roads without reference objects. In addition, the specific category of road surface diseases cannot be obtained, and the road surface disease information cannot be evaluated, which affects the effective inspection and maintenance of the road surface. Summary of the invention
[0007] The purpose of the present invention is to overcome the defects of the above-mentioned prior art and propose a pavement disease detection method based on deep learning to update pavement information in real time, detect the specific categories of pavement diseases and accurately count them, so as to realize the evaluation of pavement disease information.
[0008] To achieve the above object, the technical solutions adopted by the present invention include the following:
[0009] (1) Use the vehicle-mounted camera to capture road video frame images and obtain the training sample set L:
[0010] (2) Select yolov5 network as pavement disease detection model B:
[0011] (3) Input the training sample set L into the pavement disease detection model B, and iteratively train the pavement disease detection model B using the gradient descent method to obtain the trained pavement disease detection model B′;
[0012] (4) Types of pavement damage in inspection videos:
[0013] (4a) Using a vehicle-mounted camera to shoot a road surface video S that needs to be detected as the input of the road surface disease detection model B′, a frame-by-frame and pixel-by-pixel comparison is performed to obtain a video S′ containing the road surface disease category and confidence information;
[0014] (4b) The video S' is divided into frames to obtain a video frame image set C = {C1, C2, ..., Cq ,...,C n}, where C q represents the qth video frame image containing pavement disease information, n represents the number of video frame images, n≥100;
[0015] (5) Determine the category of the disease at the same position on a single frame image in the video frame image set C:
[0016] (5a) Determine the type of disease based on the detection frame marking of the disease at the same location:
[0017] If the disease at the same position in a single frame image in the video frame image set C is marked by a detection frame, the category of the detection frame is the category of the disease;
[0018] If the defect at the same position of a single frame image in the video frame image set C is marked by multiple detection frames, determine whether the categories of the detection frames are the same: if the categories of the detection frames are different, no processing is performed; if the categories of the detection frames are the same, execute (5b);
[0019] (5b) The disease processing method based on spatial position merging is used to merge the detection frames to determine the category of the disease, and the pavement disease detection results are deduplicated:
[0020] (5b1) Sort the confidence scores of the output detection frames in descending order, retain the first two detection frames and store their upper left corner coordinates and lower right corner coordinates in set J, and remove all other detection frames; let the upper left corner coordinates of the two remaining detection frames be (Lx1, Ly1) and (Lx2, Ly2), and the lower right corner coordinates be (Rx1, Ry1) and (Rx2, Ry2);
[0021] (5b2) The two detection frames are combined according to their spatial positions in the image to determine the category of the disease at that position:
[0022] When the four conditions of Lx1<Lx2<Rx1, Lx2<Rx1<Rx2, Ry2<Ry1<Ly2, Ry1<Ly2<Ly1 are met at the same time, the two detection frames are merged into a detection frame with the coordinates of the upper left corner (Lx=Lx1, Ly=Ly1) and the coordinates of the lower right corner (Rx=Rx2, Ry=Ry2), and the category of the detection frame is the category of the disease;
[0023] When the four conditions of Lx2<Lx1<Rx2, Lx1<Rx2<Rx1, Ry1<Ry2<Ly1, and Ry2<Ly1<Ly2 are met at the same time, the two detection frames are merged into a detection frame with the coordinates of the upper left corner (Lx=Lx2, Ly=Ly2) and the coordinates of the lower right corner (Rx=Rx1, Ry=Ry1), and the category of the detection frame is the category of the disease;
[0024] When the four conditions of Lx1<Lx2<Rx1, Ry1<Ry2<Ly1, Lx2<Rx1<Rx2, Ry2<Ly1<Ly2 are met at the same time, the two detection frames are merged into a detection frame with the coordinates of the upper left corner (Lx=Lx1, Ly=Ly2) and the coordinates of the lower right corner (Rx=Rx2, Ry=Ry1), and the category of the detection frame is the category of the disease;
[0025] When the four conditions of Lx2<Lx1<Rx2, Ry2<Ry1<Ly2, Lx1<Rx2<Rx1, Ry1<Ly2<Ly1 are met at the same time, the two detection frames are merged into a detection frame with the coordinates of the upper left corner (Lx=Lx2, Ly=Ly1) and the coordinates of the lower right corner (Rx=Rx1, Ry=Ry2), and the category of the detection frame is the category of the disease;
[0026] When the four conditions of Lx1<Lx2<Rx1, Ry1<Ly2<Ly1, Lx1<Rx2<Rx1, Ry1<Ry2<Ly1 are met at the same time, the two detection frames are merged into a detection frame with the coordinates of the upper left corner (Lx=Lx1, Ly=Ly1) and the coordinates of the lower right corner (Rx=Rx1, Ry=Ry1), and the category of the detection frame is the category of the disease;
[0027] When the four conditions of Lx2<Lx1<Rx2, Ry2<Ly1<Ly2, Lx2<Rx1<Rx2, Ry2<Ry1<Ly2 are met at the same time, the two detection frames are merged into a detection frame with the coordinates of the upper left corner (Lx=Lx2, Ly=Ly2) and the coordinates of the lower right corner (Rx=Rx2, Ry=Ry2), and the category of the detection frame is the category of the disease;
[0028] (6) De-duplication and counting of the same disease in multiple consecutive frames of images:
[0029] (6a) using the Kalman filter algorithm to assign a tracker for predicting the movement position of the disease in the next frame to each target disease appearing in the video, wherein each tracker corresponds to a disease tracking number m;
[0030] (6b) Correcting the predicted position according to the detection result of the road surface defect position in the next frame to obtain the optimal position estimate of the defect tracked in this frame;
[0031] (6c) Compare the defect at the optimal position in the current frame with the tracked defect in the previous frame:
[0032] If the two are the same disease, the disease is counted in the two frames before and after to eliminate duplication;
[0033] If the two are not the same disease, the tracked diseases are counted to obtain real-time tracking counts and detection results of the same disease between consecutive frames.
[0034] Compared with the prior art, the present invention has the following advantages:
[0035] 1) The present invention uses the trained pavement damage detection model B′ to detect the road surface that needs to be evaluated, and obtains a detection frame marked with the pavement damage category. This will not only not affect the traffic efficiency of highway traffic, but also can realize the detection of specific types of pavement damage.
[0036] 2) The present invention adopts a spatial position merging disease processing method to merge the pavement disease detection results in a single frame image to achieve deduplication of diseases at the same position, and adopts a Kalman filter algorithm to achieve deduplication of the same disease in multiple consecutive frames of images, so as to obtain real-time and accurate tracking and counting of pavement diseases.
[0037] 3) The present invention selects the yolov5 network as the pavement disease detection model B to iteratively train the pavement disease detection model B′ for detecting pavement diseases, which not only has a fast response speed and high efficiency, but also improves the accuracy of pavement disease detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 It is an implementation flow chart of the present invention. DETAILED DESCRIPTION
[0039] The present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0040] Reference Figure 1 , the implementation steps of this example are as follows:
[0041] Step 1: Use the vehicle-mounted camera to capture road video frame images and obtain the training sample set L:
[0042] 1.1) Use the vehicle-mounted camera to shoot road video frames and extract 8000 video frames containing road disease images, A = {A1, A2, ..., A i ,...,A N}, and use the rectangular box in the labellmg software to label each video frame image A i The pavement defects of the categories including transverse cracks, longitudinal cracks, cracks, and rutting are labeled to obtain a label set P containing defect information = {P1, P2, ..., P i ,...,P N}, where N = 8000, A i represents the i-th road surface image containing the disease, P i Indicates Ai The corresponding label containing pavement damage information;
[0043] 1.2) The label set P of different disease information is P = {P1, P2, ..., P i ,...,P N} and its one-to-one corresponding original video frame image A={A1,A2,...,A i ,...,A N} to form a training sample set: L = {L1, L2, ..., L j ,...,L N}, where L j P j With A j The jth training sample formed by the combination, where j = 1, 2, ..., N.
[0044] Step 2: Select the yolov5 network as the pavement disease detection model B.
[0045] The yolov5 network includes a backbone network Backbone, a target feature network Neck and a detection network Head.
[0046] Among them: the backbone network Backbone, including the CSPdarknet module and the spatial pyramid pooling SPP module, the CSPdarknet module includes the Focus submodule, a convolution layer with 32 convolution kernels and the BottleneckCSP submodule, the BottleneckCSP submodule includes the sequentially connected convolution layer Conv, the batch normalization layer BN, the activation function LeakyRelu and the residual layer;
[0047] The target feature network Neck is composed of the feature pyramid FPN and the bottom-up pyramid PAN;
[0048] The detection network Head consists of three parallel convolutional layers.
[0049] The backbone network Backbone, target feature network Neck and detection network Head are cascaded in sequence to form the pavement disease detection model B.
[0050] Step 3: Iteratively train the pavement defect detection model B.
[0051] The training sample set L is input into the pavement disease detection model B, and the pavement disease detection model B is iteratively trained using the gradient descent method to obtain the trained pavement disease detection model B′, which is implemented as follows:
[0052] 3.1) Assume that the maximum number of iterations is Y, Y = 800, and the pavement disease detection model of the yth iteration is B y , initialization iteration number y = 0, B = B y ;
[0053] 3.2) Use the training sample set L as the pavement disease detection model B y The input is pushed forward, and the Focus submodule in the backbone network is used to j Slice the image to get a 304*304*12 feature map, and then perform a convolution operation with 32 convolution kernels to get a 304*304*32 feature map. Change the feature map channel from 12 to 32 to retain the position information and improve the receptive field.
[0054] 3.3) Input the result obtained in 3.2) into the sequentially connected convolutional layer Conv, batch normalization layer BN, activation function Leaky Relu and residual layer in the BottleneckCSP submodule to complete the feature extraction and obtain a 38*38*32 feature map;
[0055] 3.4) Input the result obtained in 3.3) into the spatial pyramid pooling module SPP, extract features of different scales through pooling layers with different kernel sizes of 11, 55, 99, and 1313, and fuse the extracted features to obtain a 19*19*32 feature map;
[0056] 3.5) The feature map obtained in 3.4) is sent to the target feature network Neck. Through the top-down FPN structure, the high-level features are upsampled and fused with the low-level features to obtain the predicted feature map. The predicted feature map is then passed to the top layer through the bottom-up pyramid PAN structure to obtain the feature map containing semantic and positioning information. in is the jth feature map containing semantic and positioning information;
[0057] 3.6) Adopting the border loss function CIOU_Loss, through With L j Computational pavement disease detection model B y The cross entropy loss value Loss s :
[0058]
[0059] Among them, IOU represents the evaluation The predicted box and L jThe intersection-over-union ratio of the real box, Distance_C represents the distance between the diagonals in the minimum bounding rectangle of the target position, Distance_2 represents the Euclidean distance between the two center points of the predicted box and the minimum bounding rectangle, and v is a parameter to measure the consistency of the aspect ratio;
[0060] 3.7) Through Loss s Pavement disease detection model B y The weights are updated to obtain the pavement disease detection model B after the yth iteration. y ;
[0061] 3.8) Determine whether the current number of iterations reaches the set maximum number of iterations Y. If so, obtain the trained pavement disease detection model B′. Otherwise, set y=y+1 and return to 3.3).
[0062] Step 4: inspect the categories of road surface defects in the video and obtain a set of video frame images.
[0063] 4.1) Use the vehicle camera to shoot the road surface video S to be detected as the input of the road surface disease detection model B′, compare the pixels in each frame of the video with the features learned in B′, and obtain the video S′ containing the road surface disease category and confidence information marked;
[0064] 4.2) Divide the video S' into frames and obtain a video frame image set C = {C1, C2, ..., C q ,...,C n}, where C q represents the qth video frame image containing pavement disease information, n represents the number of video frame images, n=200.
[0065] Step 5: Determine the category of the disease at the same position in a single frame image of the video frame image set C.
[0066] 5.1) Determine the type of disease based on the detection frame marking of the disease at the same location:
[0067] If the disease at the same position in a single frame of the video frame image set C is marked by a detection frame, the category of the detection frame is the category of the disease;
[0068] If the defect at the same position in a single frame of the video frame image set C is marked by multiple detection frames, determine whether the categories of the detection frames are the same: if the categories of the detection frames are different, no processing is performed; if the categories of the detection frames are the same, execute 5.2);
[0069] 5.2) The disease processing method based on spatial position merging is used to merge the detection frames to determine the category of the disease and complete the deduplication of the road disease detection results:
[0070] 5.2.1) Sort the confidence scores of the output detection frames in descending order, retain the first two detection frames and store their upper left corner coordinates and lower right corner coordinates in set J, and remove all other detection frames; let the upper left corner coordinates of the two remaining detection frames be (Lx1, Ly1) and (Lx2, Ly2) and the lower right corner coordinates be (Rx1, Ry1) and (Rx2, Ry2) respectively;
[0071] 5.2.2) Combine the two detection frames according to their spatial positions in the image to determine the category of the disease at that position:
[0072] When the four conditions of Lx1<Lx2<Rx1, Lx2<Rx1<Rx2, Ry2<Ry1<Ly2, Ry1<Ly2<Ly1 are met at the same time, the two detection frames are merged into a detection frame with the coordinates of the upper left corner (Lx=Lx1, Ly=Ly1) and the coordinates of the lower right corner (Rx=Rx2, Ry=Ry2), and the category of the detection frame is the category of the disease;
[0073] When the four conditions of Lx2<Lx1<Rx2, Lx1<Rx2<Rx1, Ry1<Ry2<Ly1, and Ry2<Ly1<Ly2 are met at the same time, the two detection frames are merged into a detection frame with the coordinates of the upper left corner (Lx=Lx2, Ly=Ly2) and the coordinates of the lower right corner (Rx=Rx1, Ry=Ry1), and the category of the detection frame is the category of the disease;
[0074] When the four conditions of Lx1<Lx2<Rx1, Ry1<Ry2<Ly1, Lx2<Rx1<Rx2, Ry2<Ly1<Ly2 are met at the same time, the two detection frames are merged into a detection frame with the coordinates of the upper left corner (Lx=Lx1, Ly=Ly2) and the coordinates of the lower right corner (Rx=Rx2, Ry=Ry1), and the category of the detection frame is the category of the disease;
[0075] When the four conditions of Lx2<Lx1<Rx2, Ry2<Ry1<Ly2, Lx1<Rx2<Rx1, Ry1<Ly2<Ly1 are met at the same time, the two detection frames are merged into a detection frame with the coordinates of the upper left corner (Lx=Lx2, Ly=Ly1) and the coordinates of the lower right corner (Rx=Rx1, Ry=Ry2), and the category of the detection frame is the category of the disease;
[0076] When the four conditions of Lx1<Lx2<Rx1, Ry1<Ly2<Ly1, Lx1<Rx2<Rx1, Ry1<Ry2<Ly1 are met at the same time, the two detection frames are merged into a detection frame with the coordinates of the upper left corner (Lx=Lx1, Ly=Ly1) and the coordinates of the lower right corner (Rx=Rx1, Ry=Ry1), and the category of the detection frame is the category of the disease;
[0077] When the four conditions of Lx2<Lx1<Rx2, Ry2<Ly1<Ly2, Lx2<Rx1<Rx2, Ry2<Ry1<Ly2 are met at the same time, the two detection frames are merged into a detection frame with the upper left corner coordinates of (Lx=Lx2, Ly=Ly2) and the lower right corner coordinates of (Rx=Rx2, Ry=Ry2), and the category of the detection frame is the category of the disease.
[0078] Step 6: remove duplicates of the same defect in multiple consecutive frames of images.
[0079] 6.1) Use the Kalman filter algorithm to assign a tracker that predicts the movement position of the target disease in the next frame to each target disease that appears in the video. Use the multi-target tracking sort in the Kalman filter algorithm to create a unique identifier for each target of different categories entering the video frame image. The identifier is the assigned tracker, where each tracker corresponds to a disease tracking number m;
[0080] 6.2) Correct the predicted position according to the detection result of the road defect position in the next frame to obtain the optimal position estimate of the defect tracked in this frame;
[0081] 6.2.1 Create a tracker list TL to store the tracker with the tracking number m corresponding to the disease that was successfully tracked in the previous frame of the video;
[0082] 6.2.2 Create a detection list DL to store the detection results of pavement defects obtained by extracting features of the current frame using the pavement defect detection model B′;
[0083] 6.2.3 Traverse each tracker in the tracker list TL, predict the position of the road surface disease in the current frame based on the position of the road surface disease in the previous frame saved in TL, and save all the predicted disease positions in the current frame into the prediction list PL;
[0084] 6.2.4 Update TL according to DL and PL:
[0085] Calculate the intersection-over-union ratio of the rectangular boxes represented by each detection result and prediction result in DL and PL to obtain the intersection-over-union ratio matrix IOU;
[0086] Taking IOU as the weight parameter, the Hungarian algorithm is used to match each detection result and prediction result to complete the update of the tracker list TL. The updated tracker list TL' saves the optimal position estimate of the disease in the current frame of the video.
[0087] Step 7, count the different types of diseases.
[0088] Compare the optimally located defect in the current frame with the tracked defect in the previous frame:
[0089] 7.1) If the two are the same disease, then the disease is deduplicated and counted in the two frames before and after, as follows:
[0090] 7.1.1) Assign a global counter to each different category of pavement damage;
[0091] 7.1.2) Initialize a tracking number list to store the numbers of the road surface diseases that have been counted;
[0092] 7.1.3) Under the premise of ensuring that it is the same disease, determine whether the tracking number of the pavement disease exists in the tracking number list:
[0093] If it exists, the repeated counting of the tracked disease will be cancelled during the counting;
[0094] If it does not exist, the global counter of this category is increased by one to obtain updated pavement disease statistics information.
[0095] 7.2) If the two are not the same disease, the tracked diseases are counted to obtain the real-time tracking count and detection results of the same disease between consecutive frames.
[0096] The above description is only a specific example of the present invention and does not constitute any limitation to the present invention. It is obvious that for professionals in this field, after understanding the content and principles of the present invention, they may make various modifications and changes in form and details without departing from the principles and structures of the present invention. However, these modifications and changes based on the ideas of the present invention are still within the scope of protection of the claims of the present invention.
Claims
1. A road surface disease detection method based on deep learning, characterized in that: include: (1) Use the vehicle-mounted camera to capture road video frame images and obtain the training sample set L: (2) Select yolov5 network as pavement disease detection model B: (3) Input the training sample set L into the pavement disease detection model B, and iteratively train the pavement disease detection model B using the gradient descent method to obtain the trained pavement disease detection model B′; (4) Types of pavement damage in inspection videos: (4a) Using a vehicle-mounted camera to shoot a road surface video S that needs to be detected as the input of the road surface disease detection model B′, a frame-by-frame and pixel-by-pixel comparison is performed to obtain a video S′ containing the road surface disease category and confidence information; (4b) The video S' is divided into frames to obtain a video frame image set C = {C1, C2, ..., C q ,...,C n }, where C q represents the qth video frame image containing pavement disease information, n represents the number of video frame images, n≥100; (5) Determine the category of the disease at the same position in a single frame image of the video frame image set C: (5a) Determine the type of disease based on the detection frame marking of the disease at the same location: If the disease at the same position in a single frame image in the video frame image set C is marked by a detection frame, the category of the detection frame is the category of the disease; If the same defect in a single frame image in the video frame image set C is marked by multiple detection frames, it is determined whether the categories of the detection frames are the same: if the categories of the detection frames are different, no processing is performed; If the detection box categories are the same, execute (5b); (5b) The disease processing method based on spatial position merging is used to merge the detection frames to determine the category of the disease, and the pavement disease detection results are deduplicated: (5b1) Sort the confidence scores of the output detection frames in descending order, retain the first two detection frames and store their upper left corner coordinates and lower right corner coordinates in set J, and remove all other detection frames; let the upper left corner coordinates of the two remaining detection frames be (Lx1, Ly1) and (Lx2, Ly2) and the lower right corner coordinates be (Rx1, Ry1) and (Rx2, Ry2) respectively; (5b2) The two detection frames are combined according to their spatial positions in the image to determine the category of the disease at that position: When the four conditions of Lx1<Lx2<Rx1, Lx2<Rx1<Rx2, Ry2<Ry1<Ly2, Ry1<Ly2<Ly1 are met at the same time, the two detection frames are merged into a detection frame with the coordinates of the upper left corner (Lx=Lx1, Ly=Ly1) and the coordinates of the lower right corner (Rx=Rx2, Ry=Ry2), and the category of the detection frame is the category of the disease; When the four conditions of Lx2<Lx1<Rx2, Lx1<Rx2<Rx1, Ry1<Ry2<Ly1, and Ry2<Ly1<Ly2 are met at the same time, the two detection frames are merged into a detection frame with the coordinates of the upper left corner (Lx=Lx2, Ly=Ly2) and the coordinates of the lower right corner (Rx=Rx1, Ry=Ry1), and the category of the detection frame is the category of the disease; When the four conditions of Lx1<Lx2<Rx1, Ry1<Ry2<Ly1, Lx2<Rx1<Rx2, Ry2<Ly1<Ly2 are met at the same time, the two detection frames are merged into a detection frame with the coordinates of the upper left corner (Lx=Lx1, Ly=Ly2) and the coordinates of the lower right corner (Rx=Rx2, Ry=Ry1), and the category of the detection frame is the category of the disease; When the four conditions of Lx2<Lx1<Rx2, Ry2<Ry1<Ly2, Lx1<Rx2<Rx1, Ry1<Ly2<Ly1 are met at the same time, the two detection frames are merged into a detection frame with the coordinates of the upper left corner (Lx=Lx2, Ly=Ly1) and the coordinates of the lower right corner (Rx=Rx1, Ry=Ry2), and the category of the detection frame is the category of the disease; When the four conditions of Lx1<Lx2<Rx1, Ry1<Ly2<Ly1, Lx1<Rx2<Rx1, Ry1<Ry2<Ly1 are met at the same time, the two detection frames are merged into a detection frame with the coordinates of the upper left corner (Lx=Lx1, Ly=Ly1) and the coordinates of the lower right corner (Rx=Rx1, Ry=Ry1), and the category of the detection frame is the category of the disease; When the four conditions of Lx2<Lx1<Rx2, Ry2<Ly1<Ly2, Lx2<Rx1<Rx2, Ry2<Ry1<Ly2 are met at the same time, the two detection frames are merged into a detection frame with the coordinates of the upper left corner (Lx=Lx2, Ly=Ly2) and the coordinates of the lower right corner (Rx=Rx2, Ry=Ry2), and the category of the detection frame is the category of the disease; (6) De-duplication and counting of the same disease in multiple consecutive frames of images: (6a) using the Kalman filter algorithm to assign a tracker for predicting the movement position of the disease in the next frame to each target disease appearing in the video, wherein each tracker corresponds to a disease tracking number m; (6b) Correcting the predicted position according to the detection result of the road surface defect position in the next frame to obtain the optimal position estimate of the defect tracked in this frame; (6c) Compare the defect at the optimal position in the current frame with the tracked defect in the previous frame: If the two are the same disease, the disease is counted in the two frames before and after to eliminate duplication; If the two are not the same disease, the tracked diseases are counted to obtain real-time tracking counts and detection results of the same disease between consecutive frames.
2. The method according to claim 1: wherein the step (1) of obtaining a training sample set L is implemented as follows: (1a) Use a vehicle-mounted camera to capture road surface video frames and extract N video frames containing road surface defects, A = {A1, A2, ..., A i ,...,A N }, and use the rectangular box in the labellmg software to label each video frame image A i The pavement defects of the categories including transverse cracks, longitudinal cracks, cracks, and rutting are labeled to obtain a label set P containing defect information = {P1, P2, ..., P i ,...,P N },in, N ≥ 3000, A i represents the i-th road surface image containing disease, P i Indicates A i The corresponding label containing pavement damage information; (1b) The label set P of different disease information is {P1,P2,...,P i ,...,P N } and its one-to-one corresponding original video frame image A={A1,A2,...,A i ,...,A N } to form a training sample set: L = {L1, L2, ..., L j ,...,L N }, where L j P j With A j The jth training sample formed by the combination, where j = 1, 2, ..., N.
3. The method according to claim 1, wherein the yolov5 network in (2) comprises a backbone network Backbone, a target feature network Neck and a detection network Head; The backbone network Backbone includes a CSPdarknet module and a spatial pyramid pooling SPP module. The CSPdarknet module includes a Focus submodule, a convolution layer with 32 convolution kernels and a BottleneckCSP submodule. The BottleneckCSP submodule includes a sequentially connected convolution layer Conv, a batch normalization layer BN, an activation function LeakyRelu and a residual layer; The target feature network Neck is composed of a feature pyramid FPN and a bottom-up pyramid PAN. The detection network Head is composed of three parallel convolutional layers.
4. The method according to claim 1, wherein in (3), the pavement disease detection model B is iteratively trained using the gradient descent method, and the training is implemented as follows: 3a) Assume that the maximum number of iterations is Y, Y ≥ 500, and the pavement disease detection model of the yth iteration is B y , initialization iteration number y = 0, B = B y ; 3b) Use the training sample set L as the pavement disease detection model B y The input is pushed forward, and the Focus submodule in the backbone network is used to j Slice the image to get a feature map of 304*304*12, and then perform a convolution operation with 32 convolution kernels to get a feature map of 304*304*32. 3c) Input the result obtained in 3b) into the sequentially connected convolutional layer Conv, batch normalization layer BN, activation function Leaky Relu and residual layer in the BottleneckCSP submodule for feature extraction to obtain a 38*38*32 feature map; 3d) Input the result obtained in 3c) into the spatial pyramid pooling module SPP, extract features of different scales through pooling layers with different kernel sizes, and fuse the extracted features to obtain a 19*19*32 feature map; 3e) The feature map obtained in 3d) is sent to the target feature network Neck. Through the top-down FPN structure, the high-level features are upsampled and fused with the low-level features to obtain the predicted feature map. The predicted feature map is then passed to the top layer through the bottom-to-top pyramid PAN structure to transfer the low-level strong positioning features to the top layer, and a feature map containing semantic and positioning information is obtained. in is the jth feature map containing semantic and positioning information; 3f) Adopt the border loss function CIOU_Loss and pass With L j Computational pavement disease detection model B y The cross entropy loss value Loss s , and then through Loss s Pavement disease detection model B y The weights are updated to obtain the pavement disease detection model B after the yth iteration. y ; 3g) Determine whether the current number of iterations reaches the set maximum number of iterations Y. If so, obtain the trained pavement disease detection model B′. Otherwise, set y=y+1 and return to 3c).
5. According to the method described in claim 1, wherein (6a) a Kalman filter algorithm is used to assign a tracker for predicting the moving position of the target disease appearing in the video in the next frame, and a multi-target tracking sort in the Kalman filter algorithm is used to create a unique identifier for each target of different categories entering the video frame image, and the identifier is the assigned tracker.
6. The method according to claim 1, wherein in (6b), the predicted position is corrected according to the detection result of the road surface defect position in the next frame, which is implemented as follows: 6b1) creating a tracker list TL to store the trackers with tracking numbers m corresponding to the diseases that were successfully tracked in the previous frame of the video; 6b2) Creating a detection list DL to store the detection results of road surface diseases obtained after feature extraction of the current frame using the road surface disease detection model B′; 6b3) traverse each tracker in the tracker list TL, predict the position of the road surface disease in the current frame based on the position of the road surface disease in the previous frame saved in TL, and save all the predicted disease positions in the current frame into the prediction list PL; 6b4) Update TL according to DL and PL: Calculate the intersection-over-union ratio of the rectangular boxes represented by each detection result and prediction result in DL and PL to obtain the intersection-over-union ratio matrix IOU; Taking IOU as the weight parameter, the Hungarian algorithm is used to match each detection result and prediction result to complete the update of the tracker list TL. The updated tracker list TL' saves the optimal position estimate of the disease in the current frame of the video.
7. The method according to claim 1, wherein in (6c), if the disease at the optimal position in the current frame is the same as the disease tracked in the previous frame, deduplication counting is performed in the previous and next frames, which is implemented as follows: 6c1) assigning a global counter to each different type of pavement damage; 6c2) Initialize a tracking number list to store the numbers of the road surface diseases that have been counted; 6c3) Under the premise of ensuring that it is the same disease, determine whether the tracking number of the road surface disease exists in the tracking number list: If it exists, the repeated counting of the tracked disease will be cancelled during the counting; If it does not exist, the global counter of this category is increased by one to obtain updated pavement disease statistics information.
Citation Information
Patent Citations
Pavement disease detection method and system
CN106529593A
