Method and device for determining external corrosion type of steel pipe based on computer vision
By using computer vision and multimodal recognition models, combined with machine learning and image data, the corrosion type of buried oil and gas pipelines can be quickly and accurately identified, solving the problems of low identification efficiency and poor accuracy in existing technologies, and ensuring the safety and stability of the pipelines.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- PETROCHINA CO LTD
- Filing Date
- 2024-11-08
- Publication Date
- 2026-05-08
AI Technical Summary
Existing technologies cannot accurately and effectively identify the types of external corrosion in buried oil and gas pipelines, making it impossible to formulate targeted measures and effective risk management, thus affecting the safe and stable operation of the pipelines.
A computer vision-based approach is adopted to acquire image data of external corrosion failure of pipelines and operating condition data. A trained machine learning model is used to identify the corrosion morphology type, and a multimodal recognition model is combined to determine the specific corrosion type according to specified parameters.
It enables rapid and accurate identification of pipeline corrosion types, improves identification efficiency and accuracy, supports the development of targeted measures and risk management, and ensures the safe operation of pipelines.
Smart Images

Figure CN121999262A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of pipeline failure analysis technology, and in particular to a method and apparatus for determining the type of external corrosion of steel pipes based on computer vision. Background Technology
[0002] Oil and gas pipelines are a crucial component of oil and gas development and production, and ensuring their safe and stable operation is vital for safeguarding national oil and gas energy security. Due to management and economic considerations, most oil and gas pipelines are buried underground. The soil contains water, various corrosive ions, bacteria, stray currents, and other substances that can cause external corrosion and perforation of buried pipelines, thereby affecting their integrity. To control external corrosion of buried pipelines, external anti-corrosion coatings and cathodic protection measures are often employed, and interference protection measures are also implemented when stray current interference occurs. However, damage to the external anti-corrosion coating is inevitable, some pipelines lack cathodic protection, and even those with cathodic protection sometimes have unreliable effectiveness. Coupled with the effects of stray current interference, the risk of external corrosion for buried pipelines remains high, and the types of external corrosion failure are diverse, including natural soil corrosion, joint corrosion, corrosion under insulation layers, AC stray current corrosion, DC stray current corrosion, galvanic corrosion, and corrosion caused by cathodic protection failure, making identification of external corrosion types difficult.
[0003] Currently, the identification of external corrosion types in buried pipelines mainly relies on human experience and third-party laboratories. Experience-based identification affects the efficiency and accuracy of failure identification, while third-party testing increases workload and financial investment, reduces coverage, and fails to meet the requirements of oil and gas pipeline failure management and risk management. Neither of these methods can accurately and effectively identify the external corrosion types of buried steel pipes, nor can they develop effective targeted measures or conduct effective risk control for different external corrosion types, thus failing to ensure the safe and stable operation of buried oil and gas pipelines. Summary of the Invention
[0004] In view of the above problems, the present invention is proposed to provide a computer vision-based method and apparatus for determining the type of external corrosion of steel pipes, which overcomes or at least partially solves the above problems. It can provide a convenient, fast, scientific and effective method for identifying the type of external corrosion in oil and gas pipelines, so as to support the formulation of targeted measures for external corrosion of buried oil and gas pipelines and the management and control of external corrosion risks, and ensure the safe and stable operation of buried oil and gas pipelines.
[0005] This invention provides a computer vision-based method for determining the type of external corrosion of steel pipes, including:
[0006] Acquire image data and external corrosion condition data of the pipeline to be identified;
[0007] Based on the image data of the external corrosion failure of the pipeline to be identified, a trained machine learning model is used to identify whether the external corrosion morphology of the pipeline to be identified is localized corrosion or general corrosion.
[0008] If it is localized corrosion, the corrosion type of the pipeline to be identified is determined based on the first set of specified parameters in the external corrosion condition data of the pipeline to be identified and the pre-built multimodal identification model. The first set of specified parameters includes at least one of AC current density, cathodic protection current density, self-corrosion potential, corrosion potential, cathodic protection setting status, power failure potential, overlap status, and insulation layer setting status.
[0009] If it is general corrosion, the corrosion type of the pipeline to be identified is determined based on the second set of specified parameters in the external corrosion condition data of the pipeline to be identified and the pre-built multimodal identification model. The second set of specified parameters includes at least one of the following: corrosion failure location, insulation layer setting, and cathodic protection setting.
[0010] In some optional embodiments, determining the corrosion type of the pipeline to be identified based on a pre-built multimodal identification model, according to a first set of specified parameters in the external corrosion condition data of the pipeline to be identified, includes:
[0011] If the pipeline to be identified meets at least one of the preset AC stray current corrosion indicators, then the corrosion type is determined to be AC stray current corrosion; the AC stray current corrosion indicators include at least one of AC current density index, power-off potential index and cathodic protection current density index.
[0012] If the pipeline to be identified does not meet any of the preset AC stray current corrosion indicators, but meets at least one preset DC stray current corrosion indicator, then the corrosion type is determined to be DC stray current corrosion; the DC stray current corrosion indicators include: cathodic protection setting status, corrosion potential index, self-corrosion potential, power-off potential index; pipeline corrosion potential fluctuation index, power-off potential fluctuation index;
[0013] If the pipeline to be identified does not meet any of the preset AC stray current corrosion indicators or any of the preset DC stray current corrosion indicators, and there is overlap, then the corrosion type is determined to be galvanic corrosion.
[0014] If the pipeline to be identified does not meet any of the preset AC stray current corrosion indicators, does not meet any of the preset DC stray current corrosion indicators, has no overlap, and has an insulation layer, then the corrosion type is determined to be corrosion under the insulation layer.
[0015] If the pipeline to be identified does not meet any of the preset AC stray current corrosion indicators, does not meet any of the preset DC stray current corrosion indicators, has no overlap, and has no insulation layer, then the corrosion type is determined to be natural soil corrosion.
[0016] In some optional embodiments, the AC stray current corrosion index includes:
[0017] The alternating current density is greater than a preset first current density threshold.
[0018] The alternating current density is less than a preset first current density threshold but greater than a preset second current density threshold, and the power-off potential is more positive than the first potential threshold or more negative than the second potential threshold.
[0019] The alternating current density is less than a preset first current density threshold but greater than a preset second current density threshold, and the power-off potential is more positive than the first potential threshold and the cathodic protection current density is greater than the cathodic protection current density threshold.
[0020] The DC stray current corrosion indicators include:
[0021] Cathodic protection was not applied and the corrosion potential was more positive than the self-corrosion potential plus the set value;
[0022] Cathodic protection was applied and the power-off potential was more positive than the third potential threshold.
[0023] The corrosion potential of the pipeline fluctuates periodically.
[0024] The power outage potential fluctuates periodically.
[0025] In some optional embodiments, determining the corrosion type of the pipeline to be identified based on a pre-built multimodal identification model, according to a second set of specified parameters in the external corrosion condition data of the pipeline to be identified, includes:
[0026] If the corrosion failure location in the external corrosion condition data of the pipeline to be identified is the repair joint location, then the corrosion type is determined to be repair joint corrosion.
[0027] If the corrosion failure location in the external corrosion condition data of the pipeline to be identified is not the repair location, and the insulation layer is present, then the corrosion type is determined to be corrosion under the insulation layer.
[0028] If the corrosion failure location in the external corrosion condition data of the pipeline to be identified is not the repair location, the insulation layer setting is that there is no insulation layer, and the cathodic protection setting is that cathodic protection is applied, then the corrosion type is determined to be corrosion caused by cathodic protection failure.
[0029] If the corrosion failure location in the external corrosion condition data of the pipeline to be identified is not the repair location, the insulation layer setting is that there is no insulation layer, and the cathodic protection setting is that no cathodic protection is applied, then the corrosion type is determined to be natural soil corrosion.
[0030] In some optional embodiments, the step of identifying the type of external corrosion morphology of the pipeline to be identified as localized corrosion or general corrosion using a trained machine learning model based on the image data of the external corrosion failure of the pipeline to be identified includes:
[0031] The image data of the external corrosion failure of the pipeline to be identified is input into the trained convolutional neural network model. The convolutional neural network model analyzes the image data of the external corrosion failure to obtain the external corrosion morphology feature data of the steel pipe. Based on the external corrosion morphology feature data, the external corrosion morphology type of the pipeline to be identified is local corrosion or general corrosion.
[0032] In some optional embodiments, the above method further includes:
[0033] Acquire sample data of pipeline external corrosion failure, the sample data including pipeline external corrosion failure image data and external corrosion morphology type labels;
[0034] The constructed machine learning model is trained using the pipeline external corrosion failure sample data to obtain a trained machine learning model; the machine learning model is an external corrosion morphology recognition model based on neural networks.
[0035] In some optional embodiments, the constructed machine learning model is trained using the pipeline external corrosion failure sample data to obtain a trained machine learning model, including:
[0036] The pipeline external corrosion failure sample data were divided into training set and test set;
[0037] The model is trained using a training set: the pipeline external corrosion failure image data from the training set are input into a pre-constructed neural network-based external corrosion morphology recognition model. Based on the external corrosion morphology type output by the model and the external corrosion morphology type label in the training set, the hyperparameters of the model are optimized to achieve the preset accuracy requirement, resulting in an optimized external corrosion morphology recognition model. The hyperparameters include at least one of the following: number of training iterations, batch size, loss function, optimization function, learning rate, momentum, and weight decay.
[0038] Model validation using the test set: Input the pipeline external corrosion failure image data from the training set into the optimized neural network-based external corrosion morphology recognition model. Based on the external corrosion morphology type output by the model and the external corrosion morphology type label in the training set, determine whether the model's accuracy meets the preset accuracy requirements. If not, return to continue the process of training the model using the training set. If yes, obtain the trained external corrosion morphology recognition model.
[0039] This invention provides a computer vision-based device for determining the type of external corrosion of steel pipes, comprising:
[0040] The data acquisition module is used to acquire image data of external corrosion failure of the pipeline to be identified and external corrosion condition data;
[0041] The first identification module is used to identify, based on the image data of the external corrosion failure of the pipeline to be identified, the type of external corrosion morphology of the pipeline to be identified as local corrosion or general corrosion using a trained machine learning model.
[0042] The second identification module is used to determine the corrosion type of the pipeline to be identified based on a pre-built multimodal identification model, according to the first set of specified parameters in the external corrosion condition data of the pipeline to be identified, if it is localized corrosion. The first set of specified parameters includes at least one of AC current density, cathodic protection current density, self-corrosion potential, corrosion potential, cathodic protection setting status, power failure potential, overlap status, and insulation layer setting status.
[0043] The third identification module is used to determine the corrosion type of the pipeline to be identified based on the second set of specified parameters in the external corrosion condition data of the pipeline to be identified, and on a pre-built multimodal identification model, if the corrosion is generalized. The second set of specified parameters includes at least one of the following: corrosion failure location, insulation layer setting, and cathodic protection setting.
[0044] In some optional embodiments, the above-described apparatus further includes:
[0045] The model training module is used to acquire pipeline external corrosion failure sample data, which includes pipeline external corrosion failure image data and external corrosion morphology type labels; the constructed machine learning model is trained using the pipeline external corrosion failure sample data to obtain the trained machine learning model; the machine learning model is an external corrosion morphology recognition model based on neural networks.
[0046] This invention provides a computer storage medium storing computer-executable instructions, which, when executed by a processor, implement the aforementioned computer vision-based method for determining the type of external corrosion of steel pipes.
[0047] This invention provides an identification device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the above-described method for determining the type of external corrosion of steel pipes based on computer vision.
[0048] The beneficial effects of the above-described technical solutions provided in the embodiments of the present invention include at least the following:
[0049] The computer vision-based method for determining the external corrosion type of steel pipes provided in this invention uses a trained machine learning model based on the image data of the external corrosion failure of the pipeline to be identified. First, it identifies whether the external corrosion morphology of the pipeline to be identified is localized or generalized corrosion. Then, different methods are used to further determine the specific corrosion type based on the external corrosion morphology. For pipelines with localized corrosion, the corrosion type is determined based on at least one of the following in the external corrosion condition data: AC current density, cathodic protection current density, self-corrosion potential, corrosion potential, cathodic protection setup, power failure potential, overlap, and insulation layer setup. This is based on a pre-built multimodal recognition model. For pipelines with generalized corrosion, the corrosion type can be determined based on at least one of the following in the external corrosion condition data: corrosion failure location, insulation layer setup, and cathodic protection setup. This allows for rapid and accurate identification of the pipeline corrosion type, improving the accuracy and effectiveness of corrosion type identification. This supports the development of targeted measures for external corrosion of buried oil and gas pipelines and the management of external corrosion risks, ensuring the safe and stable operation of buried oil and gas pipelines.
[0050] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings.
[0051] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0052] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0053] Figure 1 This is a flowchart of the method for determining the external corrosion type of steel pipe based on computer vision in Embodiment 1 of the present invention;
[0054] Figure 2 This is a schematic diagram illustrating the principle of the method for determining the external corrosion type of steel pipe in Embodiment 1 of the present invention.
[0055] Figure 3 This is a flowchart of the training process of the neural network-based external corrosion morphology recognition model in Embodiment 2 of the present invention;
[0056] Figure 4 This is an example diagram showing the recognition accuracy of the external corrosion morphology recognition model in Embodiment 2 of the present invention;
[0057] Figure 5 This is a flowchart of the method for determining the external corrosion type of steel pipe based on computer vision in Embodiment 2 of the present invention;
[0058] Figure 6 This is an example image of external corrosion failure of a pipeline in Embodiment 2 of the present invention;
[0059] Figure 7 This is a schematic diagram of the structure of the computer vision-based steel pipe external corrosion type determination device in an embodiment of the present invention. Detailed Implementation
[0060] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0061] For a buried steel pipeline transporting natural gas (hereinafter referred to as the steel pipe), which has been in service for more than ten years, and has experienced external corrosion perforation and leakage, it is necessary to determine the cause of its external corrosion failure. Based on past failure analysis experience, it is necessary to cut sections of the pipe and send them to a third-party laboratory for relevant experiments and tests. This not only affects oil and gas production but also requires significant investment and takes more than a month. To complete the failure analysis work more economically and efficiently, and to address the problems of inaccurate and effective identification of the external corrosion type of buried steel pipes in existing technologies, such as low efficiency, long time consumption, large workload, high cost, and poor accuracy, this invention provides a computer vision-based method for determining the external corrosion type of steel pipes. Based on external corrosion failure images and external corrosion condition data, a machine learning model is used to first identify whether the external corrosion morphology of the pipeline is localized or generalized corrosion. Then, for different external corrosion morphology types, different operating condition data are used, applicable to a pre-constructed multimodal recognition model, to further identify the external corrosion type, thereby enabling simple, fast, and accurate determination of the pipeline's external corrosion type (or external corrosion failure type).
[0062] Example 1
[0063] Embodiment 1 of the present invention provides a method for determining the type of external corrosion of steel pipes based on computer vision, the process of which is as follows: Figure 1 As shown, its principle block diagram can be found in [reference needed]. Figure 2 As shown, it includes the following steps:
[0064] Step S101: Obtain image data of external corrosion failure of the pipeline to be identified and data of external corrosion conditions.
[0065] Image data of external corrosion failure in pipelines can be acquired using pre-installed image acquisition equipment, while operational data acquisition equipment or instruments can be used to collect data on the external corrosion conditions of the pipeline. This data may include at least one of the following: AC current density, cathodic protection current density, self-corrosion potential, corrosion potential, cathodic protection setup status, power-off potential, overlap status, insulation layer setup, and location of corrosion failure. Power-off potential is typically acquired under cathodic protection conditions, at which point the cathodic protection current density can also be collected.
[0066] Step S102: Based on the image data of the external corrosion failure of the pipeline to be identified, use the trained machine learning model to identify whether the external corrosion morphology of the pipeline to be identified is localized corrosion or general corrosion. If it is localized corrosion, proceed to step S103; if it is general corrosion, proceed to step S104.
[0067] In this step, the machine learning model, for example but not limited to a convolutional neural network model, can be pre-trained using pipeline external corrosion failure sample data to obtain a trained neural network model for identifying the external corrosion morphology type of the pipeline.
[0068] When identification is required, the image data of the external corrosion failure of the pipeline to be identified is input into a trained convolutional neural network model. The convolutional neural network model analyzes the external corrosion failure image data to obtain the external corrosion morphology feature data of the steel pipe. Based on the external corrosion morphology feature data, the model identifies whether the external corrosion morphology of the pipeline is localized or generalized, so as to further accurately identify the corrosion type of the pipeline based on different external corrosion morphology types. See also Figure 2 As shown, the identified external corrosion morphology types and the acquired pipeline external corrosion condition data are input together into the multimodal model for corrosion type identification.
[0069] Step S103: Based on the first set of specified parameters in the external corrosion condition data of the pipeline to be identified, determine the corrosion type of the pipeline to be identified based on the pre-built multimodal identification model; the first set of specified parameters includes at least one of AC current density, cathodic protection current density, self-corrosion potential, corrosion potential, cathodic protection setting status, power failure potential, overlap status, and insulation layer setting status.
[0070] For pipelines experiencing localized corrosion, possible corrosion types include AC stray current corrosion, DC stray current corrosion, galvanic corrosion, corrosion under insulation, and natural soil corrosion. The corrosion type can be determined based on a pre-built multimodal identification model, using data on the pipeline's external corrosion conditions, such as AC current density, cathodic protection current density, self-corrosion potential, corrosion potential, cathodic protection setup, power failure potential, overlap, and insulation layer configuration. Specific indicators for each parameter can be set according to the pipeline's actual conditions. The corrosion type is determined by whether the collected external corrosion data meets these indicator conditions. The order of determination for different indicators can be specifically set and adjusted within the multimodal identification model.
[0071] In some alternative embodiments, for pipes with localized corrosion, determining the type of corrosion of the pipe to be identified may include:
[0072] If the pipeline to be identified meets at least one of the preset AC stray current corrosion indicators, then the corrosion type is determined to be AC stray current corrosion; the AC stray current corrosion indicators include at least one of AC current density index, power-off potential index and cathodic protection current density index.
[0073] If the pipeline to be identified does not meet any of the preset AC stray current corrosion indicators, but meets at least one preset DC stray current corrosion indicator, then the corrosion type is determined to be DC stray current corrosion; the DC stray current corrosion indicators include: cathodic protection setting status, corrosion potential index, self-corrosion potential, power-off potential index; pipeline corrosion potential fluctuation index, power-off potential fluctuation index;
[0074] If the pipeline to be identified does not meet any of the preset AC stray current corrosion indicators or any of the preset DC stray current corrosion indicators, and there is overlap, then the corrosion type is determined to be galvanic corrosion.
[0075] If the pipeline to be identified does not meet any of the preset AC stray current corrosion indicators, does not meet any of the preset DC stray current corrosion indicators, has no overlap, and has an insulation layer, then the corrosion type is determined to be corrosion under the insulation layer.
[0076] If the pipeline to be identified does not meet any of the preset AC stray current corrosion indicators, does not meet any of the preset DC stray current corrosion indicators, has no overlap, and has no insulation layer, then the corrosion type is determined to be natural soil corrosion.
[0077] Among them, the AC stray current corrosion index includes: 1) AC current density is greater than the preset first current density threshold; 2) AC current density is less than the preset first current density threshold but greater than the preset second current density threshold, and the de-energization potential is more positive than the first potential threshold or more negative than the second potential threshold; 3) AC current density is less than the preset first current density threshold but greater than the preset second current density threshold, and the de-energization potential is more positive than the first potential threshold and the cathodic protection current density is greater than the cathodic protection current density threshold.
[0078] The phrase "the power-off potential is more positive than the first potential threshold" means that the power-off potential is greater than the first potential threshold, for example, if the first potential threshold is -0.9V. CSE A power-off potential of -0.5V or 0.5V is considered more positive than the first potential threshold. "A power-off potential more negative than the second potential threshold" means the power-off potential is less than the second potential threshold; for example, if the first potential threshold is -1.15V. CSE The power-off potential is -1.2V, which is considered to be more negative than the first potential threshold. The meanings of "corrected" and "more negative" in the subsequent description of this application will follow the same principle.
[0079] The indicators of DC stray current corrosion include: 1) No cathodic protection is applied and the corrosion potential is more positive than the self-corrosion potential + set value; 2) Cathodic protection is applied and the de-energization potential is more positive than the third potential threshold; 3) The pipeline corrosion potential fluctuates periodically; 4) The de-energization potential fluctuates periodically.
[0080] Step S104: Based on the second set of specified parameters in the external corrosion condition data of the pipeline to be identified, determine the corrosion type of the pipeline to be identified based on the pre-built multimodal identification model; the second set of specified parameters includes at least one of corrosion failure location, insulation layer setting, and cathodic protection setting.
[0081] For pipelines with general corrosion, possible corrosion types include joint corrosion, corrosion under the insulation layer, corrosion caused by cathodic protection failure, and natural soil corrosion. The corrosion type can be determined based on the location of corrosion failure, insulation layer configuration, and cathodic protection configuration in the external corrosion data of the pipeline to be identified, using a pre-built multimodal identification model. Specific indicators for each specified parameter can be set according to the actual situation of the pipeline. The corrosion type is determined by whether the actual collected external corrosion data of the pipeline meets the indicator conditions. The order of determination for different indicators can be specifically set and adjusted in the multimodal identification model.
[0082] In some alternative embodiments, for pipes with general corrosion, determining the type of corrosion of the pipe to be identified may include:
[0083] If the corrosion failure location in the external corrosion condition data of the pipeline to be identified is the repair joint location, then the corrosion type is determined to be repair joint corrosion.
[0084] If the corrosion failure location in the external corrosion condition data of the pipeline to be identified is not the repair location, and the insulation layer is present, then the corrosion type is determined to be corrosion under the insulation layer.
[0085] If the corrosion failure location in the external corrosion condition data of the pipeline to be identified is not the repair location, the insulation layer setting is that there is no insulation layer, and the cathodic protection setting is that cathodic protection is applied, then the corrosion type is determined to be corrosion caused by cathodic protection failure.
[0086] If the corrosion failure location in the external corrosion condition data of the pipeline to be identified is not the repair location, the insulation layer setting is that there is no insulation layer, and the cathodic protection setting is that no cathodic protection is applied, then the corrosion type is determined to be natural soil corrosion.
[0087] The above steps S103 and S104 combine the identification results of step S102 and the pipeline external corrosion condition data collected in step S101 to identify the type of pipeline external corrosion using a multimodal model.
[0088] In some optional embodiments, the above method further includes a pre-trained machine learning model. The training process includes: acquiring pipeline external corrosion failure sample data, the sample data including pipeline external corrosion failure image data and external corrosion morphology type labels; using the pipeline external corrosion failure sample data to train the pre-trained machine learning model to obtain the trained machine learning model; the machine learning model is an external corrosion morphology recognition model based on a neural network.
[0089] When training a model using sample data, one possible training method includes:
[0090] The pipeline external corrosion failure sample data were divided into training set and test set;
[0091] The model is trained using a training set: the pipeline external corrosion failure image data from the training set are input into a pre-constructed neural network-based external corrosion morphology recognition model. Based on the external corrosion morphology type output by the model and the external corrosion morphology type label in the training set, the hyperparameters of the model are optimized to achieve the preset accuracy requirement, resulting in an optimized external corrosion morphology recognition model. The hyperparameters include at least one of the following: number of training iterations, batch size, loss function, optimization function, learning rate, momentum, and weight decay.
[0092] Model validation using the test set: Input the pipeline external corrosion failure image data from the training set into the optimized neural network-based external corrosion morphology recognition model. Based on the external corrosion morphology type output by the model and the external corrosion morphology type label in the training set, determine whether the model's accuracy meets the preset accuracy requirements. If not, return to continue the process of training the model using the training set. If yes, obtain the trained external corrosion morphology recognition model.
[0093] The computer vision-based method for determining the external corrosion type of steel pipes provided in this invention uses a trained machine learning model based on the image data of the external corrosion failure of the pipeline to be identified. First, it identifies whether the external corrosion morphology of the pipeline to be identified is localized or generalized corrosion. Then, different methods are used to further determine the specific corrosion type based on the external corrosion morphology. For pipelines with localized corrosion, the corrosion type is determined based on at least one of the following in the external corrosion condition data: AC current density, cathodic protection current density, self-corrosion potential, corrosion potential, cathodic protection setup, power failure potential, overlap, and insulation layer setup. This is based on a pre-built multimodal recognition model. For pipelines with generalized corrosion, the corrosion type can be determined based on at least one of the following in the external corrosion condition data: corrosion failure location, insulation layer setup, and cathodic protection setup. This allows for rapid and accurate identification of the pipeline corrosion type, improving the accuracy and effectiveness of corrosion type identification. This supports the development of targeted measures for external corrosion of buried oil and gas pipelines and the management of external corrosion risks, ensuring the safe and stable operation of buried oil and gas pipelines.
[0094] Example 2
[0095] Embodiment 2 of the present invention provides a method for determining the external corrosion type of steel pipe based on computer vision. The method includes a training process of an external corrosion morphology recognition model based on a neural network, and a process of identifying the external corrosion type using the trained external corrosion morphology recognition model and a multimodal model.
[0096] See Figure 3 The training process of the neural network-based external corrosion morphology recognition model is shown below. Taking a convolutional neural network as an example, the training process includes the following steps:
[0097] Step S201: Obtain sample data of external corrosion failure of pipelines.
[0098] Collect cases of pipeline external corrosion failure, such as 500 or more, including images of the failures and their corresponding corrosion morphology types. The corrosion morphology type should be clearly identified as either general or localized corrosion, thus forming sample data that includes pipeline external corrosion failure image data and corrosion morphology type labels.
[0099] Step S202: Divide the pipeline external corrosion failure sample data into training set and test set.
[0100] The pipeline external corrosion failure sample data can be divided into training and test sets according to a certain ratio. For example, the collected external corrosion failure cases can be divided into training and test sets in a 4:1 ratio, that is, the training set accounts for 80% and the test set accounts for 20%. The input of both the training and test sets is an image of external corrosion failure, and the label is the external corrosion morphology type.
[0101] Step S203: Train a neural network-based external corrosion morphology recognition model using the training set.
[0102] Before training the model, you can first select a neural network model and initially set its hyperparameters. For example, you can choose the InceptionV3 convolutional neural network model and set its hyperparameters, including the number of training epochs, batch size, loss function, optimizer, learning rate, momentum, and weight decay. For example, the initial model hyperparameter settings can be shown in Table 1 below.
[0103] Table 1
[0104]
[0105]
[0106] The selected InceptionV3 model is optimized using the training set. Specifically, the pipeline external corrosion failure image data from the training set can be input into a pre-built neural network-based external corrosion morphology recognition model. The external corrosion morphology recognition model analyzes and processes the image data and outputs the corresponding external corrosion morphology type. The external corrosion morphology type output by the model is compared with the external corrosion morphology type labels in the training set. Based on the comparison result, it is determined whether the model meets the training requirements. If it does not meet the training requirements, the model's hyperparameters are optimized, and the model is trained again using the training set until the model meets the training requirements, resulting in an optimized external corrosion morphology recognition model. The training requirements of the model include, but are not limited to, achieving a preset accuracy requirement. For example, if the accuracy requirement is set to 85%, the model's hyperparameters are adjusted to achieve an accuracy exceeding 85%, and the optimized model hyperparameters are retained to obtain the optimized InceptionV3 model.
[0107] Using the example above, we optimized the model using 80% of the 400 external corrosion failure cases. After 100 optimizations, the accuracy reached up to 98%. We retained the optimized model hyperparameters, which are shown in Table 2 below, and obtained the optimized InceptionV3 model.
[0108] Table 2
[0109] Hyperparameters Hyperparameter metrics Number of training sessions (Epochs) 100 Batch size (Batch_size) 35 Loss Function CrossEntropyLoss Optimizer SGD Learning rate 0.00111111125 Momentum 0.95 Weight decay 0.0005
[0110] Step S204: Validate the optimized external corrosion morphology recognition model using a test set.
[0111] Input the pipeline external corrosion failure image data from the training set into the optimized neural network-based external corrosion morphology recognition model. Based on the external corrosion morphology type output by the model and the external corrosion morphology type label in the training set, determine whether the model's accuracy meets the preset accuracy requirement. If not, return to continue the process of training the model using the training set. If yes, obtain the trained external corrosion morphology recognition model.
[0112] The optimized InceptionV3 model is validated using a test set. For example, the accuracy requirement is set to 85%. If the accuracy exceeds 85%, the external erosion morphology recognition model based on convolutional neural network can be obtained. Otherwise, steps S203 and S204 are repeated to make the model accuracy exceed 85%.
[0113] Using the example above, the model was validated using 20% of 100 external corrosion failure cases, achieving an accuracy of 93%. See [link to relevant documentation]. Figure 4 The InceptionV3 model accuracy is shown below, with the horizontal axis representing the number of training iterations and the vertical axis representing the accuracy. The red line represents the accuracy on the training set, and the blue line represents the accuracy on the test set. Both meet the requirements, resulting in a well-trained InceptionV3 model.
[0114] The process of identifying external corrosion types using a trained external corrosion morphology recognition model and a multimodal model is described in [reference needed]. Figure 5 As shown, it includes the following steps:
[0115] Step S301: Obtain image data of external corrosion failure of the pipeline to be identified and external corrosion condition data.
[0116] Images of external corrosion failures and data on external corrosion conditions of pipelines can be collected in advance. An example of an image of an external corrosion failure pipeline can be found here. Figure 6 As shown, the collected external corrosion condition data could be, for example, an AC current density of 16 A / m. 2The self-corrosion potential is -0.56V (relative to copper sulfate reference CSE). No cathodic protection was applied, there was no overlap, the pipeline was insulated, and the failure location was not at the joint.
[0117] Step S302: Input the image data of the external corrosion failure of the pipeline to be identified into the trained external corrosion morphology recognition model to identify whether the external corrosion morphology of the pipeline to be identified is localized corrosion or general corrosion. If it is localized corrosion, proceed to step S303; if it is general corrosion, proceed to step S312.
[0118] Step S303: Determine whether the pipeline to be identified meets the AC stray current corrosion index. If yes, proceed to step S304; otherwise, proceed to step S305.
[0119] For pipelines identified as having localized corrosion, first determine whether they meet the AC stray current corrosion index. If any AC stray current corrosion index is met, then the external corrosion type of the pipeline is considered to be AC stray current corrosion.
[0120] Determine whether the AC stray current corrosion index is met, for example, but not limited to, the following indicators:
[0121] 1) Whether the AC current density is greater than the preset first current density threshold.
[0122] The first current density threshold can be set to, for example, 100 A / m. 2 .
[0123] 2) Whether the AC current density is within the preset range and whether the power-off potential is small or large enough.
[0124] Specifically, the AC current density is determined by whether it is less than a preset first current density threshold but greater than a preset second current density threshold, and whether the power-off potential is more positive than the first threshold or more negative than the second threshold. The first current density threshold can be set to, for example, 100 A / m. 2 The second current density threshold can be set to, for example, 30 A / m. 2 The first potential threshold can be set to, for example, -0.9V. CSE The second potential threshold can be set to, for example, -1.15V. CSE .
[0125] 3) Whether the AC current density is within the preset range, and whether the power-off potential is small enough and the cathodic protection current density is large enough.
[0126] This involves determining whether the AC current density is less than a preset first current density threshold but greater than a preset second current density threshold, and whether the power-off potential is more positive than the first potential threshold and the cathodic protection current density is greater than the cathodic protection current density threshold. The first current density threshold can be set, for example, to 100 A / m. 2The second current density threshold can be set to, for example, 30 A / m. 2 The first potential threshold can be set to, for example, -0.9V. CSE The cathode protection current density threshold can be set to, for example, 1 A / m. 2 .
[0127] If any one of these criteria is met, the external corrosion of the pipeline can be considered as AC stray current corrosion. For example: if the AC current density J in the pipeline... ac >100A / m 2 Or, the AC current density in the pipe, J ac Meets 30A / m 2 <J ac <100A / m 2 And the power-off potential E IR-Free >-0.9V CSE Or, the AC current density J in the pipeline. ac Meets 30A / m 2 <J ac <100A / m 2 And E IR-Free <-1.15V CSE Or, the AC current density in the pipe, J ac Meets 30A / m 2 <J ac <100A / m 2 And the cathodic protection current density J dc >1A / m 2 And E IR-Free >-0.9V CSE In these cases, it can be identified as AC stray current corrosion.
[0128] Step S304: Determine that the corrosion type of the pipeline to be identified is AC stray current corrosion.
[0129] Step S305: Determine whether the pipeline to be identified meets the DC stray current corrosion index. If yes, proceed to step S306; otherwise, proceed to step S307.
[0130] For pipelines that do not meet the AC stray current corrosion index, it is further determined whether they meet the DC stray current corrosion index. If any DC stray current corrosion index is met, the external corrosion type of the pipeline is considered to be DC stray current corrosion. Threshold values for various indices can be set according to the actual conditions of the pipeline.
[0131] Determine whether the DC stray current corrosion index is met, for example, but not limited to, the following indicators:
[0132] 1) Whether cathodic protection was not applied and whether the corrosion potential is more positive than the self-corrosion potential plus the set value; for example, the set value could be 0.02V, i.e., the corrosion potential E corr >Self-corrosion potential E self-corr Is +0.02V valid?
[0133] 2) Whether cathodic protection has been applied and whether the power-off potential is more positive than the third potential threshold. The third potential threshold can be set, for example, to -0.85V. CSE .
[0134] 3) Does the pipeline corrosion potential exhibit significant periodic fluctuations? The criteria for determining significant periodic fluctuations can be set as needed, such as the magnitude of the fluctuations or the frequency of occurrences.
[0135] 4) Whether the power outage potential has experienced significant periodic fluctuations.
[0136] If any one of these criteria is met, the external corrosion of the pipeline can be considered as DC stray current corrosion. For example: the pipeline is not cathodically protected and the corrosion potential E corr >Self-corrosion potential E self-corr +0.02V; or, the pipeline is cathodic protected and the de-energized potential E is [value missing]. IR-Free >-0.85V CSE If the corrosion potential of the pipeline exhibits significant periodic fluctuations, or if the de-energization potential exhibits significant periodic fluctuations, it is identified as DC stray current corrosion.
[0137] Step S306: Determine that the corrosion type of the pipeline to be identified is DC stray current corrosion.
[0138] Step S307: Determine if the pipe to be identified has any overlap. If yes, proceed to step S308; otherwise, proceed to step S309.
[0139] For pipelines that do not meet either the AC stray current corrosion index or the DC stray current corrosion index, further investigation is needed to determine whether there are any overlaps. Pipelines with overlaps are identified as having galvanic corrosion.
[0140] Step S308: Determine that the corrosion type of the pipeline to be identified is galvanic corrosion.
[0141] Step S309: Determine whether the pipe to be identified has an insulation layer. If yes, proceed to step S310; otherwise, proceed to step S311.
[0142] For pipelines that do not meet the AC stray current corrosion index, do not meet the DC stray current corrosion index, and do not have overlapping sections, further determine whether an insulation layer is installed. For pipelines with insulation layers, identify them as corrosion under the insulation layer; for pipelines without insulation layers, identify them as natural soil corrosion.
[0143] Step S310: Determine that the corrosion type of the pipeline to be identified is corrosion under the insulation layer.
[0144] Step S311: Determine that the corrosion type of the pipeline to be identified is natural soil corrosion.
[0145] Step S312: Determine whether the corrosion failure location of the pipeline to be identified occurs at the repair joint. If yes, proceed to step S313; otherwise, proceed to step S314.
[0146] For pipelines identified as having general corrosion, first determine whether the external corrosion failure occurs at the repair joint. If the external corrosion failure occurs at the repair joint, then it is identified as repair joint corrosion.
[0147] Step S313: Determine that the corrosion type of the pipeline to be identified is joint corrosion.
[0148] Step S314: Determine whether the pipe to be identified has an insulation layer. If yes, proceed to step S315; otherwise, proceed to step S316.
[0149] To determine whether external corrosion failure occurs at the repair site, further investigation is needed to determine whether an insulation layer is installed. For pipelines with insulation layers, the corrosion is identified as corrosion under the insulation layer.
[0150] Step S315: Determine that the corrosion type of the pipeline to be identified is corrosion under the insulation layer.
[0151] Step S316: Determine whether cathodic protection has been applied to the pipeline to be identified. If yes, proceed to step S317; otherwise, proceed to step S318.
[0152] For pipelines where external corrosion failure occurs at the joint and where no insulation layer is installed, further determine whether cathodic protection has been applied. For pipelines with cathodic protection, the corrosion is identified as caused by cathodic protection failure; for pipelines without cathodic protection, the corrosion is identified as natural soil corrosion.
[0153] Step S317: Determine that the corrosion type of the pipeline to be identified is corrosion caused by cathodic protection failure.
[0154] Step S318: Determine that the corrosion type of the pipeline to be identified is natural soil corrosion.
[0155] Based on the same inventive concept, embodiments of the present invention also provide a computer vision-based device for determining the type of external corrosion of steel pipes, such as... Figure 7 As shown, it includes:
[0156] Data acquisition module 11 is used to acquire image data of external corrosion failure of the pipeline to be identified and external corrosion condition data;
[0157] The first identification module 12 is used to identify, based on the image data of the external corrosion failure of the pipeline to be identified, the type of external corrosion morphology of the pipeline to be identified as local corrosion or general corrosion using a trained machine learning model.
[0158] The second identification module 13 is used to determine the corrosion type of the pipeline to be identified based on a pre-built multimodal identification model, according to the first set of specified parameters in the external corrosion condition data of the pipeline to be identified, if it is localized corrosion. The first set of specified parameters includes at least one of AC current density, cathodic protection current density, self-corrosion potential, corrosion potential, cathodic protection setting status, power failure potential, overlap status, and insulation layer setting status.
[0159] The third identification module 14 is used to determine the corrosion type of the pipeline to be identified based on the second set of specified parameters in the external corrosion condition data of the pipeline to be identified, and on a pre-built multimodal identification model, if the corrosion is generalized. The second set of specified parameters includes at least one of the following: corrosion failure location, insulation layer setting, and cathodic protection setting.
[0160] Optionally, the above-mentioned computer vision-based device for determining the type of external corrosion of steel pipes further includes:
[0161] The model training module 15 is used to acquire pipeline external corrosion failure sample data, which includes pipeline external corrosion failure image data and external corrosion morphology type labels; the constructed machine learning model is trained using the pipeline external corrosion failure sample data to obtain the trained machine learning model; the machine learning model is an external corrosion morphology recognition model based on neural networks.
[0162] This invention also provides a computer storage medium storing computer-executable instructions, which, when executed by a processor, implement the aforementioned computer vision-based method for determining the type of external corrosion of steel pipes.
[0163] This invention also provides an identification device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the above-described method for determining the type of external corrosion of steel pipes based on computer vision.
[0164] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0165] The method and apparatus described in this invention are based on computer vision recognition to determine the type of external corrosion failure of buried steel pipelines. The required parameters are easy to obtain, the investment is small, the recognition efficiency is high, the recognition is fast, and the recognition accuracy is high. It effectively solves the problems of low recognition efficiency, large workload, high cost and poor accuracy of external corrosion type recognition of buried steel pipelines, and provides strong support for risk management of external corrosion of buried steel pipelines.
[0166] Unless otherwise specifically stated, terms such as processing, calculation, operation, determination, display, etc., may refer to the actions and / or processes of one or more processing or computing systems or similar devices that represent the manipulation and conversion of data representing physical (e.g., electronic) quantities within the registers or memory of the processing system into other data similarly representing physical quantities within the memory, registers, or other such information storage, transmission, or display devices of the processing system. Information and signals can be represented using any of a variety of different techniques and methods. For example, data, instructions, commands, information, signals, bits, symbols, and chips mentioned throughout the above description can be represented by voltage, current, electromagnetic waves, magnetic fields or particles, light fields or particles, or any combination thereof.
[0167] It should be understood that the specific order or hierarchy of steps in the disclosed process is an example of an exemplary method. Based on design preferences, it should be understood that the specific order or hierarchy of steps in the process may be rearranged without departing from the scope of this disclosure. The appended method claims provide elements of various steps in an exemplary order and are not intended to limit the scope to the specific order or hierarchy described.
[0168] In the detailed description above, various features are combined together in a single embodiment to simplify this disclosure. This approach to disclosure should not be construed as reflecting an intention that embodiments of the claimed subject matter require more features than are explicitly stated in each claim. Rather, as reflected in the appended claims, the invention is presented with fewer features than all of the features in a single disclosed embodiment. Therefore, the appended claims are hereby explicitly incorporated into the detailed description, with each claim representing a separate preferred embodiment of the invention.
[0169] Those skilled in the art will also understand that the various illustrative logic blocks, modules, circuits, and algorithm steps described in conjunction with the embodiments herein can be implemented as electronic hardware, computer software, or a combination thereof. To clearly illustrate the interchangeability between hardware and software, the various illustrative components, blocks, modules, circuits, and steps described above are generally described in terms of their functionality. Whether such functionality is implemented as hardware or software depends on the specific application and the design constraints imposed on the overall system. Those skilled in the art can implement the described functionality in alternative ways for each specific application; however, such implementation decisions should not be construed as departing from the scope of this disclosure.
[0170] The steps of the methods or algorithms described in conjunction with the embodiments herein can be directly embodied in hardware, software modules executed by a processor, or a combination thereof. The software modules can reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disks, removable disks, CD-ROMs, or any other form of storage medium well known in the art. An exemplary storage medium is connected to the processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and storage medium can reside in an ASIC. The ASIC can reside in a user terminal. Alternatively, the processor and storage medium can exist as discrete components in the user terminal.
[0171] For software implementation, the techniques described in this application can be implemented using modules (e.g., procedures, functions, etc.) that perform the functions described in this application. This software code can be stored in memory units and executed by a processor. The memory units can be implemented within the processor or outside the processor; in the latter case, they are communicatively coupled to the processor via various means, as is well known in the art.
[0172] The foregoing description includes examples of one or more embodiments. It is certainly impossible to describe all possible combinations of components or methods in order to describe the above embodiments, but those skilled in the art will recognize that further combinations and arrangements of the various embodiments are possible. Therefore, the embodiments described herein are intended to cover all such changes, modifications, and variations that fall within the scope of the appended claims. Furthermore, the term "comprising" as used in the specification or claims is interpreted in a manner similar to the term "including," as interpreted when used as a conjunction in the claims. Additionally, the use of any term "or" in the specification of the claims is intended to mean "non-exclusive or."
Claims
1. A method for determining the type of external corrosion of steel pipes based on computer vision, characterized in that, include: Acquire image data and external corrosion condition data of the pipeline to be identified; Based on the image data of the external corrosion failure of the pipeline to be identified, a trained machine learning model is used to identify whether the external corrosion morphology of the pipeline to be identified is localized corrosion or general corrosion. If it is localized corrosion, the corrosion type of the pipeline to be identified is determined based on the first set of specified parameters in the external corrosion condition data of the pipeline to be identified and the pre-built multimodal identification model. The first set of specified parameters includes at least one of AC current density, cathodic protection current density, self-corrosion potential, corrosion potential, cathodic protection setting status, power failure potential, overlap status, and insulation layer setting status. If it is general corrosion, the corrosion type of the pipeline to be identified is determined based on the second set of specified parameters in the external corrosion condition data of the pipeline to be identified and the pre-built multimodal identification model. The second set of specified parameters includes at least one of the following: corrosion failure location, insulation layer setting, and cathodic protection setting.
2. The method as described in claim 1, characterized in that, The step of determining the corrosion type of the pipeline to be identified based on the first set of specified parameters in the external corrosion condition data of the pipeline to be identified, and based on a pre-built multimodal identification model, includes: If the pipeline to be identified meets at least one of the preset AC stray current corrosion indicators, then the corrosion type is determined to be AC stray current corrosion; the AC stray current corrosion indicators include at least one of AC current density index, power-off potential index and cathodic protection current density index. If the pipeline to be identified does not meet any of the preset AC stray current corrosion indicators, but meets at least one preset DC stray current corrosion indicator, then the corrosion type is determined to be DC stray current corrosion; the DC stray current corrosion indicators include: cathodic protection setting status, corrosion potential index, self-corrosion potential, power-off potential index; pipeline corrosion potential fluctuation index, power-off potential fluctuation index; If the pipeline to be identified does not meet any of the preset AC stray current corrosion indicators or any of the preset DC stray current corrosion indicators, and there is overlap, then the corrosion type is determined to be galvanic corrosion. If the pipeline to be identified does not meet any of the preset AC stray current corrosion indicators, does not meet any of the preset DC stray current corrosion indicators, has no overlap, and has an insulation layer, then the corrosion type is determined to be corrosion under the insulation layer. If the pipeline to be identified does not meet any of the preset AC stray current corrosion indicators, does not meet any of the preset DC stray current corrosion indicators, has no overlap, and has no insulation layer, then the corrosion type is determined to be natural soil corrosion.
3. The method as described in claim 2, characterized in that, The AC stray current corrosion indicators include: The alternating current density is greater than a preset first current density threshold. The alternating current density is less than a preset first current density threshold but greater than a preset second current density threshold, and the power-off potential is more positive than the first potential threshold or more negative than the second potential threshold. The alternating current density is less than a preset first current density threshold but greater than a preset second current density threshold, and the power-off potential is more positive than the first potential threshold and the cathodic protection current density is greater than the cathodic protection current density threshold. The DC stray current corrosion indicators include: Cathodic protection was not applied and the corrosion potential was more positive than the self-corrosion potential plus the set value; Cathodic protection was applied and the power-off potential was more positive than the third potential threshold. The corrosion potential of the pipeline fluctuates periodically. The power outage potential fluctuates periodically.
4. The method as described in claim 1, characterized in that, The step of determining the corrosion type of the pipeline to be identified based on the second set of specified parameters in the external corrosion condition data of the pipeline to be identified, and based on a pre-built multimodal identification model, includes: If the corrosion failure location in the external corrosion condition data of the pipeline to be identified is the repair joint location, then the corrosion type is determined to be repair joint corrosion. If the corrosion failure location in the external corrosion condition data of the pipeline to be identified is not the repair location, and the insulation layer is present, then the corrosion type is determined to be corrosion under the insulation layer. If the corrosion failure location in the external corrosion condition data of the pipeline to be identified is not the repair location, the insulation layer setting is that there is no insulation layer, and the cathodic protection setting is that cathodic protection is applied, then the corrosion type is determined to be corrosion caused by cathodic protection failure. If the corrosion failure location in the external corrosion condition data of the pipeline to be identified is not the repair location, the insulation layer setting is that there is no insulation layer, and the cathodic protection setting is that no cathodic protection is applied, then the corrosion type is determined to be natural soil corrosion.
5. The method as described in claim 1, characterized in that, The process of identifying the type of external corrosion morphology of the pipeline to be identified as localized or generalized corrosion using a trained machine learning model, based on the image data of the external corrosion failure of the pipeline to be identified, includes: The image data of the external corrosion failure of the pipeline to be identified is input into the trained convolutional neural network model. The convolutional neural network model analyzes the image data of the external corrosion failure to obtain the external corrosion morphology feature data of the steel pipe. Based on the external corrosion morphology feature data, the external corrosion morphology type of the pipeline to be identified is local corrosion or general corrosion.
6. The method as described in claim 5, characterized in that, Also includes: Acquire sample data of pipeline external corrosion failure, the sample data including pipeline external corrosion failure image data and external corrosion morphology type labels; The constructed machine learning model is trained using the pipeline external corrosion failure sample data to obtain a trained machine learning model; the machine learning model is an external corrosion morphology recognition model based on neural networks.
7. The method as described in claim 6, characterized in that, The constructed machine learning model is trained using the aforementioned pipeline external corrosion failure sample data to obtain a trained machine learning model, including: The pipeline external corrosion failure sample data were divided into training set and test set; The model is trained using a training set: the pipeline external corrosion failure image data from the training set are input into a pre-constructed neural network-based external corrosion morphology recognition model. Based on the external corrosion morphology type output by the model and the external corrosion morphology type label in the training set, the hyperparameters of the model are optimized to achieve the preset accuracy requirement, resulting in an optimized external corrosion morphology recognition model. The hyperparameters include at least one of the following: number of training iterations, batch size, loss function, optimization function, learning rate, momentum, and weight decay. Model validation using the test set: Input the pipeline external corrosion failure image data from the training set into the optimized neural network-based external corrosion morphology recognition model. Based on the external corrosion morphology type output by the model and the external corrosion morphology type label in the training set, determine whether the model's accuracy meets the preset accuracy requirements. If not, return to continue the process of training the model using the training set. If yes, obtain the trained external corrosion morphology recognition model.
8. A device for determining the type of external corrosion of steel pipes based on computer vision, characterized in that, include: The data acquisition module is used to acquire image data of external corrosion failure of the pipeline to be identified and external corrosion condition data; The first identification module is used to identify, based on the image data of the external corrosion failure of the pipeline to be identified, the type of external corrosion morphology of the pipeline to be identified as local corrosion or general corrosion using a trained machine learning model. The second identification module is used to determine the corrosion type of the pipeline to be identified based on a pre-built multimodal identification model, according to the first set of specified parameters in the external corrosion condition data of the pipeline to be identified, if it is localized corrosion. The first set of specified parameters includes at least one of AC current density, cathodic protection current density, self-corrosion potential, corrosion potential, cathodic protection setting status, power failure potential, overlap status, and insulation layer setting status. The third identification module is used to determine the corrosion type of the pipeline to be identified based on the second set of specified parameters in the external corrosion condition data of the pipeline to be identified, and on a pre-built multimodal identification model, if the corrosion is generalized. The second set of specified parameters includes at least one of the following: corrosion failure location, insulation layer setting, and cathodic protection setting.
9. The apparatus as claimed in claim 8, characterized in that, Also includes: The model training module is used to acquire pipeline external corrosion failure sample data, which includes pipeline external corrosion failure image data and external corrosion morphology type labels; the constructed machine learning model is trained using the pipeline external corrosion failure sample data to obtain the trained machine learning model; the machine learning model is an external corrosion morphology recognition model based on neural networks.
10. A computer storage medium, characterized in that, The computer storage medium stores computer-executable instructions, which, when executed by a processor, implement the computer vision-based method for determining the external corrosion type of steel pipes as described in any one of claims 1-7.
11. An identification device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the computer vision-based method for determining the external corrosion type of steel pipes as described in any one of claims 1-7.