Drainage pipe defect detection method and device based on depth camera

The depth camera collects infrared and depth images and performs image fusion, combined with deep learning technology, to solve the problems of slow recognition speed and low accuracy in drainage pipeline inspection, and achieve more efficient defect identification and real-time feedback.

CN113160210BActive Publication Date: 2024-09-27SHANGHAI CHIZUN STATIONERY CO LTD
View PDF 15 Cites 0 Cited by

Patent Information

Application Number
CN202110507757.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-10
Publication Date
2024-09-27
Estimated Expiration
2041-05-10

AI Technical Summary

Technical Problem

The existing technology has the problems of slow identification speed and low accuracy in the detection of defects in drainage pipelines. Especially in the special circumstances of the pipeline environment, image distortion and noise pollution lead to high misrecognition and missed recognition rates.

Method used

A depth camera is used to collect infrared images and depth images, and combined with deep learning technology for image processing and classification recognition, a third image is generated through image fusion for defect type detection, improving recognition speed and accuracy.

Benefits of technology

Through the recognition and fusion of the two images, the influence of environmental factors is overcome, richer information is provided, the accuracy and efficiency of defect identification are improved, and high-precision detection results with real-time feedback are achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113160210B
    Figure CN113160210B
Patent Text Reader

Abstract

The present invention discloses a drainage pipe defect detection method and device based on a depth camera, the method comprising the steps of: S1, obtaining a first image of the inner surface of the drainage pipe taken by a depth camera; S2, classifying the first image according to a pre-trained first image classification model; if the first image is classified as a first defect image, S3, obtaining a second image taken by the depth camera and synchronized with the first image; S4, classifying the second image according to a pre-trained second image classification model; if the second image is classified as a second defect image, S5, fusing the first defect image and the second defect image to generate a third image; S6, detecting the defect type of the third image according to the pre-trained defect detection model, and outputting the detection result. The technical solution disclosed by the present invention can improve the speed and accuracy of automatic identification of drainage pipe defects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of pipeline detection, and in particular to a drainage pipeline defect detection method and device based on a depth camera. Background Art

[0002] In recent years, the use of CCTV pipeline robots carrying shooting equipment to collect pipeline images and then using deep learning technology to automatically identify pipeline defects has developed rapidly, reducing the workload of manual collection and identification and improving the recognition speed and accuracy. However, due to the special pipeline environment, traditional image acquisition methods have problems such as image distortion and noise pollution, resulting in relatively high misidentification and missed recognition rates in automatic identification of pipeline defects.

[0003] With the advent of the era of artificial intelligence, the continuous maturity of depth camera technology and the continuous enrichment of application scenarios, depth cameras have been widely used in many fields such as mobile phone cameras, VR / AR gesture interaction, automotive electronics ADAS, security monitoring and new retail. Depth cameras can measure the distance (depth) from an object to the camera. This type of camera can not only capture a two-dimensional image of the scene, but also obtain the positional relationship between objects. There are more and more related applications in object recognition, behavior recognition, and scene modeling. However, in the field of drainage pipe inspection, the application of using depth cameras to collect images for automatic defect recognition is still in its early stages, and methods to improve recognition speed and accuracy need to be explored. Summary of the invention

[0004] The purpose of the present invention is to provide a drainage pipe defect detection method and device based on a depth camera. By mounting a depth camera sensor on a CCTV pipeline robot to collect infrared images and depth images, and combining deep learning technology for image processing and classification recognition, the problems of slow feedback speed and low recognition accuracy in drainage pipe defect detection are solved.

[0005] The technical solution provided by the present invention to solve the technical problem is as follows:

[0006] The present invention provides a drainage pipe defect detection method based on a depth camera, comprising the following steps: S1, obtaining a first image of the inner surface of a drainage pipe taken by a depth camera; S2, classifying the first image according to a pre-trained first image classification model; if the first image is classified as a first defect image, S3, obtaining a second image taken by the depth camera and synchronized with the first image; S4, classifying the second image according to a pre-trained second image classification model; if the second image is classified as a second defect image, S5, fusing the first defect image and the second defect image to generate a third image; S6, detecting the defect type of the third image according to the pre-trained defect detection model, and outputting the detection result to improve the speed and accuracy of automatic identification of drainage pipe defects.

[0007] The present invention also provides a drainage pipe defect detection device based on a depth camera, including: an image acquisition module, used to acquire a first image of the inner surface of the drainage pipe taken by a depth camera and a second image synchronized with the first image; an image classification module, used to classify the first image according to a pre-trained first image classification model; used to classify the second image according to a pre-trained second image classification model; an image fusion module, used to fuse the synchronized first image and second image to generate a third image; a defect detection module, used to detect the defect type of the third image according to a pre-trained defect detection model, and output the detection result.

[0008] The beneficial effects of the present invention include:

[0009] In a first aspect, the present invention improves the accuracy of classification and recognition by respectively recognizing the two types of collected images.

[0010] Secondly, the present invention uses a depth camera to collect synchronized infrared images and depth images, and performs image fusion on the infrared images and depth images that have been identified to contain pipeline defects. This overcomes the influence of environmental factors, concentrates the advantages of the two images, can provide richer information and improve the visual features of the image, thereby improving the accuracy of defect identification.

[0011] Thirdly, the present invention adopts the method of first extracting an image for classification and recognition, and then judging whether to extract another synchronous image according to the classification result, thereby reducing information redundancy and improving the efficiency of machine recognition.

[0012] Fourthly, the present invention adopts a lightweight image classification model and defect detection model, which greatly improves the speed of image classification and defect detection in two stages and can realize real-time feedback of detection results. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] The present invention will be further described below in conjunction with the accompanying drawings.

[0014] Figure 1 It is a flow chart of a drainage pipe defect detection method provided in an embodiment of the present invention.

[0015] Figure 2 The drainage pipe defect detection method provided by the embodiment of the present invention is as follows: Figure 2 .

[0016] Figure 3 It is a structural diagram of a drainage pipe defect detection device provided in an embodiment of the present invention.

[0017] Figure 4 The drainage pipe defect detection device structure provided by the embodiment of the present invention is Figure 2 . DETAILED DESCRIPTION

[0018] The technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings 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.

[0019] The embodiment of the present invention provides a defect detection solution that can be applied to the field of pipeline detection and other disease detection fields. In a specific implementation, a depth camera is installed on a CCTV pipeline robot to collect infrared images and depth images at the same time. The different characteristics of the two images are then used to classify and detect defects. The two images are then fused based on their advantages. The defect type is detected on the fused image with rich information and machine vision features, thereby outputting high-precision machine recognition results in real time.

[0020] Please refer to Figure 1 The present invention provides a drainage pipe defect detection method based on a depth camera, comprising the following steps:

[0021] S1, obtaining a first image of the inner surface of the drainage pipe taken by a depth camera.

[0022] Specifically, with the gradual development of disruptive technologies such as machine vision and autonomous driving, more and more applications are using depth cameras for object recognition and behavior recognition scene modeling. It can be said that depth cameras are the eyes of terminals and robots. Compared with ordinary cameras (2D), depth cameras are called 3D cameras, which means that they can detect the depth of field distance of the shooting space through depth cameras. This is also the biggest difference from ordinary cameras. The pictures taken by ordinary color cameras can see and record all objects within the camera's field of view, but the data recorded does not include the distance of these objects from the camera. Only through the semantic analysis of the image can we judge which objects are farther away from us and which are closer, but there is no exact data. The depth camera solves this problem. Through the data obtained by the depth camera, we can accurately know the distance of each point in the image from the camera. In this way, adding the (x, y) coordinates of the point in the 2D image, we can obtain the three-dimensional spatial coordinates of each point in the image. The three-dimensional coordinates can restore the real scene and realize applications such as scene modeling.

[0023] Furthermore, the depth camera is one of a TOF camera, a structured light camera or a binocular camera.

[0024] Specifically, the common depth camera solutions currently include structured light, binocular vision, and time-of-flight (TOF).

[0025] The basic principle of structured light depth camera is to project light with certain structural characteristics onto the object through a near-infrared laser, and then collect it with a special infrared camera. This light with a certain structure will collect different image phase information due to different depth areas of the object, and then convert the change of this structure into depth information through the calculation unit to obtain the three-dimensional structure. In simple terms, the three-dimensional structure of the object is obtained by optical means, and then the obtained information is applied more deeply. Usually, an invisible infrared laser with a specific wavelength is used as the light source. The light it emits is projected on the object after a certain coding. The distortion of the returned coding pattern is calculated through a certain algorithm to obtain the position and depth information of the object. The advantages of structured light (speckle) are mainly: 1) The solution is mature, and the camera baseline can be made relatively small, which is convenient for miniaturization. 2) Low resource consumption, a single frame IR image can calculate the depth map, and low power consumption. 3) Active light source, can also be used at night or in a dim closed environment. 4) High precision and high resolution within a certain range, the resolution can reach 1280x1024 and the frame rate can reach 60FPS.

[0026] TOF camera measures the flight time of light to obtain the distance. Specifically, it continuously emits laser pulses to the target, then uses a sensor to receive the reflected light, and detects the round-trip flight time of the light pulse to obtain the exact distance of the target. Because the speed of light laser is generally achieved by detecting the phase shift of the light wave modulated by certain means. TOF is not based on feature matching, and the accuracy will not drop quickly when the test distance becomes longer. At present, unmanned driving and some high-end consumer Lidars are basically implemented using this method. The advantages of TOF are mainly: 1) long detection distance. It can reach tens of meters when the laser energy is sufficient; 2) less interference from ambient light.

[0027] Binocular stereo vision is an important form of machine vision. It is based on the principle of parallax and uses imaging equipment to obtain two images of the object being measured from different positions. By calculating the position deviation between corresponding points in the images, the three-dimensional geometric information of the object is obtained. The main advantages of binocular cameras are: 1) Low hardware requirements and low cost. Ordinary CMOS cameras are sufficient. 2) Applicable both indoors and outdoors as long as the light is suitable.

[0028] In a specific embodiment, it is preferred that a TOF camera captures infrared images and depth images.

[0029] S2, classify the first image according to a pre-trained first image classification model; if the first image is classified as a first defect image, S3, obtain a second image taken by a depth camera synchronized with the first image.

[0030] Furthermore, the first image is an infrared image and the second image is a depth image; or the first image is a depth image and the second image is an infrared image.

[0031] Specifically, the complementary properties of depth images and infrared images are used for target recognition. The main principle is that visible light and infrared images have complementary properties. Depth images can provide more details; infrared images are not affected by light, but lack details and texture information. The main purpose is to improve the performance of target recognition, especially to make the recognition algorithm immune to environmental factors and improve machine vision.

[0032] Furthermore, the image synchronization method is timestamp synchronization.

[0033] Specifically, the method for acquiring synchronized images is to extract the timestamps while acquiring the images, and if the time stamps of two images are less than a set threshold, they can be identified as synchronized images. Preferably, the set threshold is 10ms.

[0034] S4, classifying the second image according to a pre-trained second image classification model; if the second image is classified as a second defect image, S5, fusing the first defect image and the second defect image to generate a third image.

[0035] Specifically, the first image can be an infrared image or a depth image. When the first image is an infrared image, the corresponding first image classification model is an infrared image classification model, and the second image is a synchronized depth image; conversely, when the first image is a depth image, the corresponding first image classification model is a depth image classification model, and the second image is a synchronized infrared image.

[0036] In a specific implementation, one of the infrared image or the depth image can be collected first for image classification and recognition. If it contains a defect image, another synchronized image can be extracted for classification and recognition. This can reduce information extraction redundancy and save hardware resources. Alternatively, the synchronized infrared image and depth image can be extracted at the same time for image recognition, which can save recognition time.

[0037] Furthermore, in step S2, the types of classification of the first image include but are not limited to a first defect image and a first normal image; in step S4, the types of classification of the second image include but are not limited to a second defect image and a second normal image.

[0038] Specifically, in the first image classification model and the second image classification model, the image classification includes normal images, defect images and non-pipeline images, wherein the normal images and defect images respectively include global images and local images according to the different camera shooting angles. Briefly speaking, in the infrared image classification model, the image types recognized include at least infrared global normal images, infrared global defect images, infrared local normal images, and infrared non-pipeline related images; correspondingly, in the depth image classification model, the image types recognized include at least depth global normal images, depth global defect images, depth local normal images, depth local defect images, and depth non-pipeline mechanism images. The first defect image and the second defect image include global defects and local defects.

[0039] Furthermore, the image fusion method includes but is not limited to image fusion based on HSI transformation, image fusion based on wavelet transformation, and image fusion based on deep learning.

[0040] Specifically, the meaning of image fusion is to integrate the favorable information and basic features of each image belonging to the same scene obtained by different methods, and fuse them into a new image with useful information that is more suitable for human vision or machine vision recognition. The resulting image has the advantage of being able to obtain scene information more accurately, reliably and comprehensively. Fusion operation is performed on two images of the same scene obtained by different methods, and the detailed information of different places in the image is complemented and enhanced, and the repeated information can also improve the authenticity and reliability of the image. Therefore, the fused image can better reflect the useful information and style.

[0041] Among them, the image enhancement method based on wavelet transform is essentially to first perform wavelet transform on images from different sources. The transformed image will appear as different frequency bands including high frequency and low frequency. Then, according to the actual application situation, the appropriate fusion method is selected to enhance the frequency band part of the important information of the image and suppress the unimportant frequency band part to form a wavelet pyramid model; finally, a wavelet inverse transform is performed to reconstruct the final fused and enhanced image. This image enhancement technology has the function of feature extraction, and has the characteristics of multi-resolution, low entropy and decorrelation. The method based on wavelet transform covers the frequency domain of the entire image, and adopts targeted enhancement for the low-frequency and high-frequency areas respectively. The method is fast and effective.

[0042] Among them, HSI is a method based on spatial domain transformation. The HSI color model has become the most commonly used color model for color image processing because it is closely related to the way people perceive color. In the HSI space, I (Intensity) represents the intensity of the image, which corresponds to the spatial resolution of the image, that is, how bright the white light shining on this color is. H (Hue) represents the hue, which determines the color. S (saturation) represents the saturation, which determines the color intensity. Among them, H and S represent the spectral resolution of the image. The basic idea of ​​HSI transformation image fusion is to improve the spatial resolution of the multispectral image by fusing the I component and the high-resolution image, while trying to maintain the spectral characteristics of the multispectral image. The HSI transformation fusion method includes three steps: (1) HSI transformation of the original multispectral image; (2) directly replacing the I component with lower spatial resolution of the multispectral image with the full-color image (high-resolution image), keeping H and S unchanged; (3) HSI inverse transformation to obtain the enhanced multispectral image.

[0043] Due to the powerful feature extraction and data representation capabilities of convolutional neural networks, deep learning (DL) has achieved relatively advanced results in many computer vision and image processing problems. Generally, traditional visual recognition methods include three important steps, namely feature extraction, feature selection and prediction. This process is naturally linked to the three important steps in the image fusion problem, namely image transformation, activity measurement and fusion rules. Through the training of convolutional neural networks, image transformation, activity measurement and fusion rules can be implemented jointly in an implicit way. Therefore, convolutional neural networks are very suitable for image fusion problems. The four major advantages of deep learning for image fusion problems: 1) Deep learning models can automatically extract the most effective features from the data, overcoming the difficulties of manually designing features. 2) Deep learning models can describe the complex relationship between input and target output data. 3) Deep learning models can provide some potential image representation methods that are useful for image fusion problems. 4) Open source and friendly deep learning databases (such as

[0044] Caffe, TensorFlow, Theano, and MatConvNet, etc.) and large image datasets (such as CIFAR, PASCAL VOC, and ImageNet, etc.) ensure the convenience of studying image fusion problems.

[0045] In a specific embodiment, according to different resource information, one of the three fusion technologies can be used, preferably an image fusion method based on deep learning, which can continuously improve the detection accuracy with the continuous iteration of the network.

[0046] Furthermore, the first image classification model and the second image classification model adopt a lightweight object detection model based on YOLO-V4.

[0047] Specifically, in the current field of computer vision, image recognition algorithms are constantly being innovated, and have achieved outstanding achievements in remote sensing monitoring, medical care, military technology and other fields. However, these devices have certain limitations on the size and speed of the model. From the perspective of the algorithm, convolutional neural networks have taken the lead in the field of image recognition with their excellent feature extraction capabilities and scalability. The development trend in the field of target detection is constantly moving from traditional recognition methods to deep learning recognition methods. The current deep learning algorithm generally refers to first selecting candidate boxes from the image, and then obtaining classification and regression results from the extracted candidate boxes. The target detection algorithm can obtain high accuracy, but the training steps are cumbersome and take up a considerable amount of space. The YOLO algorithm does not require candidate boxes, and directly performs classification and regression predictions through convolution operations to obtain the category and coordinate information of the object. This type of algorithm is fast, occupies little space, can meet the requirements of low power consumption and low energy consumption on mobile terminals and embedded platforms, and is a lightweight neural network. YOLO-V4 greatly improves the accuracy of the current network without reducing the speed. YOLOv4 is mainly divided into Bag of freebies and Bag of specials. Bag of freebies means that the target detector achieves better accuracy without increasing the inference loss. These methods only need to change the training strategy or increase the training cost. In label processing, the method of intra-group label smoothing is adopted. At the loss function level, methods such as Focal Loss are used without changing the network structure, and the learning rate is improved by using the simulated cosine annealing method. Bag of specials means that the inserted module is used to enhance certain attributes, which significantly improves the accuracy of target detection.

[0048] S6, detecting the defect type of the third image according to the pre-trained defect detection model, and outputting the detection result.

[0049] Furthermore, the defect detection model adopts a lightweight deep residual network based on ResNet-18.

[0050] Specifically, the depth of the deep learning network has a great impact on the final classification and recognition effect. However, as the depth of the neural network increases, errors will easily accumulate during the training process, resulting in gradient explosion and gradient dissipation problems. This is because as the number of network layers increases, the gradient of back propagation in the network will become unstable (extremely large or extremely small) with continuous multiplication. The most common problem is gradient dissipation. The residual network solves the problem of network performance getting worse and worse with increasing depth. ResNet allows the original input information to be directly transmitted to the subsequent layers, which does not add additional parameters and calculations to the network, but greatly increases the training speed of the model and improves the training effect. The main contribution of Resnet is that it uses residual learning units to effectively solve the problem of gradient degradation as the number of network layers increases. The residual learning unit consists of residual blocks. The overall output of the residual block is the input of the residual block plus the linear output of the residual block, and the BN layer is added for normalization operation to further avoid the disappearance of the gradient and reduce the number of iterations to speed up the training. In residual learning, X represents the input, and F(X) represents the output of the residual block after the second layer activation function, that is, F(X) = W2×σ(W1×X), where W1 and W2 represent the weights of the first and second layers, σ represents the activation function Relu, and the output of the residual block is σ(F(X)+X)). This residual calculation is more conducive to avoiding network collapse caused by the disappearance of gradients than ordinary networks. Resnet18 includes 17 convolutional layers plus 1 fully connected layer. The model has a simple structure and can be used on embedded devices.

[0051] Furthermore, the inspection results include, but are not limited to, the location, type and grade of the inner surface defects of the drainage pipe.

[0052] Specifically, drainage pipe defects are divided into structural defects and functional defects. Structural defects mainly include: disconnection, deformation, branch pipe concealed connection, misalignment, leakage, corrosion, rubber ring shedding, rupture, foreign body intrusion, etc.; functional defects mainly include sedimentation, scaling, obstacles, tree roots, puddles, dam heads, scum, etc. There are four levels of defects: minor, moderate, severe and major.

[0053] For further information, please refer to Figure 2 In some embodiments, the drainage pipe defect detection method further includes step S7 after step S6, extracting a first defect image and storing it in a first defect sample set; extracting a second defect image and storing it in a second defect sample set.

[0054] Please refer to Figure 3An embodiment of the present invention provides a drainage pipe defect detection device based on a depth camera, including: an image acquisition module, used to acquire a first image of the inner surface of the drainage pipe taken by a depth camera and a second image synchronized with the first image; an image classification module, used to classify the first image according to a pre-trained first image classification model, and used to classify the second image according to a pre-trained second image classification model; an image fusion module, used to fuse the synchronized first image and second image to generate a third image; a defect detection module, used to detect the defect type of the third image according to the pre-trained defect detection model, and output the detection result.

[0055] Please refer to Figure 4 In some embodiments, the defect detection device also includes a sample acquisition module, which extracts a first defect image and stores it in a first defect sample set for training a first image classification model; and extracts a second defect image and stores it in a second sample set for training a second image classification model.

[0056] In some embodiments, the present invention also provides a drainage pipe defect detection device, comprising: one or more processors; a storage device for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the defect detection method as described above.

[0057] In some embodiments, the present invention further provides a computer-readable storage medium for drainage pipe defect detection, on which a computer program is stored, characterized in that when the program is executed by a processor, the defect detection method as described above is implemented.

[0058] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by hardware related to program instructions, and the program can be stored in a computer-readable storage medium, which may include: a flash drive, a read-only memory, a random access memory, a magnetic disk or an optical disk, or an embedded device, etc.

[0059] The defect detection method and device provided in the embodiments of the present invention are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. For general technical personnel in this field, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. This specification should not be understood as a limitation on the present invention.

Claims

1. A drainage pipe defect detection method based on a depth camera, characterized in that: The steps include: S1, obtaining a first image of the inner surface of the drainage pipe taken by a depth camera; the depth camera is one of a TOF camera, a structured light camera or a binocular camera; S2, classifying the first image according to a pre-trained first image classification model; the types of classification of the first image include a first defect image and a first normal image, if the first image is classified as a first defect image, S3, obtaining a second image taken by the depth camera and synchronized with the first image; S4, classifying the second image according to the pre-trained second image classification model; the types of the second image classification include a second defect image and a second normal image; the first image is an infrared image and the second image is a depth image; or the first image is a depth image and the second image is an infrared image; collecting one of the infrared image or the depth image to first perform image classification and recognition, if it contains a defect image, then extracting another synchronized image for classification and recognition, if the second image is classified as a second defect image, S5, performing image fusion on the first defect image and the second defect image to generate a third image; S6, detecting the defect type of the third image according to the pre-trained defect detection model, and outputting the detection result.

2. The defect detection method according to claim 1, characterized in that: In step S3, the synchronization method is timestamp synchronization.

3. The defect detection method according to claim 1, characterized in that: The first image classification model and the second image classification model adopt a lightweight target detection model based on YOLO-V4; the defect detection model adopts a lightweight deep residual network based on ResNet-18.

4. The defect detection method according to claim 1, characterized in that: In step S6, the detection results include but are not limited to the location, type and grade of the inner surface defects of the drainage pipe.

5. The defect detection method according to claim 1, characterized in that: After step S6, the following steps are also included: S7, extracting a first defect image and storing it in a first defect sample set; extracting a second defect image and storing it in a second defect sample set.

Citation Information

Patent Citations

  • Rod and wire surface defect online detection device and method

    CN108490000A

  • Image fusion method and apparatus of depth image and infrared image

    CN108830819A

  • Depth image denoising method and device and electronic equipment

    CN109615596A

  • An underground pipeline defect positioning and grade judging method based on deep learning

    CN109671071A

  • Pipeline automatic detection and classification method based on deep residual neural network

    CN110728654A