Intelligent petroleum oil heating pipeline detection system and method

Through the smart petroleum and oil heating pipeline detection system, the environmental and appearance characteristics of the pipeline are extracted using cameras and image processing technology, and combined with convolutional neural networks and elliptical fitting technology to identify defects, solving the problem that existing detection methods are difficult to fully cover defects, and achieving efficient and accurate pipeline detection.

CN120107267AActive Publication Date: 2025-06-06KARAMAY BEST TECH DEV CO LTD
View PDF 11 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The existing petroleum and oil heating pipeline inspection methods are difficult to fully cover all types of defects, and traditional inspection technologies require downtime operations, which increases operating costs and affects production efficiency.

Method used

A smart petroleum and oil heating pipeline detection system is adopted. The system acquires pipeline images through the camera, performs image segmentation to extract environmental features and pipeline appearance features, combines a convolutional neural network model to identify environmental risks and appearance defects, and calculates geometric features through ellipse fitting, and optimizes the detection results by joint confirmation.

Benefits of technology

It realizes the identification of various defect types under complex working conditions, improves detection accuracy and efficiency, reduces downtime, and enhances the safety guarantee of the oil industry.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120107267A_ABST
    Figure CN120107267A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of pipeline detection, and discloses an intelligent petroleum oil heating pipeline detection system and method.The intelligent petroleum oil heating pipeline detection method comprises the steps that firstly, a pipeline image is obtained through a camera, and a background and a target are separated through the image segmentation technology so that environment features and pipeline appearance features can be extracted respectively; for the pipeline background image, a convolutional neural network model is adopted to identify potential environmental risks; and further analyzing the appearance and geometric characteristics of the pipeline target image so as to detect appearance defects such as cracks and deformation and geometric defects such as ellipse eccentricity and flatness abnormity. Geometric parameters are calculated through the steps of edge enhancement, contour extraction, ellipse fitting and the like, and whether defects exist or not is judged by combining a preset threshold value. Furthermore, a joint confirmation mode is adopted to optimize the relationship among the indexes so as to enhance the reliability and robustness of detection. Therefore, not only are the detection precision and efficiency improved, but also the method can adapt to identification of various defect types under complex working conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of pipeline detection technology, and more specifically, to an intelligent petroleum oil heating pipeline detection system and method. Background Art

[0002] In the petroleum industry, the safety and reliability of oil heating pipelines are crucial to ensuring the continuity and safety of the production process. Traditionally, the inspection of oil heating pipelines mainly relies on manual inspection and regular maintenance, which is not only time-consuming and labor-intensive, but also difficult to ensure high accuracy and real-time performance. With the development of technology, methods based on image processing and machine learning have gradually been applied to various industrial inspection fields, but there are still many challenges and technical bottlenecks in the inspection of oil heating pipelines.

[0003] Existing inspection methods mostly focus on single-dimensional data analysis, such as relying solely on physical inspection methods such as ultrasound, X-rays or thermal imaging to assess the status of pipelines. However, these methods often cannot fully cover all types of defects, such as environmental risks, appearance defects, and geometric defects. In addition, traditional inspection technologies usually require downtime, which not only increases operating costs, but may also affect production efficiency.

[0004] Therefore, an optimized intelligent petroleum oil heating pipeline detection solution is expected. Summary of the invention

[0005] In order to solve the above technical problems, this application is proposed. The embodiments of this application provide a smart petroleum oil heating pipeline detection system and method, which can adapt to the identification of multiple defect types under complex working conditions and provide a strong guarantee for safe production in the petroleum industry.

[0006] According to one aspect of the present application, a smart petroleum and oil heating pipeline detection method is provided, including: acquiring a petroleum and oil heating pipeline image captured by a camera; performing image segmentation on the petroleum and 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 whether there is an environmental risk based on the environmental features; extracting pipeline appearance features from the pipeline target image, and confirming whether there is an appearance defect based on the pipeline appearance features; extracting geometric features from the pipeline target image, and confirming whether there is a geometric defect based on the geometric features, the geometric features including: ellipse eccentricity and flattening; optimizing the ellipse eccentricity, flattening, probability of environmental risk, and probability of appearance defect through a joint confirmation method, and confirming whether there is an environmental risk, appearance defect, and geometric defect based on the optimized ellipse eccentricity, optimized flattening, optimized probability of environmental risk, and optimized probability of appearance defect.

[0007] In the above-mentioned intelligent petroleum oil heating pipeline detection method, geometric features are extracted from the pipeline target image, and whether there are geometric defects is confirmed based on the geometric features, including: 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 pipeline inner wall contour points; ellipse fitting of the set of pipeline inner wall contour points to obtain ellipse parameters, the ellipse parameters include a major axis radius and a minor axis radius; based on the ellipse parameters, the ellipse eccentricity and flattening are calculated; based on the ellipse eccentricity and the flattening, it is determined whether there are geometric defects.

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

[0009] In the above-mentioned intelligent petroleum oil heating pipeline detection method, whether there is a geometric defect is determined based on the ellipse eccentricity and the flattening, including: 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, it is determined that there is a geometric defect; if the ellipse eccentricity is less than the first preset threshold and the flattening is less than the second preset threshold, it is determined that there is no geometric defect.

[0010] In the above-mentioned intelligent petroleum oil heating pipeline detection method, environmental features are extracted from the pipeline background image, and whether there is an environmental risk is confirmed based on the environmental features, including: 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, and the environmental risk identification result is used to indicate whether there is an environmental risk.

[0011] In the above-mentioned intelligent petroleum oil heating pipeline detection method, pipeline appearance features are extracted from the pipeline target image, and whether there are appearance defects is confirmed based on the pipeline appearance features, including: inputting the pipeline target image into a pipeline appearance feature extractor based on a convolutional neural network model to obtain a pipeline appearance feature coding feature map; extracting a pipeline target reference image from a background database, and inputting it into the pipeline appearance feature extractor based on the convolutional neural network model to obtain a pipeline appearance feature reference coding feature map, wherein the pipeline target reference image is a pipeline image marked as having no appearance defects; calculating the pipeline appearance difference feature between the pipeline appearance feature coding feature map and the pipeline appearance feature reference coding feature map; and determining whether there are appearance defects based on the pipeline appearance difference feature.

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

[0013] In the above-mentioned intelligent petroleum heating pipeline detection method, the ellipse eccentricity is determined by a joint confirmation method. , flatness , the probability of environmental risks , the probability of appearance defects The optimization includes: adjusting the eccentricity of the ellipse and the flattening rate Divide them into a group and divide the probability of the existence of environmental risks into and the probability of the presence of appearance defects Divide into a group and calculate the relevant probability, expressed as: ;in, represents the first related probability, represents the second related probability.

[0014] Calculate the second-order probability of mutual correlation and the joint entropy probability, expressed as: ;in, represents the second-order probability of cross-correlation, represents the joint entropy probability.

[0015] As a column vector Multiply it with its transpose to get the associated probability matrix, expressed as; ;in, represents the correlation probability matrix, Represents matrix multiplication.

[0016] Based on the relevant probability matrix and The optimization is expressed as: ;in, It represents the optimized ellipse eccentricity, optimized flattening, optimized probability of environmental risk, and optimized probability of appearance defects. Represents a mapping.

[0017] According to another aspect of the present application, a smart petroleum oil heating pipeline detection system is also provided, which is used to execute the above-mentioned smart petroleum oil heating pipeline detection method, including: a petroleum oil heating pipeline image acquisition module, which is used to obtain a petroleum oil heating pipeline image acquired by a camera; a petroleum oil heating pipeline image segmentation module, which is used to perform image segmentation on the petroleum oil heating pipeline image to obtain a pipeline background image and a pipeline target image; an environmental risk detection module, which is used to extract environmental features from the pipeline background image, and confirm whether there is an environmental risk based on the environmental features; an appearance defect detection module, which is used to extract pipeline appearance features from the pipeline target image, and confirm whether there is an appearance defect based on the pipeline appearance features; a geometric defect detection module, which is used to extract geometric features from the pipeline target image, and confirm whether there is a geometric defect based on the geometric features, and the geometric features include: ellipse eccentricity and flattening; a joint confirmation optimization module, which is used to optimize the ellipse eccentricity, flattening, the probability of environmental risk, and the probability of appearance defect through a joint confirmation method, and confirm whether there is an environmental risk, whether there is an appearance defect, and whether there is a geometric defect based on the optimized ellipse eccentricity, the optimized flattening, the optimized probability of environmental risk, and the optimized probability of appearance defect.

[0018] Compared with the prior art, the intelligent petroleum oil heating pipeline detection system and method provided by the present application first uses a camera to obtain a pipeline image, and separates the background from the target through image segmentation technology, so as to extract environmental features and pipeline appearance features respectively. For pipeline background images, a convolutional neural network model is used to identify potential environmental risks; for pipeline target images, their 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 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 various defect types under complex working conditions, providing a strong guarantee for safe production in the petroleum industry. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] By describing the embodiments of the present application in more detail in conjunction with the accompanying drawings, the above and other purposes, features and advantages of the present application will become more apparent. The accompanying drawings are used to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the present application and do not constitute a limitation of the present application. In the accompanying drawings, the same reference numerals generally represent the same components or steps.

[0020] Figure 1 It is a schematic flow chart of the intelligent petroleum oil heating pipeline detection method according to an embodiment of the present application.

[0021] Figure 2 It is a schematic flow chart of S3 in the intelligent petroleum oil heating pipeline detection method according to an embodiment of the present application.

[0022] Figure 3 It is a schematic flow chart of S4 in the intelligent petroleum oil heating pipeline detection method according to an embodiment of the present application.

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

[0024] Figure 5 It is a schematic flow chart of S56 in the intelligent petroleum oil heating pipeline detection method according to an embodiment of the present application.

[0025] Figure 6 It is a schematic block diagram of a smart petroleum oil heating pipeline detection system according to an embodiment of the present application. DETAILED DESCRIPTION

[0026] Below, the exemplary embodiments according to the present application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application, and it should be understood that the present application is not limited to the exemplary embodiments described here.

[0027] Figure 1 FIG. 1 is a schematic flow chart of a smart petroleum heating pipeline detection method according to an embodiment of the present application. Figure 1 As shown, the intelligent petroleum oil heating pipeline detection method includes: S1, obtaining a petroleum oil heating pipeline image collected by a camera; S2, performing image segmentation on the petroleum 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 whether there is an environmental risk based on the environmental features; S4, extracting pipeline appearance features from the pipeline target image, and confirming whether there is an appearance defect based on the pipeline appearance features; S5, extracting geometric features from the pipeline target image, and confirming whether there is a geometric defect based on the geometric features, and the geometric features include: ellipse eccentricity and flattening.

[0028] Specifically, in step S1, an image of a petroleum heating pipeline captured by a camera is obtained. It should be understood that the image captured by the camera can provide intuitive and detailed visual information, which is essential for identifying various types of defects. The high-definition camera can capture subtle changes in the surface of the petroleum heating pipeline, such as appearance defects such as cracks, corrosion, and deformation, as well as geometric defects caused by abnormal elliptical eccentricity and flattening. This information is of great significance for assessing the overall health of the petroleum heating pipeline. At the same time, the image of the petroleum heating pipeline captured by the camera can be combined with computer vision and machine learning algorithms to achieve automated defect detection. Compared with traditional physical detection methods (such as ultrasound, X-ray, etc.), the image processing-based method has higher flexibility and adaptability. It can quickly process large amounts of data and maintain high detection accuracy under different working conditions. For example, under extreme climatic conditions, the camera can capture ice or snow on the surface of the petroleum heating pipeline, which may interfere with the work of other detection methods. Through image processing technology, these interference factors can be effectively identified and eliminated to ensure the accuracy of the detection results.

[0029] In a specific embodiment, according to actual needs, professional industrial cameras with high resolution, low light adaptability, and waterproof and dustproof functions can be selected. These cameras should be able to meet the requirements of long-term stable operation in harsh environments. For example, in high temperature, high pressure or low temperature environments, special attention should be paid to the material and structural design of the camera to prevent failures caused by temperature changes. At the same time, considering possible vibrations and shocks, the camera also needs to have certain seismic resistance. Furthermore, the camera is installed in a position that can fully cover the surface of the pipeline and try to avoid the influence of obstructions. A remotely controlled robot can also be used to carry the camera for inspection. This method can not only improve work efficiency, but also reduce the risk of manual intervention.

[0030] Specifically, in step S2, the image of the petroleum oil heating pipeline is segmented to obtain a pipeline background image and a pipeline target image. It should be understood that by performing image segmentation on the petroleum oil heating pipeline image, the complex petroleum oil heating pipeline image can be decomposed into parts that are easier to handle, thereby improving the accuracy and efficiency of petroleum oil heating pipeline detection. Specifically, the pipeline background image contains information about the surrounding environment, such as terrain, vegetation, buildings, etc., 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 the leak point, so as to take preventive measures in advance. The pipeline target image focuses on the state of the pipeline itself, which is of great significance for identifying appearance defects and geometric defects. Through a detailed analysis of the pipeline target image, appearance defects such as cracks, corrosion, and deformation, as well as geometric defects caused by abnormal elliptical eccentricity and flattening, can be found. If these defects are not repaired in time, they may cause serious safety accidents. Therefore, accurately extracting and analyzing the feature information in the pipeline target image is a key link in ensuring the safe operation of the pipeline.

[0031] In a specific embodiment, the petroleum heating pipeline image is segmented based on a threshold segmentation method to obtain a pipeline background image and a pipeline target image. Specifically, the collected petroleum heating pipeline image is first preprocessed, including denoising and smoothing operations, to eliminate noise interference in the image. Then, according to the grayscale difference between the pipeline and the background, an appropriate threshold is selected. Usually, the grayscale value of the pipeline part is higher, while the grayscale value of the background part is lower, so the two can be distinguished by setting an intermediate threshold. For each pixel, if its grayscale value is greater than the threshold, it is classified as a pipeline target image; otherwise, it is classified as a pipeline background image.

[0032] In another specific embodiment, in order to further improve the segmentation effect, an adaptive threshold segmentation technology can also be used. In this method, the threshold is no longer fixed, but is dynamically adjusted according to the characteristics of the local area of ​​the image. For example, the Otsu method can be used to automatically calculate the optimal threshold, or the local mean and variance can be used to determine the threshold of each pixel. This method can better adapt to image changes under different lighting conditions and improve the robustness and accuracy of segmentation.

[0033] In another specific embodiment, the image segmentation method based on convolutional neural network (CNN) can also be used to segment the petroleum heating pipeline image to obtain the pipeline background image and the pipeline target image. Among them, U-Net and SegNet model architectures can be used. Specifically, the training process of the model is usually divided into two stages: the first is the data preparation stage, and a large number of annotated petroleum heating pipeline images need to be collected as training samples. Each image needs to accurately mark the background and target areas so that the model can learn the distinguishing features of the two. Then there is the model training stage, in which the network parameters are continuously adjusted through the back propagation algorithm so that the model can output the correct segmentation results given the input image.

[0034] Specifically, in step S3, environmental features are extracted from the pipeline background image, and whether there is an environmental risk is confirmed based on the environmental features. It should be understood that in the intelligent petroleum oil heating pipeline detection method, it is of great significance to extract environmental features from the pipeline background image and confirm whether there is an environmental risk. First of all, environmental factors have a direct impact on the safety and reliability of the pipeline. For example, environmental problems such as corrosion, leakage, vegetation coverage, and ground subsidence may pose a potential threat to the pipeline. By analyzing the environmental features in the background image, these problems can be identified in advance, so that corresponding preventive and repair measures can be taken. Secondly, the background image contains rich information, such as terrain, vegetation, buildings, etc., which is crucial for assessing environmental risks. For example, in some cases, snow cover or vegetation growth may cover up subtle defects on the surface of the pipeline, and by analyzing the background image, these interference factors can be identified and eliminated to ensure the accuracy of the detection results. In addition, the background image can also be used to identify potential safety hazards, such as ground subsidence or water accumulation near the leak point, so as to take preventive measures in advance.

[0035] In one embodiment, Figure 2 As shown, environmental features are extracted from the pipeline background image, and whether there is an environmental risk is confirmed based on the environmental features, including: 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, and the environmental risk identification result is used to indicate whether there is an environmental risk.

[0036] In a specific embodiment, the environmental feature extractor based on the convolutional neural network model uses a deep residual shrinkage network (ResNet), and the classifier-based environmental risk identifier uses a support vector machine. Specifically, the basic unit of ResNet is a residual block, each of which contains several convolutional layers and a skip connection. The skip connection directly passes the input to the output, and adds the result after processing by the convolutional layer to form the final output. This design allows the network to learn the residual mapping between the input and the output instead of directly learning complex nonlinear mappings, thereby effectively alleviating the degradation problem of the deep network. Specifically, in ResNet, the input image is first preliminarily processed through a series of convolutional layers, batch normalization, and activation functions (ReLU). Then, these processed feature maps are sent to multiple residual blocks for further feature extraction. Each residual block contains multiple convolutional layers and passes the input directly to the output through a skip connection. Finally, the feature map processed by multiple layers of residual blocks will be sent to the global average pooling layer to reduce the feature dimension, and the final feature encoding feature map will be generated through the fully connected layer.

[0037] In a specific embodiment, a large number of annotated pipeline background images are collected as training samples. The pipeline background images are scaled, cropped, normalized, and the like to ensure the consistency and stability of the input data. Typically, the image is adjusted to a fixed size (such as 224x224 pixels) and normalized to zero mean unit variance. A pre-trained ResNet model (such as ResNet-50 or ResNet-101) is used as the initial model. The pre-trained model has been trained on large-scale datasets (such as ImageNet) and therefore has good generalization capabilities. Transfer learning techniques can be used to fine-tune on datasets for specific tasks to speed up convergence and improve performance. The encoded feature map of the environmental feature image processed by the ResNet model is used as input, and the corresponding label (whether there is an environmental risk) is provided as a supervisory signal. Each set of feature encoding feature maps needs to correspond to a clear label (0 means no risk, 1 means risk). Since the feature encoding feature maps output by the ResNet model have high dimensions, dimensionality reduction techniques such as principal component analysis (PCA) can be used to map high-dimensional features to low-dimensional space to reduce computational complexity and improve classification efficiency. The support vector machine algorithm is used to train the reduced-dimensional features. The back-propagation algorithm is used to continuously adjust the network parameters so that the model can output the correct environmental risk identification results given the input image. The loss function usually uses the cross entropy loss function, and the optimizer can choose Adam or SGD. Appropriate hyperparameters need to be set during training, such as learning rate, batch size, number of iterations, etc. The generalization ability and robustness of the model are ensured through cross-validation and hyperparameter adjustment. A variety of evaluation indicators (such as accuracy, recall, F1 value, etc.) can be used to evaluate the performance of the model, and corresponding adjustments can be made based on the results.

[0038] Specifically, in step S4, the pipeline appearance features are extracted from the pipeline target image, and whether there are appearance defects is confirmed based on the pipeline appearance features. It should be understood that pipeline 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 discovered and repaired in time, they may cause serious safety accidents, leading to production interruptions and even environmental pollution. Therefore, through efficient and accurate appearance defect detection technology, potential problems can be identified in advance, and corresponding preventive measures can be taken to ensure the safe operation of the pipeline system. Traditional appearance defect detection methods mainly rely on manual inspection and regular maintenance. This method is not only time-consuming and labor-intensive, but also difficult to ensure high accuracy and real-time performance. With the development of computer vision and deep learning technology, methods based on image processing have gradually become mainstream. By carefully analyzing the pipeline 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 interfered with, while methods based on image processing can effectively eliminate these interference factors and provide reliable detection results.

[0039] In one embodiment, Figure 3 As shown, extracting pipeline appearance features from the pipeline target image, and confirming whether there are appearance defects based on the pipeline appearance features, including: S41, inputting the pipeline target image into a pipeline appearance feature extractor based on a convolutional neural network model to obtain a pipeline appearance feature coding feature map; S42, extracting a pipeline target reference image from a background database, and inputting it into the pipeline appearance feature extractor based on the convolutional neural network model to obtain a pipeline appearance feature reference coding feature map, wherein the pipeline target reference image is a pipeline image marked as having no appearance defects; S43, calculating the pipeline appearance difference feature between the pipeline appearance feature coding feature map and the pipeline appearance feature reference coding feature map; S44, determining whether there are appearance defects based on the pipeline appearance difference feature.

[0040] In a specific embodiment, the pipeline target image 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, deformation, etc. In order to further improve the effect of feature extraction, a global average pooling layer (Global Average Pooling) can be added after the convolution layer to reduce the feature dimension and enhance the robustness of the feature. Then, a reference image of the pipeline target without appearance defects is extracted from the background database and input into the same convolutional neural network model to obtain a reference encoding feature map of the pipeline appearance features. These reference images are pipeline images marked as having no appearance defects, which 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 coding feature map of the target image and the feature coding feature map of the reference image are calculated. The pipeline appearance difference features can be obtained by calculating the positional difference between the pipeline appearance feature coding feature map and the pipeline appearance feature reference coding feature map, and the pipeline appearance difference features are input into the classifier-based pipeline appearance defect identifier to obtain a pipeline appearance feature confirmation result, and the pipeline appearance feature confirmation result is used to indicate whether there is an appearance defect. Here, the pipeline appearance feature extractor based on the convolutional neural network model can use the ResNet-50 network architecture. The training process can refer to the environmental feature extractor based on the convolutional neural network model. The environmental feature extraction function and the pipeline appearance feature extraction function are respectively realized through different training data.

[0041] Specifically, in step S5, geometric features are extracted from the pipeline target image, and whether there are geometric defects is confirmed based on the geometric features, and the geometric features include: ellipse eccentricity and flattening. It should be understood that geometric defects (such as abnormal ellipse eccentricity, abnormal flattening, etc.) have a direct impact on the safety and reliability of the pipeline. If these defects are not discovered and repaired in time, they may cause serious safety accidents, leading to production interruptions and even environmental pollution. Therefore, through efficient and accurate geometric defect detection technology, potential problems can be identified in advance, and corresponding preventive measures can be taken to ensure the safe operation of the pipeline system.

[0042] In one embodiment, Figure 4As shown, geometric features are extracted from the pipeline target image, and whether there is a geometric defect is confirmed based on the geometric features, including: S51, edge enhancement is performed on the pipeline target image to obtain an edge-enhanced pipeline target image; S52, contour extraction is performed on the edge-enhanced pipeline target image to obtain a set of pipeline inner wall contour points; S53, ellipse fitting is performed on the set of pipeline inner wall contour points to obtain ellipse parameters, and the ellipse parameters include a major axis radius and a minor axis radius; S54, based on the ellipse parameters, the ellipse eccentricity and the flattening are calculated; S55, based on the ellipse eccentricity and the flattening, it is determined whether there is a geometric defect.

[0043] Specifically, the pipeline target image is input into the edge enhancement algorithm to obtain an edge enhanced pipeline target image. The purpose of edge enhancement is to highlight the boundary information in the image so that the subsequent contour extraction is 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 amplitude 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 edge. This step compares the gradient values ​​of adjacent pixels, retains the local maximum value, and suppresses other pixels to obtain a clearer edge. Double Thresholding and Edge Linking are used to extract the final edge map. This step sets two high and low thresholds, marks the pixels with gradient values ​​higher than the high threshold as strong edges, and marks the pixels with gradient values ​​lower than the low threshold as weak edges, and connects the weak edges to the strong edges through edge connection to form a complete edge enhanced pipeline target image. The purpose of edge enhancement is to highlight the boundary information in the image so that the subsequent contour extraction is more accurate. In this way, subtle geometric changes on the pipe surface can be better captured and detection accuracy can be improved.

[0044] Then, the edge-enhanced pipeline target image is subjected to contour extraction to obtain a set of contour points on the inner wall of the pipeline. The purpose of contour extraction is to identify the geometric shape of the pipeline 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 the contour tracking algorithm is as follows: an initial starting point is selected 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, pixel by pixel tracking is performed along the edge to record the position coordinates of each contour point. During the tracking process, it is necessary to consider the search strategy of 8 neighborhoods or 4 neighborhoods to ensure the integrity of the contour. When the tracking returns to the starting point, the contour is closed. At this point, 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 pipeline and provide basic data for further geometric feature analysis. In this way, the geometric features of the pipeline surface can be accurately captured, providing reliable data support for subsequent ellipse fitting.

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

[0046] Next, based on the ellipse parameters obtained by ellipse fitting, the ellipse eccentricity and flattening are calculated. The ellipse eccentricity and flattening are important indicators for measuring the geometric shape of the pipeline and are used to determine whether there are geometric defects.

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

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

[0049] Finally, based on the calculated ellipse eccentricity and flattening, it is determined whether there is a geometric defect. Figure 5 As shown, based on the ellipse eccentricity and the flattening, determining whether there is a geometric defect includes: S561, 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 there is a geometric defect; S562, if the ellipse eccentricity is less than the first preset threshold and the flattening is less than the second preset threshold, determining that there is no geometric defect. 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 eccentricity is greater than or equal to 0.9 or the flattening is greater than or equal to 0.1, it is considered that there is a geometric defect; otherwise, it is considered that there is no geometric defect. Here, the first preset threshold and the second preset threshold can also be set by historical data or with reference to industry standards and specifications. The first preset threshold and the second preset threshold here are only examples and do not constitute limitations of the present application.

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

[0051] Specifically, as mentioned above, the ellipse eccentricity and the flattening rate All meet , and the environmental risk identification result can be expressed as the probability of the existence of environmental risk , and the pipeline appearance feature confirmation result can also be expressed as the probability of the existence of appearance defects , and the image feature representation based on convolutional neural network, and Also satisfied , that is, the eccentricity of the ellipse , the flattening rate and probability and Belongs to homogeneous probability.

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

[0053] In one embodiment, the ellipse eccentricity is determined by a joint confirmation method. , flatness , the probability of environmental risks , the probability of appearance defects Optimizations include: The eccentricity of the ellipse and the flattening rate Divide them into a group and divide the probability of the existence of environmental risks into and the probability of the presence of appearance defects Divide into a group and calculate the relevant probability, expressed as: ;in, represents the first related probability, represents the second related probability.

[0054] Calculate the second-order probability of mutual correlation and the joint entropy probability, expressed as: ;in, represents the second-order probability of cross-correlation, represents the joint entropy probability.

[0055] As a column vector Multiply it with its transpose to get the associated probability matrix, expressed as; ;in, represents the correlation probability matrix, Represents matrix multiplication.

[0056] Based on the relevant probability matrix and The optimization is expressed as: ;in, It represents the optimized ellipse eccentricity, optimized flattening, optimized probability of environmental risk, and optimized probability of appearance defects. Represents a mapping.

[0057] Therefore, through the above first-order correlation probability, cross-correlation second-order probability and joint entropy probability, the probability nonlinear correlation and tail correlation dependence can be captured, so that the discrete probability distribution can be confirmed in the form of joint correlation, thereby improving the detection effect.

[0058] In summary, the intelligent petroleum oil heating pipeline detection method provided by the present application first uses a camera to obtain a pipeline image, and separates the background from the target through image segmentation technology, so as to extract environmental features and pipeline appearance features respectively. For pipeline background images, a convolutional neural network model is used to identify potential environmental risks; for pipeline target images, their 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 various defect types under complex working conditions, providing a strong guarantee for safe production in the petroleum industry.

[0059] This application also provides a smart petroleum oil heating pipeline detection system, such as Figure 6 As shown, the intelligent petroleum oil heating pipeline detection system 600 includes: a petroleum oil heating pipeline image acquisition module 610, which is used to obtain a petroleum oil heating pipeline image acquired by a camera; a petroleum oil heating pipeline image segmentation module 620, which is used to segment the petroleum oil heating pipeline image to obtain a pipeline background image and a pipeline target image; an environmental risk detection module 630, which is used to extract environmental features from the pipeline background image and confirm whether there is an environmental risk based on the environmental features; an appearance defect detection module 640, which is used to extract pipeline appearance features from the pipeline target image and confirm whether there is an environmental risk based on the pipeline appearance features. There are appearance defects; a geometric defect detection module 650 is used to extract geometric features from the pipeline target image, and confirm whether there are geometric defects based on the geometric features, and the geometric features include: ellipse eccentricity and flattening; a joint confirmation optimization module 660 is used to optimize the ellipse eccentricity, flattening, the probability of environmental risk, and the probability of appearance defects through a joint confirmation method, and based on the optimized ellipse eccentricity, the optimized flattening, the optimized probability of environmental risk, and the optimized probability of appearance defects, confirm whether there are environmental risks, appearance defects, and geometric defects.

[0060] The basic principles of the present application are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present application are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present application. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, not for limitation, and the above details do not limit the present application to being implemented by adopting the above specific details.

[0061] The block diagrams of the devices, apparatuses, equipment, and systems involved in this application are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagram. As will be appreciated by those skilled in the art, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including", "comprising", "having", etc. are open words, referring to "including but not limited to", and can be used interchangeably with them. The words "or" and "and" used here refer to the words "and / or" and can be used interchangeably with them, unless the context clearly indicates otherwise. The words "such as" used here refer to the phrase "such as but not limited to", and can be used interchangeably with them.

[0062] It should also be noted that in the apparatus, device and method of the present application, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present application.

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

[0064] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present application to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.

Claims

1. A smart petroleum oil heating pipeline detection method, characterized in that: include: Acquire an image of a petroleum oil heating pipeline captured by a camera; perform image segmentation on the petroleum oil heating pipeline image to obtain a pipeline background image and a pipeline target image; extract environmental features from the pipeline background image, and confirm whether there is an environmental risk based on the environmental features; extract pipeline appearance features from the pipeline target image, and confirm whether there is an appearance defect based on the pipeline appearance features; extract geometric features from the pipeline target image, and confirm whether there is a geometric defect based on the geometric features, wherein the geometric features include: ellipse eccentricity and flattening; The ellipse eccentricity, flattening, probability of environmental risk and probability of appearance defects are optimized through a joint confirmation method, and based on the optimized ellipse eccentricity, optimized flattening, optimized probability of environmental risk and optimized probability of appearance defects, it is confirmed whether there is an environmental risk, whether there is an appearance defect and whether there is a geometric defect.

2. The intelligent petroleum oil heating pipeline detection method according to claim 1 is characterized in that: Extracting geometric features from the pipeline target image, and confirming whether there is a geometric defect based on the geometric features, including: performing edge enhancement on the pipeline target image to obtain an edge-enhanced pipeline target image; performing contour extraction on the edge-enhanced pipeline target image to obtain a set of pipeline inner wall contour points; performing ellipse fitting on the set of pipeline inner wall contour points to obtain ellipse parameters, the ellipse parameters including a major axis radius and a minor axis radius; calculating an ellipse eccentricity and a flattening based on the ellipse parameters; and determining whether there is a geometric defect based on the ellipse eccentricity and the flattening.

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

4. The intelligent petroleum oil heating pipeline detection method according to claim 3 is characterized in that: Based on the ellipse eccentricity and the flattening, determine whether there is a geometric defect, including: 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, determine that there is a geometric defect; if the ellipse eccentricity is less than the first preset threshold and the flattening is less than the second preset threshold, determine that there is no geometric defect.

5. The intelligent petroleum oil heating pipeline detection method according to claim 1 is characterized in that: Environmental features are extracted from the pipeline background image, and whether there is an environmental risk is confirmed based on the environmental features, including: 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, and the environmental risk identification result is used to indicate whether there is an environmental risk.

6. The intelligent petroleum oil heating pipeline detection method according to claim 1 is characterized in that: Extracting pipeline appearance features from the pipeline target image, and confirming whether there is an appearance defect based on the pipeline appearance features, including: 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 the 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 feature between the pipeline appearance feature encoding feature map and the pipeline appearance feature reference encoding feature map; and determining whether there is an appearance defect based on the pipeline appearance difference feature.

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

8. The intelligent petroleum oil heating pipeline detection method according to claim 1 is characterized in that: The eccentricity of the ellipse is determined by joint confirmation , flatness , the probability of environmental risks , the probability of appearance defects The optimization includes: adjusting the eccentricity of the ellipse and the flattening rate Divide them into a group and divide the probability of the existence of environmental risks into and the probability of the presence of appearance defects Divide into a group and calculate the relevant probability, expressed as: ;in, represents the first related probability, Represents the second correlation probability; calculates the second-order probability of mutual correlation and the joint entropy probability, expressed as: ;in, represents the second-order probability of cross-correlation, represents the joint entropy probability; as a column vector Multiply it with its transpose to get the associated probability matrix, expressed as; ;in, represents the correlation probability matrix, represents matrix multiplication; and based on the relevant probability matrix and The optimization is expressed as: ;in, It represents the optimized ellipse eccentricity, optimized flattening, optimized probability of environmental risk, and optimized probability of appearance defects. Represents a mapping.

9. A smart petroleum oil heating pipeline detection system, used to execute the smart petroleum oil heating pipeline detection method according to any one of claims 1 to 8, characterized in that: include: The oil and oil heating pipeline image acquisition module is used to obtain the oil and oil heating pipeline image collected by the camera; the oil and oil heating pipeline image segmentation module is used to perform image segmentation on the oil and oil heating pipeline image to obtain a pipeline background image and a pipeline target image; the environmental risk detection module is used to extract environmental features from the pipeline background image and confirm whether there is an environmental risk based on the environmental features; An appearance defect detection module, used to extract pipeline appearance features from the pipeline target image, and confirm whether there are appearance defects based on the pipeline appearance features; A geometric defect detection module is used to extract geometric features from the pipeline target image and confirm whether there are geometric defects based on the geometric features, wherein the geometric features include: ellipse eccentricity and flattening; The joint confirmation optimization module is used to optimize the ellipse eccentricity, flattening, probability of environmental risk and probability of appearance defects through joint confirmation, and confirm whether there are environmental risks, appearance defects and geometric defects based on the optimized ellipse eccentricity, optimized flattening, optimized probability of environmental risk and optimized probability of appearance defects.

Citation Information

Patent Citations

  • Method and system for detecting pipeline fault, computer storage medium and device

    CN109341753A

  • 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

  • Gas pipeline monitoring system and method based on artificial intelligence mixed large model

    CN117523177A

  • Intelligent management and identification system for submarine routing pipeline based on gis

    CN118135390A