Intelligent petroleum heating pipeline detection system and method

By acquiring images of oil heating pipelines through cameras and utilizing image segmentation and convolutional neural network models, combined with edge enhancement and ellipse fitting techniques, this method achieves efficient identification of various defect types in oil heating pipelines. It overcomes the shortcomings of traditional detection methods, improves detection accuracy and efficiency, and ensures safe production in the petroleum industry.

CN120107267BActive Publication Date: 2025-10-28KARAMAY BEST TECH DEV CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510592771.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-09
Publication Date
2025-10-28
Estimated Expiration
2045-05-09

AI Technical Summary

Technical Problem

Existing methods for inspecting oil heating pipelines rely on manual inspection and single-dimensional data analysis, which makes it difficult to comprehensively cover environmental risks, appearance defects, and geometric defects. Furthermore, traditional inspection techniques require downtime operation, affecting production efficiency and increasing operating costs.

Method used

The system uses a camera to acquire images of the pipeline, separates the background from the target using image segmentation technology, identifies environmental risks and appearance defects using a convolutional neural network model, and calculates geometric parameters by combining edge enhancement, contour extraction, and ellipse fitting. It also uses a joint verification method to optimize various indicators and achieve the identification of multiple defect types.

Benefits of technology

It improves detection accuracy and efficiency, adapts to complex working conditions, ensures safe production in the petroleum industry, reduces manual intervention and operating costs, and provides real-time, high-precision defect identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120107267B_ABST
    Figure CN120107267B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of pipeline detection, and discloses an intelligent petroleum oil heating pipeline detection system and method, which first uses a camera to obtain a pipeline image, and uses image segmentation technology to separate the background and the target, so as to extract environmental features and pipeline appearance features respectively. For the pipeline background image, a convolutional neural network model is used to identify potential environmental risks; for the pipeline target image, its appearance and geometric features are further analyzed to detect appearance defects such as cracks and deformations, and geometric defects such as ellipse eccentricity and flattening anomalies. The geometric parameters are calculated through steps such as edge enhancement, contour extraction and ellipse fitting, and the presence of defects is determined in combination with a preset threshold. Furthermore, a joint confirmation method is used to optimize the relationship between various indicators to enhance the reliability and robustness of the detection. In this way, not only the detection accuracy and efficiency are improved, but also it can adapt to the identification of multiple defect types under complex working conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of pipeline inspection technology, and more specifically, to an intelligent oil heating pipeline inspection system and method. Background Technology

[0002] In the petroleum industry, the safety and reliability of oil heating pipelines are crucial for ensuring the continuity and safety of the production process. Traditionally, the inspection of oil heating pipelines has relied mainly on manual inspection and periodic maintenance. This method is not only time-consuming and labor-intensive, but also struggles to guarantee high accuracy and real-time performance. With technological advancements, image processing and machine learning-based methods are increasingly being applied to various industrial inspection fields. However, numerous challenges and technical bottlenecks remain in the inspection of oil heating pipelines.

[0003] Existing inspection methods often focus on single-dimensional data analysis, such as relying solely on physical inspection methods like ultrasound, X-rays, or thermal imaging to assess pipeline condition. However, these methods often cannot comprehensively cover all types of defects, such as environmental risks, appearance defects, and geometric defects. Furthermore, traditional inspection technologies typically require downtime, which not only increases operating costs but may also impact production efficiency.

[0004] Therefore, we look forward to an optimized intelligent detection solution for oil heating pipelines. Summary of the Invention

[0005] To address the aforementioned technical problems, this application is proposed. Embodiments of this application provide an intelligent oil heating pipeline inspection system and method, which can adapt to the identification of various defect types under complex working conditions, providing strong protection for safe production in the petroleum industry.

[0006] According to one aspect of this application, a smart oil heating pipeline inspection method is provided, comprising: acquiring an image of an oil heating pipeline captured by a camera; performing image segmentation on the oil heating pipeline image to obtain a pipeline background image and a pipeline target image; extracting environmental features from the pipeline background image and confirming the existence of environmental risks based on the environmental features; extracting pipeline appearance features from the pipeline target image and confirming the existence of appearance defects based on the pipeline appearance features; extracting geometric features from the pipeline target image and confirming the existence of geometric defects based on the geometric features, wherein the geometric features include: ellipse eccentricity and flattening; optimizing the ellipse eccentricity, flattening, probability of environmental risk, and probability of appearance defects through a joint confirmation method, and confirming the existence of environmental risks, appearance defects, and geometric defects based on the optimized ellipse eccentricity, optimized flattening, optimized probability of environmental risks, and optimized probability of appearance defects.

[0007] In the aforementioned intelligent oil heating pipeline inspection method, geometric features are extracted from the pipeline target image, and the presence of geometric defects is confirmed based on these features. This includes: edge enhancement of the pipeline target image to obtain an edge-enhanced pipeline target image; contour extraction of the edge-enhanced pipeline target image to obtain a set of contour points on the inner wall of the pipeline; ellipse fitting of the set of contour points on the inner wall of the pipeline to obtain ellipse parameters, including the major axis radius and the minor axis radius; calculation of the ellipse eccentricity and flattening based on the ellipse parameters; and determination of the presence of geometric defects based on the ellipse eccentricity and the flattening.

[0008] In the above-mentioned intelligent oil heating pipeline detection method, the eccentricity and flattening of the ellipse are calculated based on the ellipse parameters, including: calculating the eccentricity of the ellipse using the following formula: ;in, The minor axis radius, The radius of the major axis, The eccentricity of the ellipse is represented by the following formula, which is: ;in, Indicates flatness.

[0009] In the above-mentioned intelligent oil heating pipeline detection method, determining whether a geometric defect exists based on the ellipse eccentricity and the flattening includes: if the ellipse eccentricity is greater than or equal to a first preset threshold or the flattening is greater than or equal to a second preset threshold, determining that a geometric defect exists; if the ellipse eccentricity is less than the first preset threshold and the flattening is less than the second preset threshold, determining that no geometric defect exists.

[0010] In the above-mentioned intelligent oil heating pipeline detection method, environmental features are extracted from the pipeline background image, and environmental risks are confirmed based on the environmental features. This includes: inputting the pipeline background image into an environmental feature extractor based on a convolutional neural network model to obtain an environmental feature image encoding feature map; inputting the environmental feature image encoding feature map into an environmental risk identifier based on a classifier to obtain an environmental risk identification result, wherein the environmental risk identification result is used to indicate whether an environmental risk exists.

[0011] In the aforementioned intelligent oil heating pipeline inspection method, extracting pipeline appearance features from the pipeline target image and confirming the existence of appearance defects based on the pipeline appearance features includes: inputting the pipeline target image into a pipeline appearance feature extractor based on a convolutional neural network model to obtain a pipeline appearance feature encoding feature map; extracting a pipeline target reference image from a background database and inputting it into the pipeline appearance feature extractor based on a convolutional neural network model to obtain a pipeline appearance feature reference encoding feature map, wherein the pipeline target reference image is a pipeline image marked as having no appearance defects; calculating the pipeline appearance difference features between the pipeline appearance feature encoding feature map and the pipeline appearance feature reference encoding feature map; and determining whether appearance defects exist based on the pipeline appearance difference features.

[0012] In the above-mentioned intelligent oil heating pipeline inspection method, determining whether there is an appearance defect based on the pipeline appearance difference characteristics includes: inputting the pipeline appearance difference characteristics into a pipeline appearance defect identifier based on a classifier to obtain a pipeline appearance feature confirmation result, which is used to indicate whether there is an appearance defect.

[0013] In the aforementioned intelligent oil heating pipeline detection method, the eccentricity of the ellipse is determined through a joint verification approach. Flatness The probability of environmental risks The probability of having appearance defects Optimization includes: adjusting the eccentricity of the ellipse. and the flatness Divide into groups, and determine the probability of the existence of environmental risks. and the probability of the existence of appearance defects. Divide them into groups, calculate the relevant probabilities, and express them as follows: ;in, Indicates the first relevant probability. This represents the second relevant probability.

[0014] The second-order cross-correlation probability and the joint entropy probability are calculated as follows: ;in, This represents the second-order probability of cross-correlation. This represents the joint entropy probability.

[0015] As a column vector Multiplying it by its transpose yields the relevant probability matrix, denoted as: ;in, Represents the relevant probability matrix. This represents matrix multiplication.

[0016] And based on the relevant probability matrix and The optimization is as follows: ;in, This represents the optimized ellipse's eccentricity, flattening, probability of environmental risk after optimization, and probability of appearance defects after optimization. This indicates a mapping.

[0017] According to another aspect of this application, a smart oil heating pipeline inspection system is also provided, used to perform the above-described smart oil heating pipeline inspection method, comprising: an oil heating pipeline image acquisition module for acquiring oil heating pipeline images captured by a camera; an oil heating pipeline image segmentation module for segmenting the oil heating pipeline images to obtain a pipeline background image and a pipeline target image; an environmental risk detection module for extracting environmental features from the pipeline background image and confirming the existence of environmental risks based on the environmental features; an appearance defect detection module for extracting pipeline appearance features from the pipeline target image and confirming the existence of appearance defects based on the pipeline appearance features; a geometric defect detection module for extracting geometric features from the pipeline target image and confirming the existence of geometric defects based on the geometric features, wherein the geometric features include: elliptic eccentricity and flattening; and a joint confirmation optimization module for optimizing the elliptic eccentricity, flattening, probability of environmental risk, and probability of appearance defects through a joint confirmation method, and confirming the existence of environmental risks, appearance defects, and geometric defects based on the optimized elliptic eccentricity, optimized flattening, optimized probability of environmental risk, and optimized probability of appearance defects.

[0018] Compared with existing technologies, the intelligent oil heating pipeline inspection system and method provided in this application first uses a camera to acquire pipeline images and then separates the background and target using image segmentation technology to extract environmental features and pipeline appearance features separately. For the pipeline background image, a convolutional neural network model is used to identify potential environmental risks; for the pipeline target image, its appearance and geometric features are further analyzed to detect appearance defects such as cracks and deformations, as well as geometric defects such as abnormal elliptical eccentricity and flattening. Geometric parameters are calculated through steps such as edge enhancement, contour extraction, and ellipse fitting, and their presence is determined by combining preset thresholds. Furthermore, a joint verification method is used to optimize the relationship between various indicators to enhance the reliability and robustness of the detection. This not only improves detection accuracy and efficiency but also enables the identification of various defect types under complex working conditions, providing strong protection for safe production in the petroleum industry. Attached Figure Description

[0019] The above and other objects, features, and advantages of this application will become more apparent from the more detailed description of the embodiments of this application in conjunction with the accompanying drawings. The drawings are provided to further illustrate the embodiments of this application and form part of the specification. They are used together with the embodiments of this application to explain this application and do not constitute a limitation thereof. In the drawings, the same reference numerals generally represent the same components or steps.

[0020] Figure 1 This is a schematic flowchart of a smart oil heating pipeline detection method according to an embodiment of this application.

[0021] Figure 2 This is a schematic flowchart of step S3 in the intelligent oil heating pipeline detection method according to an embodiment of this application.

[0022] Figure 3 This is a schematic flowchart of step S4 in the intelligent oil heating pipeline detection method according to an embodiment of this application.

[0023] Figure 4 This is a schematic flowchart of step S5 in the intelligent oil heating pipeline detection method according to an embodiment of this application.

[0024] Figure 5 This is a schematic flowchart of step S56 in the intelligent oil heating pipeline detection method according to an embodiment of this application.

[0025] Figure 6 This is a schematic block diagram of an intelligent oil heating pipeline detection system according to an embodiment of this application. Detailed Implementation

[0026] Hereinafter, exemplary embodiments according to this application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this application, and not all embodiments of this application. It should be understood that this application is not limited to the exemplary embodiments described herein.

[0027] Figure 1 This is a schematic flowchart of a smart oil heating pipeline detection method according to an embodiment of this application. Figure 1 As shown, the intelligent oil heating pipeline inspection method includes: S1, acquiring an image of the oil heating pipeline captured by a camera; S2, performing image segmentation on the oil heating pipeline image to obtain a pipeline background image and a pipeline target image; S3, extracting environmental features from the pipeline background image and confirming the existence of environmental risks based on the environmental features; S4, extracting pipeline appearance features from the pipeline target image and confirming the existence of appearance defects based on the pipeline appearance features; S5, extracting geometric features from the pipeline target image and confirming the existence of geometric defects based on the geometric features, wherein the geometric features include: elliptic eccentricity and flattening.

[0028] Specifically, in step S1, images of the oil heating pipeline are acquired using a camera. It should be understood that the images acquired by the camera provide intuitive and detailed visual information, which is crucial for identifying various types of defects. High-definition cameras can capture subtle changes on the surface of the oil heating pipeline, such as external defects like cracks, corrosion, and deformation, as well as geometric defects caused by abnormal elliptical eccentricity and flattening. This information is significant for assessing the overall health of the oil heating pipeline. Simultaneously, the images of the oil heating pipeline acquired by the camera can be combined with computer vision and machine learning algorithms to achieve automated defect detection. Compared to traditional physical inspection methods (such as ultrasound and X-rays), image processing-based methods offer greater flexibility and adaptability. They can quickly process large amounts of data and maintain high detection accuracy under different operating conditions. For example, in extreme weather conditions, the camera can capture images of ice or snow accumulation on the surface of the oil heating pipeline, which may interfere with the operation of other inspection methods. Image processing technology can effectively identify and eliminate these interfering factors, ensuring the accuracy of the inspection results.

[0029] In one specific embodiment, depending on actual needs, a professional industrial camera with high resolution, low-light adaptability, and waterproof and dustproof functions can be selected. These cameras should be able to operate stably for extended periods in harsh environments. For example, in high-temperature, high-pressure, or low-temperature environments, the camera's materials and structural design require special attention to prevent malfunctions caused by temperature changes. Simultaneously, considering potential vibrations and impacts, the camera also needs to possess a certain degree of shock resistance. Furthermore, the camera should be installed in a position that fully covers the pipe surface, minimizing the influence of obstructions. Alternatively, a remotely controlled robot carrying the camera can be used for inspection. This approach not only improves work efficiency but also reduces the risk of human intervention.

[0030] Specifically, in step S2, the oil heating pipeline image is segmented to obtain a pipeline background image and a pipeline target image. It should be understood that image segmentation of the oil heating pipeline image breaks down the complex image into more easily processed parts, thereby improving the accuracy and efficiency of oil heating pipeline inspection. Specifically, the pipeline background image contains information about the surrounding environment, such as terrain, vegetation, and buildings, which is crucial for assessing environmental risks. For example, the pipeline target image can be used to identify potential safety hazards, such as ground subsidence or water accumulation near leak points, allowing for early preventative measures. The pipeline target image focuses on the condition of the pipeline itself, which is important for identifying visual and geometric defects. Detailed analysis of the pipeline target image can reveal visual defects such as cracks, corrosion, and deformation, as well as geometric defects caused by abnormal elliptical eccentricity and flattening. If these defects are not repaired in time, they may lead to serious safety accidents. Therefore, accurately extracting and analyzing the feature information in the pipeline target image is a key step in ensuring the safe operation of pipelines.

[0031] In one specific embodiment, a threshold-based segmentation method is used to segment the oil heating pipeline image to obtain a pipeline background image and a pipeline target image. Specifically, the acquired oil heating pipeline image is first preprocessed, including denoising and smoothing operations, to eliminate noise interference in the image. Then, an appropriate threshold is selected based on the grayscale difference between the pipeline and the background. Typically, the pipeline portion has a higher grayscale value, while the background portion has a lower grayscale value; therefore, an intermediate threshold can be set to distinguish between the two. For each pixel, if its grayscale value is greater than the threshold, it is classified as the pipeline target image; otherwise, it is classified as the pipeline background image.

[0032] In another specific embodiment, an adaptive thresholding technique can be employed to further improve segmentation results. In this method, the threshold is no longer fixed but dynamically adjusted based on the characteristics of local image regions. For example, the optimal threshold can be automatically calculated using the Otsu method, or the threshold for each pixel can be determined using local mean and variance. This method better adapts to image variations under different lighting conditions, improving the robustness and accuracy of segmentation.

[0033] In another specific embodiment, a convolutional neural network (CNN)-based image segmentation method can be used to segment the oil heating pipeline image to obtain a pipeline background image and a pipeline target image. U-Net or SegNet model architectures can be used. Specifically, the model training process typically consists of two stages: First, a data preparation stage, which requires collecting a large number of labeled oil heating pipeline images as training samples. Each image needs to be accurately labeled with background and target regions so that the model can learn the distinguishing features between the two. Then, a model training stage, where the network parameters are continuously adjusted using the backpropagation algorithm, enabling the model to output the correct segmentation result given the input image.

[0034] Specifically, in step S3, environmental features are extracted from the pipeline background image, and the existence of environmental risks is confirmed based on these features. It should be understood that extracting environmental features from the pipeline background image and confirming the existence of environmental risks is of great significance in the intelligent oil and gas pipeline inspection method. First, environmental factors have a direct impact on the safety and reliability of pipelines. For example, environmental problems such as corrosion, leakage, vegetation cover, and ground subsidence can all pose potential threats to pipelines. By analyzing the environmental features in the background image, these problems can be identified in advance, allowing for corresponding preventative and remedial measures. Second, the background image contains rich information, such as terrain, vegetation, and buildings, which is crucial for assessing environmental risks. For example, in some cases, snow cover or vegetation growth may obscure minor defects on the pipeline surface; however, by analyzing the background image, these interfering factors can be identified and eliminated, ensuring the accuracy of the inspection results. Furthermore, the background image can also be used to identify potential safety hazards, such as ground subsidence or water accumulation near leak points, allowing for the implementation of preventative measures in advance.

[0035] In one embodiment, such as Figure 2 As shown, extracting environmental features from the pipeline background image and confirming the existence of environmental risks based on the environmental features includes: S31, inputting the pipeline background image into an environmental feature extractor based on a convolutional neural network model to obtain an environmental feature image encoding feature map; S32, inputting the environmental feature image encoding feature map into an environmental risk identifier based on a classifier to obtain an environmental risk identification result, wherein the environmental risk identification result is used to indicate whether an environmental risk exists.

[0036] In one specific embodiment, the environment feature extractor based on the convolutional neural network model uses a deep residual shrinking network (ResNet), and the environment risk identifyer based on the classifier uses a support vector machine. Specifically, the basic unit of ResNet is a residual block, each containing several convolutional layers and a skip connection. The skip connection directly passes the input to the output, adding it to the result processed by the convolutional layers to form the final output. This design allows the network to learn the residual mapping between the input and output, rather than directly learning complex nonlinear mappings, thus effectively mitigating the degradation problem of deep networks. Specifically, in ResNet, the input image is first pre-processed through a series of convolutional layers, batch normalization, and the ReLU activation function. Then, these processed feature maps are fed into multiple residual blocks for further feature extraction. Each residual block contains multiple convolutional layers, and the input is directly passed to the output through skip connections. Finally, the feature map after being processed by multiple residual blocks is fed into a global average pooling layer to reduce the feature dimension, and then a fully connected layer is used to generate the final feature-encoded feature map.

[0037] In one specific embodiment, a large number of labeled pipeline background images are collected as training samples. These images are scaled, cropped, and normalized to ensure the consistency and stability of the input data. Typically, the images are resized to a fixed size (e.g., 224x224 pixels) and normalized to zero mean and unit variance. A pre-trained ResNet model (e.g., ResNet-50 or ResNet-101) is used as the initial model. Pre-trained models have already been trained on large-scale datasets (e.g., ImageNet), thus exhibiting good generalization ability. Transfer learning techniques can be used to fine-tune the model on task-specific datasets to accelerate convergence and improve performance. The environmental feature image encoded as a feature map after processing by the ResNet model is used as input, along with corresponding labels (whether environmental risk exists) as supervision signals. Each feature map needs to correspond to a specific label (0 indicates no risk, 1 indicates risk). Since the feature maps output by the ResNet model have high dimensionality, dimensionality reduction techniques such as Principal Component Analysis (PCA) can be used to map high-dimensional features to a low-dimensional space, reducing computational complexity and improving classification efficiency. Support Vector Machines (SVMs) are then used to train the dimensionality-reduced features. Backpropagation is used to continuously adjust the network parameters, enabling the model to output the correct environmental risk identification result given an input image. The loss function is typically the cross-entropy loss function, and the optimizer can be either Adam or SGD. Appropriate hyperparameters, such as learning rate, batch size, and number of iterations, need to be set during training. Cross-validation and hyperparameter tuning ensure the model's generalization ability and robustness. Various evaluation metrics (such as accuracy, recall, and F1 score) can be used to assess the model's performance, and adjustments can be made based on the results.

[0038] Specifically, in step S4, pipe appearance features are extracted from the pipe target image, and the presence of appearance defects is confirmed based on these features. It should be understood that pipe appearance defects (such as cracks, corrosion, deformation, etc.) have a direct impact on the safety and reliability of the pipeline. If these defects are not detected and repaired in time, they may cause serious safety accidents, leading to production interruptions or even environmental pollution. Therefore, efficient and accurate appearance defect detection technology can identify potential problems in advance, allowing for corresponding preventative measures to ensure the safe operation of the pipeline system. Traditional appearance defect detection methods mainly rely on manual inspection and regular maintenance, which is not only time-consuming and labor-intensive but also difficult to guarantee high accuracy and real-time performance. With the development of computer vision and deep learning technologies, image processing-based methods have gradually become mainstream. By performing detailed analysis of the pipe target image, subtle appearance defects can be automatically identified, improving detection efficiency and accuracy. For example, under extreme climatic conditions, traditional detection methods may be affected by interference, while image processing-based methods can effectively eliminate these interfering factors and provide reliable detection results.

[0039] In one embodiment, such as Figure 3 As shown, the method for extracting pipe appearance features from the pipe target image and confirming the existence of appearance defects based on the pipe appearance features includes: S41, inputting the pipe target image into a pipe appearance feature extractor based on a convolutional neural network model to obtain a pipe appearance feature encoding feature map; S42, extracting a pipe target reference image from a background database and inputting it into the pipe appearance feature extractor based on a convolutional neural network model to obtain a pipe appearance feature reference encoding feature map, wherein the pipe target reference image is a pipe image labeled as having no appearance defects; S43, calculating the pipe appearance difference features between the pipe appearance feature encoding feature map and the pipe appearance feature reference encoding feature map; and S44, determining whether appearance defects exist based on the pipe appearance difference features.

[0040] In one specific embodiment, the target image of the pipeline is input into a pre-trained convolutional neural network (such as ResNet-50) to extract high-level pipeline appearance feature encoding feature maps. These feature maps can effectively characterize key information on the pipeline surface, such as cracks, corrosion, and deformation. To further improve the feature extraction effect, a global average pooling layer can be added after the convolutional layer to reduce feature dimensionality and enhance feature robustness. Then, reference images of the pipeline target without appearance defects are extracted from a background database and input into the same convolutional neural network model to obtain reference encoding feature maps of pipeline appearance features. These reference images are pipeline images labeled as having no appearance defects and are used for comparative analysis with the current image. In this way, it is possible to more accurately determine whether there are appearance defects in the current image. Next, the difference features between the feature-encoded feature map of the target image and the feature-encoded feature map of the reference image are calculated. This can be achieved by calculating the positional difference between the pipe appearance feature-encoded feature map and the pipe appearance feature reference-encoded feature map. The pipe appearance difference features are then input into a pipe appearance defect identifyr based on a classifier to obtain a pipe appearance feature confirmation result. This confirmation result indicates whether an appearance defect exists. Here, the pipe appearance feature extractor based on a convolutional neural network model can use the ResNet-50 network architecture. The training process can be found in the environmental feature extractor based on a convolutional neural network model. Different training data can be used to implement the environmental feature extraction function and the pipe appearance feature extraction function respectively.

[0041] Specifically, in step S5, geometric features are extracted from the pipeline target image, and the presence of geometric defects is confirmed based on these features. These geometric features include the eccentricity and flattening of an ellipse. It should be understood that geometric defects (such as abnormal elliptical eccentricity or flattening) have a direct impact on the safety and reliability of pipelines. If these defects are not detected and repaired in a timely manner, they may lead to serious safety accidents, causing production interruptions or even environmental pollution. Therefore, efficient and accurate geometric defect detection technology can identify potential problems in advance, allowing for corresponding preventative measures to ensure the safe operation of the pipeline system.

[0042] In one embodiment, such as Figure 4As shown, the process of extracting geometric features from the pipeline target image and confirming the existence of geometric defects based on the geometric features includes: S51, performing edge enhancement on the pipeline target image to obtain an edge-enhanced pipeline target image; S52, performing contour extraction on the edge-enhanced pipeline target image to obtain a set of contour points on the inner wall of the pipeline; S53, performing ellipse fitting on the set of contour points on the inner wall of the pipeline to obtain ellipse parameters, the ellipse parameters including the major axis radius and the minor axis radius; S54, calculating the eccentricity and flattening of the ellipse based on the ellipse parameters; and S55, determining whether a geometric defect exists based on the eccentricity and flattening of the ellipse.

[0043] Specifically, the pipeline target image is input into an edge enhancement algorithm to obtain an edge-enhanced pipeline target image. The purpose of edge enhancement is to highlight boundary information in the image, making subsequent contour extraction more accurate. In a specific embodiment, the edge enhancement algorithm can use the Canny operator. Specifically, the process of edge enhancement using the Canny operator is as follows: First, the gradient magnitude and direction of the pipeline target image are calculated. The Canny operator calculates the gradient value of each pixel through a convolution operation. Non-maximum suppression is applied to refine the edges. This step compares the gradient values ​​of adjacent pixels, retains local maxima, and suppresses other pixels, thereby obtaining clearer edges. Double thresholding and edge linking are used to extract the final edge map. This step sets two thresholds, marking pixels with gradient values ​​higher than the high threshold as strong edges and pixels with gradient values ​​lower than the low threshold as weak edges, and connecting weak edges with strong edges through edge linking to form a complete edge-enhanced pipeline target image. The purpose of edge enhancement is to highlight boundary information in the image, making subsequent contour extraction more accurate. This method allows for better detection of subtle geometric changes on the pipe surface, improving inspection accuracy.

[0044] Then, contour extraction is performed on the edge-enhanced pipe target image to obtain a set of contour points on the inner wall of the pipe. The purpose of contour extraction is to identify the geometric shape of the pipe and provide basic data for further geometric feature analysis. In a specific embodiment, the contour extraction can use a contour tracking algorithm. Specifically, the process of contour extraction using a contour tracking algorithm is as follows: Select an initial starting point as the starting point for contour tracking. Usually, the leftmost edge point in the image is selected as the starting point. Starting from the initial starting point, track pixel by pixel along the edge and record the position coordinates of each contour point. During the tracking process, an 8-neighborhood or 4-neighborhood search strategy needs to be considered to ensure the integrity of the contour. When the tracking returns to the starting point, the contour is closed. At this time, a complete contour curve is obtained, and the position coordinates of all contour points are recorded. The purpose of contour extraction is to identify the geometric shape of the pipe and provide basic data for further geometric feature analysis. In this way, the geometric features of the pipe surface can be accurately captured, providing reliable data support for subsequent ellipse fitting.

[0045] Next, an ellipse fitting is performed on the set of contour points on the inner wall of the pipe to obtain ellipse parameters, including the major axis radius and the minor axis radius. The purpose of ellipse fitting is to describe the geometry of the pipe through a mathematical model in order to further calculate geometric features. In a specific embodiment, the ellipse fitting algorithm can use the least squares method. Specifically, the process of ellipse fitting using the least squares method is as follows: First, the ellipse parameters are initialized, including the center point coordinates, major axis radius, minor axis radius, and rotation angle. By minimizing the sum of squared distances from the contour points to the fitted ellipse, the ellipse parameters are gradually adjusted to achieve the best fit with the actual contour points. The specific optimization process can be implemented using gradient descent or Newton's method. When the change in the ellipse parameters is less than a set threshold, the fitting is considered to have converged, and the final ellipse parameters are obtained.

[0046] Next, based on the ellipse parameters obtained from ellipse fitting, the ellipse eccentricity and flattening are calculated. Ellipse eccentricity and flattening are important indicators for measuring pipe geometry and are used to determine whether geometric defects exist.

[0047] In one embodiment, calculating the eccentricity and flattening of the ellipse based on the ellipse parameters includes: calculating the eccentricity of the ellipse using the following formula: ;in, The minor axis radius, The radius of the major axis, This represents the eccentricity of the ellipse.

[0048] The flatness is calculated using the following formula: ;in, Indicates flatness.

[0049] Finally, based on the calculated eccentricity and flattening of the ellipse, it is determined whether there are any geometric defects. In one embodiment, such as... Figure 5 As shown, determining the existence of a geometric defect based on the ellipse's eccentricity and flattening includes: S561, if the ellipse's eccentricity is greater than or equal to a first preset threshold or the flattening is greater than or equal to a second preset threshold, a geometric defect is determined to exist; S562, if the ellipse's eccentricity is less than the first preset threshold and the flattening is less than the second preset threshold, a geometric defect is determined not to exist. In a specific embodiment, the first preset threshold is set to 0.9, and the second preset threshold is set to 0.1. If the calculated ellipse's eccentricity is greater than or equal to 0.9 or the flattening is greater than or equal to 0.1, a geometric defect is considered to exist; otherwise, a geometric defect is considered not to exist. Here, the first preset threshold and the second preset threshold can also be set using historical data or by referring to industry standards and specifications. The first preset threshold and the second preset threshold here are merely examples and do not constitute a limitation of this application.

[0050] In the above technical solution, three parallel pipelines are used to confirm the existence of environmental risks, appearance defects, and geometric defects. However, in reality, these three are usually related. Therefore, if these three can be considered in a related manner through joint confirmation, the accuracy of the calculation can be improved.

[0051] Specifically, as described above, the eccentricity of the ellipse and the flatness All meet The environmental risk identification result can be expressed as the probability of the existence of environmental risk. The results of confirming the appearance characteristics of the pipeline can also be expressed as the probability of the existence of appearance defects. Image feature representation based on convolutional neural networks, and Also satisfies That is, the eccentricity of the ellipse The flatness Sum of probabilities and They belong to the same probability.

[0052] In a preferred embodiment, the intelligent oil heating pipeline detection method further includes: S6, optimizing the ellipse eccentricity, flattening, probability of environmental risk, and probability of appearance defect through a joint confirmation method, and confirming whether there is environmental risk, appearance defect, or geometric defect based on the optimized ellipse eccentricity, optimized flattening, optimized probability of environmental risk, and optimized probability of appearance defect.

[0053] In one embodiment, the eccentricity of the ellipse is determined through joint verification. Flatness The probability of environmental risks The probability of having appearance defects Optimizations include:

[0054] The eccentricity of the ellipse and the flatness Divide into groups, and determine the probability of the existence of environmental risks. and the probability of the existence of appearance defects. Divide them into groups, calculate the relevant probabilities, and express them as follows: ;in, Indicates the first relevant probability. This represents the second relevant probability.

[0055] The second-order cross-correlation probability and the joint entropy probability are calculated as follows: ;in, This represents the second-order probability of cross-correlation. This represents the joint entropy probability.

[0056] As a column vector Multiplying it by its transpose yields the relevant probability matrix, denoted as: ;in, Represents the relevant probability matrix. This represents matrix multiplication.

[0057] And based on the relevant probability matrix and The optimization is as follows: ;in, This represents the optimized ellipse's eccentricity, flattening, probability of environmental risk after optimization, and probability of appearance defects after optimization. This indicates a mapping.

[0058] Therefore, by using the first-order correlation probability, the second-order cross-correlation probability, and the joint entropy probability, we can capture the probabilistic nonlinear correlation and tail correlation dependence, thereby confirming the discrete probability distribution in the form of joint correlation and improving the detection effect.

[0059] In summary, the intelligent oil heating pipeline inspection method provided in this application first acquires pipeline images using a camera and then separates the background from the target using image segmentation technology to extract environmental features and pipeline appearance features separately. For the pipeline background image, a convolutional neural network model is used to identify potential environmental risks; for the pipeline target image, its appearance and geometric features are further analyzed to detect appearance defects such as cracks and deformations, as well as geometric defects such as abnormal elliptical eccentricity and flattening. Geometric parameters are calculated through edge enhancement, contour extraction, and ellipse fitting, and the presence of defects is determined by combining these parameters with preset thresholds. Furthermore, a joint verification method is used to optimize the relationship between various indicators to enhance the reliability and robustness of the inspection. This not only improves the inspection accuracy and efficiency but also enables the identification of various defect types under complex working conditions, providing strong support for safe production in the oil industry.

[0060] This application also provides a smart oil heating pipeline detection system, such as Figure 6 As shown, the intelligent oil heating pipeline inspection system 600 includes: an oil heating pipeline image acquisition module 610, used to acquire oil heating pipeline images captured by a camera; an oil heating pipeline image segmentation module 620, used to segment the oil heating pipeline images to obtain a pipeline background image and a pipeline target image; an environmental risk detection module 630, used to extract environmental features from the pipeline background image and confirm the existence of environmental risks based on the environmental features; and an appearance defect detection module 640, used to extract pipeline appearance features from the pipeline target image and confirm whether... The appearance defect exists; the geometric defect detection module 650 is used to extract geometric features from the pipeline target image and confirm whether a geometric defect exists based on the geometric features, the geometric features including: ellipse eccentricity and flattening; the joint confirmation and optimization module 660 is used to optimize the ellipse eccentricity, flattening, probability of environmental risk, and probability of appearance defect through joint confirmation, and confirm whether environmental risk, appearance defect, and geometric defect exist based on the optimized ellipse eccentricity, optimized flattening, optimized probability of environmental risk, and optimized probability of appearance defect.

[0061] The basic principles of this application have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in this application are merely examples and not limitations, and should not be considered as essential features of each embodiment of this application. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the application to the necessity of employing the aforementioned specific details for implementation.

[0062] The block diagrams of devices, apparatuses, devices, and systems involved in this application are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Words such as “comprising,” “including,” “having,” etc., are open-ended terms meaning “including but not limited to,” and are used interchangeably with them. The terms “or” and “and” as used herein refer to the terms “and / or,” and are used interchangeably with them unless the context clearly indicates otherwise. The term “such as” as used herein refers to the phrase “such as but not limited to,” and is used interchangeably with it.

[0063] It should also be noted that in the apparatus, equipment, and methods of this application, the components or steps can be disassembled and / or recombined. These disassemblies and / or recombinations should be considered as equivalent solutions of this application.

[0064] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein can be applied to other aspects without departing from the scope of this application. Therefore, this application is not intended to be limited to the aspects shown herein, but rather to be accorded the widest scope consistent with the principles and novel features disclosed herein.

[0065] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of this application to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations thereof.

Claims

1. A smart method for detecting oil heating pipelines, characterized in that, include: Acquire images of oil heating pipelines captured by a camera; The image of the oil heating pipeline is segmented to obtain a pipeline background image and a pipeline target image; Environmental features are extracted from the pipeline background image, and the presence of environmental risks is determined based on these features. Extract pipe appearance features from the target image of the pipe, and confirm whether there are appearance defects based on the pipe appearance features; Geometric features are extracted from the pipeline target image, and the presence of geometric defects is confirmed based on the geometric features. The geometric features include: ellipse eccentricity and flattening. The eccentricity, flattening, probability of environmental risk, and probability of appearance defects of the ellipse are optimized by joint confirmation method. Based on the optimized eccentricity, flattening, probability of environmental risk, and probability of appearance defects, it is confirmed whether there is environmental risk, appearance defect, or geometric defect. Among them, the eccentricity of the ellipse was determined by joint confirmation. Flatness The probability of environmental risks The probability of having appearance defects Optimizations include: The eccentricity of the ellipse and the flatness Divide into groups, and determine the probability of the existence of environmental risks. and the probability of the existence of appearance defects. Divide them into groups, calculate the relevant probabilities, and express them as follows: ;in, Indicates the first relevant probability. Indicates the second relevant probability; The second-order cross-correlation probability and the joint entropy probability are calculated as follows: ; in, This represents the second-order probability of cross-correlation. Represents the joint entropy probability; As a column vector Multiplying it by its transpose yields the relevant probability matrix, denoted as: ; in, Represents the relevant probability matrix. Represents matrix multiplication; And based on the relevant probability matrix and The optimization is as follows: ; in, This represents the optimized ellipse's eccentricity, flattening, probability of environmental risk after optimization, and probability of appearance defects after optimization. This indicates a mapping.

2. The intelligent oil heating pipeline detection method according to claim 1, characterized in that, Extracting geometric features from the pipeline target image and confirming the existence of geometric defects based on the geometric features includes: The pipeline target image is subjected to edge enhancement to obtain an edge-enhanced pipeline target image; Contour extraction is performed on the edge-enhanced pipe target image to obtain a set of contour points on the inner wall of the pipe; An ellipse is fitted to the set of contour points on the inner wall of the pipe to obtain ellipse parameters, which include the major axis radius and the minor axis radius. Based on the ellipse parameters, calculate the eccentricity and flattening of the ellipse; Based on the eccentricity and flattening of the ellipse, determine whether there is a geometric defect.

3. The intelligent oil heating pipeline detection method according to claim 2, characterized in that, Based on the ellipse parameters, the eccentricity and flattening of the ellipse are calculated, including: The eccentricity of the ellipse is calculated using the following formula: ;in, The minor axis radius, The radius of the major axis, This represents the eccentricity of the ellipse; The flatness is calculated using the following formula: ;in, Indicates flatness.

4. The intelligent oil heating pipeline detection method according to claim 3, characterized in that, Based on the ellipse's eccentricity and flattening, determining whether a geometric defect exists includes: If the eccentricity of the ellipse is greater than or equal to a first preset threshold or the flattening is greater than or equal to a second preset threshold, a geometric defect is determined to exist. If the eccentricity of the ellipse is less than a first preset threshold and the flattening is less than a second preset threshold, it is determined that there is no geometric defect.

5. The intelligent oil heating pipeline detection method according to claim 1, characterized in that, Extracting environmental features from the pipeline background image and confirming the existence of environmental risks based on these features includes: The background image of the pipeline is input into an environmental feature extractor based on a convolutional neural network model to obtain an environmental feature image encoded feature map. The environmental feature image encoding feature map is input into a classifier-based environmental risk identifier to obtain an environmental risk identification result, which is used to indicate whether an environmental risk exists.

6. The intelligent oil heating pipeline detection method according to claim 1, characterized in that, Extracting pipe appearance features from the target image of the pipe, and confirming the existence of appearance defects based on the pipe appearance features, including: The target image of the pipeline is input into a pipeline appearance feature extractor based on a convolutional neural network model to obtain a pipeline appearance feature encoded feature map; The pipeline target reference image is extracted from the background database and input into the pipeline appearance feature extractor based on the convolutional neural network model to obtain the pipeline appearance feature reference encoded feature map. The pipeline target reference image is a pipeline image labeled as having no appearance defects. Calculate the pipe appearance difference features between the pipe appearance feature encoding feature map and the pipe appearance feature reference encoding feature map; Based on the differences in the appearance of the pipes, it is determined whether there are any appearance defects.

7. The intelligent oil heating pipeline detection method according to claim 6, characterized in that, Determining whether there is an appearance defect based on the pipe appearance difference features includes: inputting the pipe appearance difference features into a pipe appearance defect identifier based on a classifier to obtain a pipe appearance feature confirmation result, wherein the pipe appearance feature confirmation result is used to indicate whether there is an appearance defect.

8. A smart oil heating pipeline detection system, used to execute the smart oil heating pipeline detection method according to any one of claims 1-7, characterized in that, include: The image acquisition module for oil heating pipelines is used to acquire images of oil heating pipelines captured by a camera. The oil heating pipeline image segmentation module is used to segment the oil heating pipeline image to obtain a pipeline background image and a pipeline target image; An environmental risk detection module is used to extract environmental features from the pipeline background image and to confirm whether there is an environmental risk based on the environmental features. The appearance defect detection module is used to extract the appearance features of the pipeline from the pipeline target image and to confirm whether there are appearance defects based on the appearance features of the pipeline. A geometric defect detection module is used to extract geometric features from the pipeline target image and confirm the existence of geometric defects based on the geometric features. The geometric features include: ellipse eccentricity and flattening. The joint confirmation and optimization module is used to optimize the eccentricity, flattening, probability of environmental risk, and probability of appearance defect of the ellipse through joint confirmation. Based on the optimized eccentricity, flattening, probability of environmental risk, and probability of appearance defect, it confirms whether there is environmental risk, appearance defect, or geometric defect.

Citation Information

Patent Citations

  • Pipeline defect assessment method and device based on instance segmentation

    CN116630242A

  • Blast furnace air supply pipeline water leakage detection method based on visual algorithm

    CN117078598A