Bridge disease detection method based on RGB-D and improved yolov5 model

By combining RGB-D data and the improved yolov5 model, multi-category qualitative and quantitative detection of bridge diseases is achieved, solving the problems of low efficiency and poor accuracy in the existing technology, and providing in-depth assessment of bridge health and reliable detection results.

CN118587157APending Publication Date: 2024-09-03泉州通维科技有限责任公司 +1

Patent Information

Application Number
CN202410603961.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-15
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

Existing bridge disease detection methods have low efficiency and poor accuracy, cannot achieve quantitative assessment of multiple types of diseases, and are not robust to changes in light and environment.

Method used

A bridge disease detection method based on RGB-D and improved yolov5 model is adopted. Through image annotation, improved yolov5 model structure, MobileNetV3 and Stem block structure, image segmentation model and MPDIoU loss function, RGB camera and depth camera are used to identify and locate the disease. and image segmentation to calculate the physical dimensions of bridge lesions.

Benefits of technology

It achieves qualitative and quantitative detection and analysis of various types of bridge diseases, in-depth assessment of bridge health, reduces maintenance costs, delays bridge aging, and provides reliable detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118587157A
    Figure CN118587157A
Patent Text Reader

Abstract

The invention discloses a bridge disease detection method based on RGB-D and an improved yolov5 model, and the method comprises the steps: collecting bridge disease image data, carrying out the marking of a training set, a test set and a verification set, building a model capable of carrying out the disease type recognition and image segmentation, obtaining an improved yolov5 model, carrying out the calibration of an RGB camera and a depth camera, and carrying out the recognition of a disease type. Calculating a rotation matrix and a translation vector, acquiring N groups of calibration plate images, calibrating internal parameters and external parameters of the two cameras, calibrating a conversion relation between the two cameras, acquiring an RGB image and a depth image of the bridge, taking the RGB image as input of a model for detection, acquiring a detection and image segmentation result, and if a disease exists, judging whether the disease exists or not. And mapping to a depth image, and calculating the size of the bridge disease. According to the method, qualitative and quantitative detection and analysis are carried out on bridge disease types through combination of image data of two cameras and an improved yov5 model, and the health condition of a bridge can be deeply evaluated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of bridge defect detection methods, and in particular to a bridge defect detection method based on machine vision analysis and judgment. Background Art

[0002] Bridges are an important part of modern transportation and infrastructure. They carry the weight of vehicles and pedestrians, ensuring the safety and smoothness of traffic. With the use and aging of bridges, the emergence of bridge diseases has become a common problem. Bridge diseases refer to various damages, defects or degradations in bridge structures, which may include cracks, corrosion, rust, collision damage, concrete spalling, etc. Therefore, bridges need to be inspected and maintained regularly. Traditional bridge disease detection methods usually require manual work, which is time-consuming, labor-intensive and inefficient. Manual inspection also has the problem of false detection and missed detection. Machine vision is currently rarely used in actual inspections. The bridge disease detection method based on machine vision and deep learning technology uses image acquisition, image processing and pattern recognition technologies to achieve automatic detection and analysis of bridge diseases, which can improve detection efficiency and accuracy compared to manual inspection.

[0003] Chinese patent application No. 202311465551.0 discloses a method for accurately positioning bridge components based on binocular vision and target detection. The method obtains a depth image of the bridge through binocular stereo matching, and uses a target detection method based on deep learning to accurately position the bridge components. Since the method uses a three-dimensional data reconstruction method based on binocular stereo matching, the quality of the depth image is heavily dependent on the image texture features of the target, and the target detection method based on deep learning only realizes target positioning without further quantitative analysis.

[0004] Chinese patent application No. 202311632023.X discloses a bridge defect detection and identification method based on a deep convolutional neural network. By constructing two deep convolutional neural networks, the method can only detect the defects, but cannot perform quantitative analysis of the defects. In addition, the efficiency and accuracy of the two deep convolutional neural networks used in the method depend on the selection of the sliding window, and the two are inversely proportional.

[0005] A bridge crack detection method, device, computer equipment and storage medium disclosed in Chinese patent application No. 202311608863.2 realizes the detection of bridge cracks by using a deep learning image segmentation model. This method can detect and quantitatively analyze bridge crack diseases, but can only identify bridge crack diseases and only perform quantitative analysis in image data, without performing quantitative evaluation of physical dimensions.

[0006] A bridge crack detection method and system with Chinese patent application number 202311528808.2 adopts a bridge crack detection method based on image edge detection. Although this method can detect bridge crack diseases to a certain extent, its detection results are easily affected by lighting and environmental changes and do not have good robustness.

[0007] In summary, the existing technology has the disadvantages of single detection disease type, poor robustness of detection algorithm, low efficiency, and inability to conduct quantitative assessment of bridge diseases. Summary of the invention

[0008] The purpose of the present invention is to provide a bridge defect detection method based on RGB-D and improved yolov5 model, which can realize qualitative and quantitative detection and analysis of bridge defect types through machine vision and deep learning technology, and can deeply evaluate the health status of the bridge.

[0009] To achieve the above purpose, the technical solution of the present invention is: a bridge disease detection method based on RGB-D and improved yolov5 model, the detection method steps are as follows:

[0010] Step 1: Collect bridge disease image data, manually annotate the bridge disease image data through image annotation tools to obtain annotated image data, and randomly sample the annotated image data in proportion to make a training set, a test set, and a validation set;

[0011] Step 2: Based on the yolov5 model, we improved it and built a model that can identify bridge damage types and perform image segmentation.

[0012] 2. Improvements based on the yolov5 model include replacing the MobileNetV3 model structure and Stem block structure with the yolov5 backbone model structure, adding an image segmentation model structure to the yolov5 model, and modifying the IoU loss function in the yolov5 model. The loss function expression of the segmentation of the added image segmentation model structure in the yolov5 model is:

[0013]

[0014] Wherein, n represents the number of categories, y(i) and P(i) are the one-hot value and predicted probability of sample i; the IoU loss function in the modified yolov5 model is specifically to replace the original IoU loss function of yolov5 with the MPDIoU loss function;

[0015] Step 3: Use the training set, test set and validation set of step 1 as data, perform model training and performance testing on the model obtained by improving the yolov5 model in step 2, and obtain the improved yolov5 model after training and validation;

[0016] Step 4: Calibrate the RGB camera and the depth camera, calculate the rotation matrix between the RGB camera and the depth camera, record it as R, and the translation vector as T.

[0017] If there is a point P in the world coordinate system, the coordinates of point P in the RGB camera coordinate system and the depth camera coordinate system are P c and P d ,but In the formula, R c is the external parameter rotation matrix of the RGB camera, T c is the translation vector of the RGB camera, R d is the extrinsic rotation matrix of the depth camera, T d is the translation vector of the depth camera,

[0018] After transformation, the correspondence between the points in the RGB camera coordinate system and the points in the depth camera coordinate system is:

[0019] The expressions of the depth camera coordinate system to the RGB camera rotation matrix and translation vector are:

[0020]

[0021] Use the RGB camera and the depth camera to collect N sets of calibration plate images in different poses in the same scene, use the calibrateCamera function in opencv to calibrate the intrinsic and extrinsic parameters of the two cameras, and then use the stereoCalibrate function in opencv to calibrate the conversion relationship between the two cameras;

[0022] Step 5: Collect the RGB image and depth image of the bridge respectively, use the RGB image as the input of the improved yolov5 model in step 3 to detect bridge defects, and obtain the detection and image segmentation results.

[0023] If there is a bridge defect, the bridge defect area on the RGB image is mapped to the depth image through the rotation matrix R and translation vector T in step 4, and the size of the bridge defect is calculated based on the calculated depth camera intrinsic parameters and the depth value represented by the bridge defect area in the depth image.

[0024] By adopting the above technical scheme, the beneficial effects of the present invention are as follows: the above method uses machine vision and an improved yolov5 model to identify, locate and segment the bridge defects and image areas, and quantitatively analyzes the actual physical size or area of ​​the bridge defects on the depth image according to the rotation matrix and translation vector of the calibrated RGB camera and the depth camera, and finally realizes the quantitative evaluation of various types of bridge defects (such as cracks, corrosion, rust, collision damage, concrete spalling), can locate and identify the bridge defect area and type, realize qualitative and quantitative detection and analysis of bridge defect types, deeply evaluate the health status of the bridge, prevent the disease from further expanding and affecting the entire bridge structure, reduce maintenance costs, and delay the aging and degradation of the bridge. The method steps are reasonable, the detection results are reliable, and the above-mentioned purpose of the present invention is achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 The present invention relates to a flow chart of a bridge disease detection method based on RGB-D and improved yolov5 model.

[0026] Figure 2 This is the structural diagram after the MobileNetV3 and Stem block involved in this invention replace the main model structure of yolov5.

[0027] Figure 3 This is a structural diagram after adding the image segmentation model structure involved in the present invention. DETAILED DESCRIPTION

[0028] In order to further explain the technical solution of the present invention, the present invention is described in detail below through specific embodiments.

[0029] This embodiment discloses a bridge disease detection method based on RGB-D and improved yolov5 model. The detection method steps are as follows: Figure 1 As shown, the details are as follows:

[0030] Step 1: Collect bridge disease image data, manually annotate the bridge disease image data through image annotation tools to obtain annotated image data, and randomly sample the annotated image data in proportion to make a training set, a test set, and a validation set;

[0031] In this embodiment, the labelme image annotation tool is used to manually annotate the collected bridge disease image data, and the annotated image data are randomly sampled in a ratio of 7:2:1 to make a training set, a test set, and a validation set.

[0032] Step 2: Improve the yolov5 model and build a model that can recognize bridge damage types and segment images. The improvements based on the yolov5 model in this step include the following:

[0033] 1. Replace the MobileNetV3 model structure and Stem block structure with the yolov5 backbone model structure, such as Figure 2 The specific parameter settings of this embodiment are shown in Table 1 below;

[0034] Table 1 MobileNetv3 model structure parameters

[0035]

[0036]

[0037] 2. Add image segmentation model structure to yolov5 model, such as Figure 3 As shown, the loss function expression of its segmentation is as follows;

[0038]

[0039] Where n represents the number of categories, y(i) and P(i) are the one-hot value and predicted probability of sample i;

[0040] 3. Modify the IoU loss function in the yolov5 model, specifically use the MPDIoU loss function to replace the original IoU loss function of yolov5;

[0041] Step 3: Use the training set, test set and validation set of step 1 as data, perform model training and performance testing on the model obtained by improving the yolov5 model in step 2, and obtain the improved yolov5 model after training and validation;

[0042] Step 4: Calibrate the RGB camera and the depth camera, calculate the rotation matrix between the RGB camera and the depth camera, record it as R, and the translation vector as T.

[0043] If there is a point P in the world coordinate system, the coordinates of point P in the RGB camera coordinate system and the depth camera coordinate system are P c and P d ,but In the formula, R c is the external parameter rotation matrix of the RGB camera, T c is the translation vector of the RGB camera, R d is the extrinsic rotation matrix of the depth camera, T d is the translation vector of the depth camera,

[0044] After transformation, the correspondence between the points in the RGB camera coordinate system and the points in the depth camera coordinate system is:

[0045] The expressions of the depth camera coordinate system to the RGB camera rotation matrix and translation vector are:

[0046]

[0047] The RGB camera and the depth camera are used to collect N sets of calibration plate images in different poses in the same scene. The number of calibration plate images collected is preferably to improve the accuracy of the detection results. The collection N in the test of this technical solution is ≥12. The calibrateCamera function in opencv is used to calibrate the intrinsic and extrinsic parameters of the two cameras, and then the stereoCalibrate function in opencv is used to calibrate the conversion relationship between the two cameras.

[0048] Step 5: Collect the RGB image and depth image of the bridge respectively, use the RGB image as the input of the improved yolov5 model in step 3 to detect bridge defects, and obtain the detection and image segmentation results.

[0049] If there is a bridge defect, the bridge defect area on the RGB image is mapped to the depth image through the rotation matrix R and translation vector T in step 4, and the size of the bridge defect is calculated based on the calculated depth camera intrinsic parameters and the depth value represented by the bridge defect area in the depth image, and the RGB image and the calculated bridge defect type and size data are recorded in the background database; if there is no bridge defect, an instruction without abnormality is returned to the background.

[0050] In summary, the method of the present invention collects color images and depth images of bridges through RGB cameras and depth cameras respectively. A bridge disease dataset is established through manual annotation, a deep learning model is built, and part of the bridge disease dataset is used as a training set to train the model, and part of the dataset is used as a test and verification set to verify the model performance. The trained deep learning model performs target recognition and image segmentation on the bridge disease area in the color image, and after camera calibration, the mapping relationship between the RGB camera and the depth camera is calculated. The bridge disease image area segmented from the color image is mapped to the depth image according to the mapping relationship, and the specific size of the disease is calculated in the depth image. The detection results are fed back to the background, and the disease is evaluated and graded according to the type and size of the disease. The method steps are reasonable and the detection results are reliable.

[0051] Explanation of terms involved in the present invention:

[0052] RGB-D is a data format that combines the color information and depth information of an image.

[0053] The yolov5 model is an existing well-known target detection model, which can be clearly understood on the Internet.

[0054] Labelme is an existing cross-platform image annotation tool that can be used to annotate common visual tasks such as classification, detection, segmentation, key points, etc.

[0055] MobileNetV3 is a well-known lightweight network model, which can be clearly understood on the Internet.

[0056] The stem block structure is the method used for downsampling in PeleeNet. It is well known that the model can be clearly understood on the Internet.

[0057] The IoU loss function and the MPDIoU loss function are loss functions used in target detection to evaluate the overlap between the predicted bounding box and the true bounding box. They are well known and can be clearly understood on the Internet.

[0058] Opencv is a cross-platform computer vision and machine learning software library released under the Apache 2.0 license (open source), which is well known and can be clearly understood on the Internet.

[0059] The calibrateCamera function and the stereoCalibrate function are well known and can be clearly understood on the Internet.

[0060] The above embodiments and drawings do not limit the product form and style of the present invention. Any appropriate changes or modifications made by ordinary technicians in the relevant technical field should be deemed to be within the patent scope of the present invention.

Claims

1. A bridge disease detection method based on RGB-D and improved yolov5 model, Its characteristics are: The detection method steps are as follows: Step 1: Collect bridge disease image data, manually annotate the bridge disease image data through image annotation tools to obtain annotated image data, and randomly sample the annotated image data in proportion to make a training set, a test set, and a validation set; Step 2: Based on the yolov5 model, an improvement is made to build a model that can realize the recognition of bridge disease types and image segmentation; Step 3: Use the training set, test set and validation set of step 1 as data, perform model training and performance testing on the model obtained by improving the yolov5 model in step 2, and obtain the improved yolov5 model after training and validation; Step 4: Calibrate the RGB camera and the depth camera, calculate the rotation matrix between the RGB camera and the depth camera, record it as R, and the translation vector as T; collect N sets of calibration plate images of different poses in the same scene through the RGB camera and the depth camera, calibrate the intrinsic and extrinsic parameters of the two cameras through the calibrateCamera function in opencv, and then calibrate the conversion relationship between the two cameras through the stereoCalibrate function in opencv; Step 5: Collect the RGB image and depth image of the bridge respectively, use the RGB image as the input of the improved yolov5 model in step 3 to detect bridge defects, and obtain the detection and image segmentation results. If there is a bridge defect, the bridge defect area on the RGB image is mapped to the depth image through the rotation matrix R and translation vector T in step 4, and the size of the bridge defect is calculated based on the calculated depth camera intrinsic parameters and the depth value represented by the bridge defect area in the depth image.

2. A bridge disease detection method based on RGB-D and improved yolov5 model as claimed in claim 1, Its characteristics are: The improvement based on the yolov5 model in step 2 includes replacing the MobileNetV3 model structure and the Stemblock structure with the yolov5 backbone model structure, adding an image segmentation model structure to the yolov5 model, and modifying the IoU loss function in the yolov5 model. The image segmentation model structure is added to the yolov5 model, and its segmentation loss function expression is: Wherein, n represents the number of categories, y(i) and P(i) are the one-hot value and predicted probability of sample i; the IoU loss function in the modified yolov5 model is specifically to replace the original IoU loss function of yolov5 with the MPDIoU loss function.

3. A bridge disease detection method based on RGB-D and improved yolov5 model as claimed in claim 1 or 2, Its characteristics are: The calculation method of the rotation matrix between the RGB camera and the depth camera in step 4 is denoted as R and the translation vector is denoted as T: if there is a point P in the world coordinate system, the coordinates of point P in the RGB camera coordinate system and the depth camera coordinate system are P and c and P d ,but In the formula, R c is the external parameter rotation matrix of the RGB camera, T c is the translation vector of the RGB camera, R d is the extrinsic rotation matrix of the depth camera, T d is the translation vector of the depth camera, After transformation, the correspondence between the points in the RGB camera coordinate system and the points in the depth camera coordinate system is: The expressions of the depth camera coordinate system to the RGB camera rotation matrix and translation vector are:

4. A bridge disease detection method based on RGB-D and improved yolov5 model as claimed in claim 1 or 2, Its characteristics are: In the step 1, the labelme image annotation tool is used to manually annotate the collected bridge disease image data, and / or, in the step 1, the annotated image data is randomly sampled in a ratio of 7:2:1 to prepare a training set, a test set and a validation set.

5. A bridge disease detection method based on RGB-D and improved yolov5 model as claimed in claim 3, Its characteristics are: In the step 1, the labelme image annotation tool is used to manually annotate the collected bridge disease image data, and / or the annotated image data is randomly sampled in a ratio of 7:2:1 to prepare a training set, a test set and a validation set.

Citation Information

Patent Citations

  • Three-dimensional morphology measurement system and method based on ZYNQ platform

    CN112146589A

  • Highway pavement disease intelligent detection method based on deep learning

    CN114998852A

  • Underwater bridge pier disease identification and positioning method and device, electronic equipment and storage medium

    CN115187565A

  • Lightweight military target detection method based on SMCA-YOLOv5

    CN115424091A

  • Space and ground integrated road detection system and method

    CN115575400A

Cited By

  • Concrete structure crack detection method and related equipment

    CN121708414A