A method for detecting the degree of pipe orifice blockage

Through image detection and segmentation technology, combined with BiSeNetV2 segmentation network and LeakyReLU activation function, the problems of high pipeline blockage detection cost and low accuracy in the prior art are solved, and the effects of high-precision pipe plugging degree detection and low maintenance cost are achieved.

CN115330719BActive Publication Date: 2025-08-15SHENZHEN MAXVISION TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210973416.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-15
Publication Date
2025-08-15
Estimated Expiration
2042-08-15

AI Technical Summary

Technical Problem

In the prior art, pipeline blockage detection methods have problems with high cost and low detection accuracy, and it is impossible to accurately judge the degree of blockage of the pipe port, resulting in abnormal operation of the urban drainage system.

Method used

Image detection and image segmentation technology are used to obtain the drain pipe images, and the background area, the pipeline opening area and the blockage area are divided, the effective area of each area is counted, the k-value is used to judge the degree of blockage, and combined with the BiSeNetV2 segmentation network and the LeakyReLU activation function, the detection accuracy is improved.

Benefits of technology

It realizes high-precision pipe plugging degree detection, reduces maintenance costs, is free from corrosion, has a long service life, and can monitor the blockage of multiple drains for a long time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115330719B_ABST
    Figure CN115330719B_ABST
Patent Text Reader

Abstract

This application provides a method for detecting the degree of pipe orifice blockage, comprising the steps of: acquiring an image of a drainage pipe outlet; detecting the pipe orifice target and capturing the pipe orifice target image; segmenting the pipe orifice target image into a background region, a pipe orifice region, and a blockage region; calculating the effective area (sumpipe) of the pipe orifice region and the effective area (sumplug) of the blockage region; and outputting the degree of pipe orifice blockage based on a k value. This method detects pipe orifice blockage through image detection, image segmentation, and numerical statistics, enabling timely detection of pipe orifice blockage issues in cities. It not only achieves high detection accuracy, but also has a long service life and low maintenance costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of urban management technology, and more specifically, relates to a method for detecting the degree of pipe orifice blockage. Background Art

[0002] my country's urbanization level is constantly increasing. With the development of urban economies, the number of drainage pipes is showing an accelerating growth trend each year. However, due to defects in the original design or long service life, the failure rate of drainage pipes is also very high. Among them, the blockage of pipe openings is a hidden danger that threatens the safe drainage of cities. If the blockage problem of pipe openings cannot be discovered and eliminated in a timely manner, it will affect the normal operation of urban water supply and drainage. Therefore, efficient and accurate methods for detecting blockage of drainage pipe openings are very necessary for pipe blockage detection. Currently, the more common method is to install sensing equipment in the pipe to detect the degree of blockage by measuring the water flow.

[0003] However, the installed sensors are subject to corrosion or impact from pipe water, resulting in a short service life. The large number of sensors installed also leads to high maintenance costs. Their detection accuracy is low and they cannot accurately reflect the degree of pipe blockage. Generally, they can only detect whether a certain threshold has been exceeded, bringing great difficulties to urban management. Summary of the Invention

[0004] The purpose of the embodiments of the present application is to provide a method for detecting the degree of pipe orifice blockage, so as to solve the technical problems of high cost and low detection accuracy in the prior art in the process of detecting pipe orifice blockage.

[0005] To achieve the above-mentioned purpose, the technical solution adopted in this application is to provide a method for detecting the degree of blockage of a pipe orifice, comprising the following steps:

[0006] Acquire the drain pipe image;

[0007] Detect the nozzle target and capture the nozzle target image;

[0008] Segment the pipe orifice target image into background area, pipe orifice area, and obstruction area;

[0009] Count the effective area sum of the pipe outlet area separately pipe and the effective area sum of the blockage area plug ;

[0010] Output the degree of pipe orifice blockage according to the k value, where

[0011]

[0012] In another embodiment of the present application, a method for detecting a nozzle target includes the following steps:

[0013] Get the drainage pipe dataset;

[0014] According to the degree of congestion, the dataset is divided into three categories: non-congested dataset, moderately congested dataset, and congested dataset;

[0015] The non-blocked data set, the moderately blocked data set, and the blocked data set are input into the training model according to the classification to obtain a converged nozzle detection model;

[0016] The drainage pipe image is input into the pipe orifice detection model and the pipe orifice target is output.

[0017] Preferably, the method for segmenting the pipe orifice target image into a background area, a pipe orifice area, and a blockage area comprises the following steps:

[0018] Build a BiSeNetV2 segmentation network;

[0019] Replace the ReLU activation function in the BiSeNetV2 segmentation network with the LeakyReLU activation function;

[0020] Input data set to train until convergence;

[0021] Input the nozzle target image into the trained BiSeNetV2 segmentation network,

[0022] The output after segmentation is divided into background area, pipe opening area and obstruction area.

[0023] Preferably, the method for segmenting the pipe orifice target image into a background area, a pipe orifice area, and a blockage area further comprises the steps of:

[0024] The pixel value of the background area is 0, the pixel value of the pipe opening area is 1, and the pixel value of the blockage area is 2;

[0025] The pixel points of each area are replaced with the pixel points of the original image according to their positions to obtain the pipeline opening segmentation map.

[0026] Preferably, the effective area sum of the pipe outlet area is calculated pipe methods, including:

[0027] The numerical matrix of the pipe opening segmentation map is HxW, and the pixel point p in the pipe opening area is i,j The sum of the values is the effective area of the pipe outlet area pipe ,but

[0028]

[0029] Preferably, the pixel point p in the blockage area i,j The sum of the values is the effective area of the blockage area plug ,but

[0030]

[0031] Preferably, after segmenting the pipe orifice target image into the background area, the pipe orifice area, the method further includes the following steps:

[0032] Detect the edge of the pipe opening area;

[0033] The fitting ellipse corresponding to the edge of the pipe opening area is detected by an ellipse fitting method based on the least square method;

[0034] The area of the fitted ellipse is the effective area of the pipe outlet area. pipe .

[0035] Preferably, after detecting the edge of the pipe opening area, the method further includes the following steps:

[0036] Get the minimum rectangular frame of the edge of the pipe outlet area;

[0037] Assume that the short side of the minimum rectangular frame is a and the long side is b, then the short side of the edge image of the pipe opening area is stretched times.

[0038] Preferably, the short side of the edge image of the pipe opening area is stretched After that, the following steps are also included:

[0039] Perform image stretching in the same proportion as the blockage area.

[0040] Preferably, after performing image stretching processing on the blockage area at the same proportion, the method further includes the following steps:

[0041] detecting the edge of the blockage area after performing the image stretching process;

[0042] Detecting the center point of the blockage area after stretching;

[0043] The edge of the blockage region after the image stretching process is enlarged with the center point as a base point until the edge of the blockage region after the image stretching process intersects with the fitted ellipse.

[0044] Compared with the existing technology, the method for detecting the degree of pipe orifice blockage provided in this application realizes the detection of the degree of pipe orifice blockage through image detection, image segmentation and numerical statistics, and timely discovers pipe orifice blockage problems in cities. It not only has high detection accuracy, but also has a long service life and low maintenance cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0046] Figure 1 A flow chart of a method for detecting the degree of blockage of a pipe orifice provided in an embodiment of the present application;

[0047] Figure 2 A schematic diagram of an image of a drain pipe with a blockage provided in an embodiment of the present application;

[0048] Figure 3 For Figure 2 A schematic diagram obtained by intercepting the target image of the pipe outlet from the drainage pipe image in FIG;

[0049] Figure 4 For use Figure 3 Pipe opening segmentation map obtained through image segmentation;

[0050] Figure 5 Based on Figure 4 Schematic diagram obtained by detecting the edge of the pipe opening area;

[0051] Figure 6 Based on Figure 5 Schematic diagram of the fitted ellipse obtained by the least squares ellipse fitting method;

[0052] Figure 7 Based on Figure 5 Obtain a schematic diagram of the minimum rectangular frame area of the edge of the pipe outlet area;

[0053] Figure 8 Based on Figure 7 Schematic diagram of the minimum rectangular frame area obtained by stretching;

[0054] Figure 9 Based on Figure 4 Schematic diagram obtained by detecting the edge of the blockage area;

[0055] Figure 10 Based on Figure 9 Schematic diagram of the edge of the blockage area after synchronous stretching;

[0056] Figure 11 Based on Figure 10 The edge of the blockage area is magnified. DETAILED DESCRIPTION

[0057] In order to make the technical problems, technical solutions and beneficial effects to be solved by this application more clearly understood, this application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0058] It should be noted that when an element is referred to as being “fixed on” or “disposed on” another element, it may be directly on the other element or indirectly on the other element. When an element is referred to as being “connected to” another element, it may be directly connected to the other element or indirectly connected to the other element.

[0059] It should be understood that the terms "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship, are based on the orientation or position relationship shown in the accompanying drawings, and are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on this application.

[0060] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of the technical features being referred to. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. Throughout the description of this application, "plurality" means two or more, unless otherwise specifically defined.

[0061] Please also refer to Figures 1 to 4 The method for detecting the degree of blockage of a pipe orifice provided in an embodiment of the present application is now described. The method for detecting the degree of blockage of a pipe orifice comprises the following steps:

[0062] Step S1, obtaining a drainage pipe image;

[0063] Step S2, detecting the nozzle target and capturing the nozzle target image;

[0064] Step S3, segmenting the pipe orifice target image into a background area, a pipe orifice area, and a blockage area;

[0065] Step S4: Count the effective area sum of the pipe outlet area pipe and the effective area sum of the blockage area plug ;

[0066] Step S5: Output the degree of blockage of the nozzle according to the value of k, where

[0067]

[0068] It can be understood that in step S1, the same camera can simultaneously obtain images of multiple drainage pipes, so as to save costs in urban management, and the blockage degree of multiple drainage pipes can be monitored simultaneously through the pipe blockage degree detection method of the present application.

[0069] In step S2, if multiple nozzle targets are detected simultaneously, each nozzle target image should be captured and steps S3 to S5 should be performed separately. Preferably, in order to speed up the detection speed and improve the accuracy, the YOLOX algorithm is used in the detection stage.

[0070] In step S3, an image segmentation algorithm is used to segment the target pipe opening image into the background region, the pipe opening region, and the obstruction region. The final output of the segmentation is a single-channel numerical matrix. For example, if the input image size is HxWx3, the output is an HxW numerical matrix. The image segmentation algorithm can accurately distinguish the background region, the pipe opening region, and the obstruction region.

[0071] In step S4-5, since the same pixel can only be assigned one value, the effective area sum of the pipe outlet area is pipe and the effective area sum of the blockage area plug The sum is the actual target area of the pipe outlet. The normalized k value represents the ratio of the blockage to the pipe outlet area, k∈[0,1]. The larger the k value, the greater the degree of blockage. The degree of blockage of the drainage pipe outlet can be judged by this k value.

[0072] The device pipe orifice blockage detection method based on this application does not require contact with pipe water, which prevents corrosion and prolongs the service life. It can be implemented using a single camera combined with a background algorithm, and can be used one-to-many. Once deployed, it can be used for a long time without frequent replacement, thus reducing maintenance costs in the long term.

[0073] Compared with the existing technology, the method for detecting the degree of pipe orifice blockage provided in this application realizes the detection of the degree of pipe orifice blockage through image detection, image segmentation and numerical statistics, and timely discovers pipe orifice blockage problems in cities. It not only has high detection accuracy, but also has a long service life and low maintenance cost.

[0074] In another embodiment of the present application, in step S2, the method for detecting a nozzle target includes the following steps:

[0075] Get the drainage pipe dataset;

[0076] According to the degree of congestion, the dataset is divided into three categories: non-congested dataset, moderately congested dataset, and congested dataset;

[0077] The non-blocked data set, the moderately blocked data set, and the blocked data set are input into the training model according to the classification to obtain a converged nozzle detection model;

[0078] The drainage pipe image is input into the pipe orifice detection model and the pipe orifice target is output.

[0079] Understandably, because the extracted features for pipe openings with varying degrees of blockage vary significantly, this can lead to non-convergence in training results and poor model performance. Therefore, to ensure that all blockage levels can be detected, the training set images are divided into three categories. This strategy reduces intra-class differences and increases inter-class differences, making model training more efficient and achieving better detection results.

[0080] In another embodiment of the present application, a method for segmenting a pipe orifice target image into a background area, a pipe orifice area, and a blockage area includes the following steps:

[0081] Build a BiSeNetV2 segmentation network;

[0082] Replace the ReLU activation function in the BiSeNetV2 segmentation network with the LeakyReLU activation function;

[0083] Input data set to train until convergence;

[0084] Input the nozzle target image into the trained BiSeNetV2 segmentation network,

[0085] The output after segmentation is divided into background area, pipe opening area and obstruction area.

[0086] It is understandable that the detected nozzle target image is segmented using the BiSeNet segmentation algorithm. This method has made some improvements to the BiSeNet segmentation algorithm. When the input value of the ReLU (Rectified Linear Unit, linear rectifier function) activation function used in the BiseNet algorithm is negative, the output is always 0, and its first-order derivative is also always 0. This will cause the neuron to be unable to update the parameters, that is, the neuron does not learn; in order to solve this problem, all the ReLU activation functions in the algorithm are replaced with the LeakyReLU activation function. The advantage of using the LeakyReLU activation function is that during the back propagation process, the gradient can also be calculated for the part of the LeakyReLU activation function input that is less than zero (instead of the value being 0 like ReLU). This means that when the input information is less than 0, the information is not completely lost, and is retained accordingly, and the resulting segmentation map is more accurate.

[0087] Further, please also refer to Figure 4The method for segmenting the pipe orifice target image into a background area, a pipe orifice area, and a blockage area further includes the steps of:

[0088] The pixel value of the background area is 0, the pixel value of the pipe opening area is 1, and the pixel value of the blockage area is 2;

[0089] The pixel points of each area are replaced with the pixel points of the original image according to their positions to obtain the pipeline opening segmentation map.

[0090] It can be understood that by setting the pixel value of the background area to 0, the pixel value of the pipe mouth area to 1, and the pixel value of the blockage area to 2, the pipe mouth segmentation map obtained can better distinguish regions by pixels, that is, calculate the area of each region by counting pixel points.

[0091] Furthermore, the effective area sum of the pipe outlet area is calculated pipe methods, including:

[0092] The numerical matrix of the pipe opening segmentation map is HxW, and the pixel point p in the pipe opening area is i,j The sum of the values is the effective area of the pipe outlet area pipe ,but

[0093]

[0094] Furthermore, the pixel point p in the blockage area i,j The sum of the values is the effective area of the blockage area plug ,but

[0095]

[0096] In another embodiment of this application, please refer to Figure 5 and Figure 6 In step S3, after segmenting the pipe orifice target image into the background area, the pipe orifice area, the method further includes the following steps:

[0097] Detect the edge of the pipe opening area;

[0098] The fitting ellipse corresponding to the edge of the pipe opening area is detected by an ellipse fitting method based on the least square method;

[0099] The area of the fitted ellipse is the effective area of the pipe outlet area. pipe .

[0100] It is understandable that in actual use, due to the complex environment around the drain pipe, there are interferences such as weeds, moss, branches, and sewage being discharged, which will block the edge of the pipe mouth. As a result, when the pipe mouth target image is segmented, the boundary line between the pipe mouth and the background has a large error, and the boundary line is raised and jagged. The error is large when calculating the k value representing the degree of blockage of the pipe mouth. To this end, through this step, the edge of the pipe mouth area is first detected, and the fitting ellipse corresponding to the edge of the pipe mouth area is obtained by the ellipse fitting method based on the least squares method. The fitting ellipse can be as close to the area of the pipe mouth in the image as possible, and the area of the fitting ellipse area is taken as the effective area sum of the pipe mouth area. pipe , which can reduce errors and improve the accuracy of pipe orifice blockage detection.

[0101] Further, please also refer to Figure 7 and Figure 8 After detecting the edge of the pipe opening area, the following steps are also included:

[0102] Get the minimum rectangular frame of the edge of the pipe outlet area;

[0103] Assume that the short side of the minimum rectangular frame is a and the long side is b, then the short side of the edge image of the pipe opening area is stretched times.

[0104] It is understandable that in order to reduce costs, a camera can simultaneously acquire images of multiple drain pipes. The pipe opening facing the camera will be circular, and its pipe opening can be fitted into a standard circle by the ellipse fitting method of the least squares method. However, since each pipe opening has different shapes when acquired from different viewing angles, the pipe opening that is not facing the camera will be elliptical in the image, that is, the edge of the pipe opening area is also approximately elliptical, and the minimum rectangular frame of the edge of the pipe opening area is rectangular. In this way, by stretching the short side of the edge image of the pipe opening area, The viewing angle can be indirectly adjusted by multiplying the image by times to obtain an edge image of the pipe opening area that is close to a circle. Then, when the fitting ellipse corresponding to the edge of the pipe opening area is obtained by the ellipse fitting method based on the least squares method, the area of the fitting ellipse area is taken as the effective area sum of the pipe opening area. pipe , further improving the accuracy of pipe orifice blockage detection.

[0105] Further, please also refer to Figure 9 and Figure 10 , stretch the short side of the edge image of the pipe mouth area After that, the following steps are also included:

[0106] Perform image stretching in the same proportion as the blockage area.

[0107] It is understandable that after the nozzle is stretched, in order to ensure the accuracy of the k value, it is necessary to perform image stretching processing on the blockage area at the same scale, and the area of the blockage area after processing is the effective area sum of the blockage area. plug .

[0108] Further, please also refer to Figure 11 After performing image stretching processing on the blockage area at the same scale, the method further includes the following steps:

[0109] detecting the edge of the blockage area after performing image stretching processing;

[0110] Detecting the center point of the blockage area after stretching;

[0111] The edge of the blockage area after the image stretching process is enlarged with the center point as a base point until the edge of the blockage area after the image stretching process intersects with the fitting ellipse.

[0112] It is understandable that when the blockage is not completely exposed from the pipe orifice, for example, the blockage is one meter away from the pipe orifice, due to the factors of the perspective of long and short distances, there is a large error between the ratio of the area of the blockage to the area of the pipe orifice shown in the image and the actual ratio. In this way, by enlarging the edge of the blockage area after performing image stretching processing based on the center point, the deviation caused by the perspective of long and short distances can be compensated.

[0113] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present application should be included in the scope of protection of the present application.

Claims

1. A method for detecting the degree of blockage of a pipe orifice, characterized in that: The following steps are involved: Acquire the drain pipe image; Detect the nozzle target and capture the nozzle target image; Segment the pipe orifice target image into background area, pipe orifice area, and obstruction area; Detect the edge of the pipe opening area; Get the minimum rectangular frame of the edge of the pipe outlet area; Assume that the short side of the minimum rectangular frame is a and the long side is b, then the short side of the edge image of the pipe opening area is stretched times; The fitting ellipse corresponding to the edge of the pipe opening area is detected by an ellipse fitting method based on the least square method; The area of the fitted ellipse is the effective area of the pipe outlet area sum pipe ; Perform image stretching processing on the blockage area at the same scale; detecting the edge of the blockage area after performing the image stretching process; Detecting the center point of the blockage area after stretching; Enlarging the edge of the blockage area after the image stretching process with the center point as a base point until the edge of the blockage area after the image stretching process intersects the fitting ellipse; Count the effective area of the pipe outlet area separately sum pipe and the effective area of the blockage area sum plug ; Output the degree of pipe orifice blockage according to the k value, where 。 2. The method for detecting the degree of blockage of a pipe orifice according to claim 1, wherein: The method for detecting a nozzle target comprises the following steps: Get the drainage pipe dataset; According to the degree of congestion, the dataset is divided into three categories: non-congested dataset, moderately congested dataset, and congested dataset; The non-blocked data set, the moderately blocked data set, and the blocked data set are input into the training model according to the classification to obtain a converged nozzle detection model; The drainage pipe image is input into the pipe orifice detection model and the pipe orifice target is output.

3. The method for detecting the degree of blockage of a pipe orifice according to claim 1, wherein: The method for segmenting a pipe orifice target image into a background area, a pipe orifice area, and a blockage area comprises the following steps: Build a BiSeNetV2 segmentation network; Replace the ReLU activation function in the BiSeNetV2 segmentation network with the LeakyReLU activation function; Input data set to train until convergence; Input the nozzle target image into the trained BiSeNetV2 segmentation network, The output after segmentation is divided into background area, pipe opening area and obstruction area.

4. The method for detecting the degree of blockage of a pipe orifice according to claim 3, wherein: The method for segmenting a pipe orifice target image into a background area, a pipe orifice area, and a blockage area further comprises the steps of: The pixel value of the background area is 0, the pixel value of the pipe opening area is 1, and the pixel value of the blockage area is 2; The pixel points of each area are replaced with the pixel points of the original image according to their positions to obtain the pipeline opening segmentation map.

5. The method for detecting the degree of blockage of a pipe orifice according to claim 4, wherein: Statistical effective area of the pipe outlet area sum pipe method, include: The numerical matrix of the pipe opening segmentation map is HxW, and the pixel points in the pipe opening area are p i,j The sum of the values is the effective area of the pipe outlet area sum pipe ,but , 。 6. The method for detecting the degree of blockage of a pipe orifice according to claim 5, wherein: Pixels in the blockage area p i,j The sum of the values of is the effective area of the blockage area sum plug ,but , 。

Citation Information

Patent Citations

  • River channel water outlet overflow detection method and device and related equipment

    CN113989510A