Carbon steel pitting pit growth direction prediction method and device, electronic equipment and storage medium

By constructing a prediction model using DeepLabV3+ network and feedforward neural network, the problem of accuracy in predicting the growth direction of pitting corrosion in carbon steel was solved, achieving efficient and accurate prediction of pitting corrosion growth direction, adaptable to different corrosion environments.

CN120747103BActive Publication Date: 2025-11-21中国石油大学(北京)克拉玛依校区
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202511260084.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-04
Publication Date
2025-11-21
Estimated Expiration
2045-09-04

AI Technical Summary

Technical Problem

Existing technologies cannot accurately predict the growth direction of pitting corrosion in carbon steel, which makes it impossible to effectively guide corrosion behavior research and the selection of anti-corrosion measures.

Method used

A prediction model was constructed using DeepLabV3+ network and feedforward neural network. By acquiring four-channel data and environmental factor data of carbon steel samples, and combining image segmentation and growth direction prediction sub-model, the growth direction of pitting corrosion pits was directly predicted.

Benefits of technology

It improves the accuracy and efficiency of predicting the growth direction of pitting corrosion pits, reduces human error, adapts to different corrosion environments, and enhances the generalization ability of prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120747103B_ABST
    Figure CN120747103B_ABST
Patent Text Reader

Abstract

The present application relates to a kind of carbon steel pitting analysis technical field, it is a kind of carbon steel pitting pit growth direction prediction method, device, electronic equipment and storage medium, including obtaining the four-channel data of the carbon steel sample to be predicted and the environmental factor data of the position where the carbon steel sample to be predicted is located, wherein the four-channel data is the splicing data of the depth information and RGB information of the carbon steel sample to be predicted;Input four-channel data of the carbon steel sample to be predicted and the environmental factor data of the position where the carbon steel sample to be predicted is located to prediction model group.The present application constructs prediction model group, can directly obtain the growth direction of pitting pit by carbon steel sample image and the environmental factor data of the position where it is located using prediction model group, without manual feature extraction, reduce human error, improve the prediction efficiency, and DeepLabV3+ Network has the advantages of retaining more edge information, capture different scale context information, so that image segmentation is more accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of carbon steel pitting analysis technology, and to a method, device, electronic device, and storage medium for predicting the growth direction of pitting corrosion in carbon steel. Background Technology

[0002] Under the combined influence of various complex factors in its environment, carbon steel exhibits a corrosion pattern known as pitting corrosion, where the corrosion is concentrated on a small area of ​​the metal surface and penetrates deep into the metal. The growth direction of the pits determines how corrosion spreads on the carbon steel surface. Specifically, pits growing perpendicular to the surface and inwards exacerbate localized damage and may even lead to perforation, while pits growing parallel to the surface result in extensive thinning of the carbon steel surface. Therefore, accurately predicting the growth direction of pitting corrosion on carbon steel is crucial for studying the corrosion behavior of carbon steel in specific environments and for selecting appropriate anti-corrosion measures. Existing methods for predicting the growth direction of pitting corrosion on carbon steel include:

[0003] (1) Numerical simulation method using multiphysics coupling model

[0004] Using simulation software such as COMSOL Multiphyscis, a multiphysics coupling model including current distribution, mass transfer, and deformation geometry was established to investigate the effects of pH, NaCl concentration, and relative humidity on pitting corrosion rate. This model can accurately predict the pitting corrosion evolution process.

[0005] (2) Experimental observation methods

[0006] The material's resistance to pitting corrosion is determined by measuring parameters such as the weight loss, size, and depth of the pits.

[0007] The two methods mentioned above have high requirements for the implementation environment and basic data, and are not suitable for large-scale promotion.

[0008] (3) Deep learning methods

[0009] Deep learning is introduced for model training, and the trained model is used to predict the growth direction of pitting corrosion. For example:

[0010] Existing patent document one, publication number CN115791833B, discloses a method for evaluating pitting corrosion based on a super depth-of-field microscope. This method includes: using the 3D stitching function of a VHX7000 super depth-of-field microscope to stitch rectangular areas together, collecting the depth characteristics of pitting pits in multiple fields of view of the material sample; selecting a scale in the 3D display and calculating the total area of ​​the rectangle using length and width values; determining the maximum pitting depth of a single field of view based on the standard deviation of the maximum pitting depth, and selecting the largest maximum pitting depth among the material samples after comparison; collecting the cross-sectional area and number of pitting pits under a reference plane at different depths; introducing a pitting depth weighting parameter, proposing expressions for pitting tendency and pitting degree, and evaluating the pitting situation. This patent can evaluate the pitting situation, i.e., obtain the current pitting tendency and pitting degree, but it cannot predict the growth direction of pitting pits in carbon steel.

[0011] Existing patent document two, publication number CN117313041A, discloses a method for predicting and analyzing the pitting corrosion on the outer surface of buried pipelines. The method includes the following steps: selecting soil and pipeline features related to pitting corrosion on the outer surface of buried pipelines as input features; obtaining sample data on soil type and pipeline coating type; preprocessing the sample data to form a corrosion dataset; constructing a regression prediction model for the pitting corrosion depth of the outer surface of buried pipelines based on the XGBoost algorithm; randomly selecting 80% of the data in the corrosion dataset as a training set for model optimization training, and using the remaining 20% ​​as a test set to evaluate the performance of the trained model; inputting the sample data into the trained model to obtain the importance of soil and pipeline features and the pitting corrosion depth prediction results; converting the categorical features into continuous variables for use in the pitting corrosion depth regression prediction model, thereby achieving accurate prediction of the pitting corrosion depth of the pipeline. However, this patent can only predict the pitting corrosion depth and cannot predict the growth direction of pitting pits on carbon steel. Summary of the Invention

[0012] This invention provides a method, apparatus, electronic device, and storage medium for predicting the growth direction of pitting corrosion in carbon steel, overcoming the shortcomings of the prior art and effectively solving the problem that the prior art cannot predict the growth direction of pitting corrosion in carbon steel.

[0013] One of the technical solutions of this invention is achieved through the following measures: a method for predicting the growth direction of pitting corrosion in carbon steel, comprising:

[0014] Acquire four-channel data of the carbon steel sample to be predicted and environmental factor data of the location of the carbon steel sample to be predicted. The four-channel data is the spliced ​​data of the depth information and RGB information of the carbon steel sample to be predicted.

[0015] The prediction model group inputs four-channel data of the carbon steel sample to be predicted and environmental factor data of the sample's location to obtain the corresponding pitting corrosion growth direction. The prediction model group includes an image segmentation sub-model, a stitching unit, and a growth direction prediction sub-model. The image segmentation sub-model is obtained by deep learning on a DeepLabV3+ network using multiple first samples. Each first sample includes four-channel data of a historical carbon steel sample and corresponding image segmentation result identification information. The stitching unit stitches the image segmentation result and environmental factor data together. The growth direction prediction sub-model is obtained by deep learning on a feedforward neural network using multiple second samples. Each second sample includes stitched data of the historical carbon steel sample's image segmentation result and environmental factor data of its location, as well as corresponding pitting corrosion growth direction identification information.

[0016] The following are further optimizations and / or improvements to the above-mentioned technical solution:

[0017] The four-channel data of the carbon steel sample to be predicted were obtained in the same way as the four-channel data of historical carbon steel samples. The four-channel data of the carbon steel sample to be predicted includes:

[0018] Acquire preprocessed laser confocal microscopy scanning images of the carbon steel sample to be predicted;

[0019] The laser confocal microscope scanned images are further processed, including Gaussian blurring, image enhancement, and image normalization.

[0020] Adjust the size of the laser confocal microscope scan image to the target size, and extract the depth information and RGB information of the laser confocal microscope scan image and stitch them together to obtain a corresponding set of four-channel data.

[0021] The construction process of the above image segmentation sub-model includes:

[0022] Multiple first samples are obtained and divided into training sample set and test sample set according to the ratio. Each first sample includes four-channel data of historical carbon steel sample and identification information of corresponding image segmentation result. The four-channel data is the spliced ​​data of depth information and RGB information of historical carbon steel sample.

[0023] The DeepLabV3+ network was trained using a training sample set. During training, the network parameters were optimized by backpropagation to optimize the network weights. Training ended when the loss function was minimized, resulting in an image segmentation sub-model.

[0024] The trained image segmentation sub-model is tested using a test sample set, the model parameters of the image segmentation sub-model are optimized, and an image segmentation sub-model that meets the test evaluation requirements is output.

[0025] The DeepLabV3+ network described above includes an encoder and a decoder. The encoder includes a backbone network, an ASPP module, a global average pooling module, and a dimensionality reduction module. The backbone network extracts high-level features from the four-channel data to obtain the corresponding feature maps. The ASPP module performs multi-scale dilated convolution operations on the high-level features to obtain multi-scale feature maps. The global average pooling module provides a global representation of the multi-scale feature maps. The decoder introduces a spatial attention mechanism to obtain weighted feature maps. The dimensionality reduction module reduces the dimensionality of the multi-scale feature maps to complete image segmentation.

[0026] The construction process of the above growth direction prediction sub-model includes:

[0027] Multiple second samples were obtained and divided into training sample set and test sample set according to the proportion. Each second sample included the image segmentation results of historical carbon steel samples, the spliced ​​data of environmental factor data of the location, and the identification information of the growth direction of the corresponding pitting corrosion pit.

[0028] The feedforward neural network is trained using a training sample set. During training, the model parameters are optimized based on a deep learning optimizer. Training ends when the loss function is minimized, resulting in a growth direction prediction sub-model. The feedforward neural network is a feedforward neural network with multiple fully connected layers.

[0029] The trained growth direction prediction sub-model is tested using a test sample set, the model parameters of the growth direction prediction sub-model are optimized, and a growth direction prediction sub-model that meets the test evaluation requirements is output.

[0030] The second technical solution of the present invention is achieved through the following measures: a device for predicting the growth direction of pitting corrosion in carbon steel, comprising:

[0031] The data acquisition unit acquires four-channel data of the carbon steel sample to be predicted and environmental factor data of the location of the carbon steel sample to be predicted. The four-channel data is the spliced ​​data of the depth information and RGB information of the carbon steel sample to be predicted.

[0032] The prediction unit takes into account the four-channel data of the carbon steel sample to be predicted and the environmental factor data of the sample's location, and inputs them into the prediction model group to obtain the corresponding pitting growth direction. The prediction model group includes an image segmentation sub-model, a stitching unit, and a growth direction prediction sub-model. The image segmentation sub-model is obtained by deep learning on a DeepLabV3+ network using multiple first samples. Each first sample includes the four-channel data of a historical carbon steel sample and the corresponding image segmentation result identification information. The stitching unit stitches the image segmentation result and the environmental factor data. The growth direction prediction sub-model is obtained by deep learning on a feedforward neural network using multiple second samples. Each second sample includes the stitched data of the image segmentation result of a historical carbon steel sample and the environmental factor data of its location, as well as the corresponding pitting growth direction identification information.

[0033] The following are further optimizations and / or improvements to the above-mentioned technical solution:

[0034] The aforementioned data acquisition unit for prediction includes:

[0035] The image acquisition module acquires preprocessed laser confocal microscope scan images of the carbon steel sample to be predicted;

[0036] The first processing module further processes the laser confocal microscope scan image, including Gaussian blurring, image enhancement, and image normalization.

[0037] The second processing module adjusts the size of the laser confocal microscope scanned image to the target size, and extracts the depth information and RGB information of the laser confocal microscope scanned image and stitches them together to obtain a corresponding set of four-channel data.

[0038] The above also includes a first model building unit and a second model building unit;

[0039] The first model building unit constructs an image segmentation sub-model, including:

[0040] Multiple first samples are obtained and divided into training sample set and test sample set according to the ratio. Each first sample includes four-channel data of historical carbon steel sample and corresponding image segmentation result identification information. The four-channel data is the spliced ​​data of depth information and RGB information of historical carbon steel sample.

[0041] The DeepLabV3+ network was trained using a training sample set. During training, the network parameters were optimized by backpropagation to optimize the network weights. Training ended when the loss function was minimized, resulting in an image segmentation sub-model.

[0042] The trained image segmentation sub-model is tested using a test sample set, the model parameters of the image segmentation sub-model are optimized, and an image segmentation sub-model that meets the test evaluation requirements is output.

[0043] The second model building unit constructs a growth direction prediction sub-model, including:

[0044] Multiple second samples were obtained and divided into training sample set and test sample set according to the proportion. Each second sample included the image segmentation results of historical carbon steel samples, the spliced ​​data of environmental factor data of the location, and the identification information of the growth direction of the corresponding pitting corrosion pit.

[0045] The feedforward neural network is trained using a training sample set. During training, the model parameters are optimized based on a deep learning optimizer. Training ends when the loss function is minimized, resulting in a growth direction prediction sub-model. The feedforward neural network is a feedforward neural network with multiple fully connected layers.

[0046] The trained growth direction prediction sub-model is tested using a test sample set, the model parameters of the growth direction prediction sub-model are optimized, and a growth direction prediction sub-model that meets the test evaluation requirements is output.

[0047] The third technical solution of the present invention is achieved through the following measures: an electronic device, including a processor and a memory, wherein the memory stores a computer program, which is loaded and executed by the processor to implement the steps in the method for predicting the growth direction of pitting corrosion in carbon steel.

[0048] The fourth technical solution of the present invention is achieved by the following measures: a storage medium storing a computer program that can be read by a computer, the computer program being configured to execute the steps in the method for predicting the growth direction of pitting corrosion in carbon steel when running.

[0049] This invention utilizes a DeepLabV3+ network and a feedforward neural network to learn the relationship between four-channel data of a carbon steel sample, environmental factor data of its location, and the growth direction of pitting corrosion pits. A prediction model set is then constructed. This model set can directly predict the growth direction of pitting corrosion pits from the carbon steel sample image and its environmental factor data, eliminating the need for manual feature extraction, reducing human error, and improving prediction efficiency. Furthermore, the DeepLabV3+ network has the advantages of retaining more edge information and capturing contextual information at different scales, resulting in more accurate image segmentation. Moreover, this invention incorporates data from different corrosion environments in both model construction and usage, enhancing the predictive generalization ability to adapt to the evolution of pitting corrosion in carbon steel under different conditions. Attached Figure Description

[0050] Appendix Figure 1This is a schematic diagram of an implementation environment of an embodiment of the present invention.

[0051] Appendix Figure 2 This is a schematic diagram of the method for predicting the growth direction of pitting corrosion in carbon steel according to an embodiment of the present invention.

[0052] Appendix Figure 3 This is a schematic diagram of the four-channel data acquisition method according to an embodiment of the present invention.

[0053] Appendix Figure 4 This is a schematic diagram of the image segmentation sub-model construction method according to an embodiment of the present invention.

[0054] Appendix Figure 5 This is a schematic diagram of the growth direction prediction sub-model construction method according to an embodiment of the present invention.

[0055] Appendix Figure 6 This is a schematic diagram of a carbon steel pitting growth direction prediction device according to an embodiment of the present invention.

[0056] Appendix Figure 7 This is a schematic diagram of another carbon steel pitting growth direction prediction device according to an embodiment of the present invention. Detailed Implementation

[0057] The present invention is not limited to the following embodiments, and the specific implementation can be determined according to the technical solution of the present invention and the actual situation.

[0058] Those skilled in the art will understand that, unless specifically stated otherwise, in the embodiments of the present invention, a "module" or "unit" refers to a computer program or part of a computer program that has a predetermined function and works together with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.

[0059] In addition, in the embodiments of the present invention, "multiple" refers to two or more, and "first" and "second" are used to distinguish descriptions and should not be construed as implying relative importance.

[0060] This invention provides a method, apparatus, electronic device, and storage medium for predicting the growth direction of pitting corrosion on carbon steel. The method includes acquiring four-channel data of a carbon steel sample to be predicted and environmental factor data of the sample's location. The four-channel data is a stitched data of the sample's depth and RGB information. The method inputs the four-channel data and environmental factor data of the sample's location into a prediction model group to obtain the corresponding pitting corrosion growth direction. The prediction model group includes an image segmentation sub-model, a stitching unit, and a growth direction prediction sub-model. The image segmentation sub-model is obtained through deep learning on a DeepLabV3+ network using multiple first samples. Each first sample includes four-channel data of a historical carbon steel sample and corresponding image segmentation result identification information. The stitching unit stitches the image segmentation result and environmental factor data together. The growth direction prediction sub-model is obtained through deep learning on a feedforward neural network using multiple second samples. Each second sample includes stitched data of the historical carbon steel sample's image segmentation result and environmental factor data of its location, as well as corresponding pitting corrosion growth direction identification information.

[0061] The method provided in this embodiment of the invention may involve artificial intelligence (AI) technology and may be implemented based on artificial intelligence technology, such as using deep learning to train a corresponding model using samples.

[0062] Machine Learning (ML) is a multidisciplinary field involving probability theory, statistics, approximation theory, convex analysis, and algorithm complexity theory, among others. It specifically studies how computers can simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to endow computers with intelligence; its applications span all areas of artificial intelligence.

[0063] Deep learning (DL) specifically refers to machine learning based on deep neural network models and methods. It has developed from statistical machine learning, artificial neural network algorithms, and other algorithms, combined with the advancements in big data and computing power. The most important technical feature of deep learning is its ability to automatically extract features.

[0064] The aforementioned machine learning and deep learning typically include techniques such as neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and instructional learning.

[0065] In deep learning, the loss function is used to predict the target value by comparing the predicted value with the target value. This is done by updating the weight vector of each layer of the neural network based on the difference between the two values ​​(usually with an initialization process before the first update, where parameters are pre-configured for each layer) until the network can predict the target value or a value very close to it. Therefore, deep learning requires pre-defining "how to compare the difference between the predicted value and the target value," which is the loss function.

[0066] As attached Figure 1 The diagram illustrates an implementation environment provided by an embodiment of the present invention. This implementation environment may include: training equipment and usage equipment.

[0067] Both the training equipment and the equipment used are computer devices; optionally, the computer device is a terminal device, such as a mobile phone, tablet computer, PC (Personal Computer) or other electronic devices; or, the computer device is a server, which can be a single server, a server cluster composed of multiple servers, or a cloud computing service center. This embodiment of the invention does not limit this.

[0068] Training equipment refers to computer equipment capable of training and learning neural networks. Optionally, the training equipment has the ability to acquire neural networks and train and learn them according to application requirements. For example, the training equipment acquires neural networks from other devices through a network and then trains them with training samples according to application requirements so that the neural network has the ability to obtain the growth direction of pitting corrosion pits. Optionally, the training equipment has the ability to build neural networks. It can build neural networks on its own according to application requirements and then train and learn them. For example, in order to obtain the growth direction of pitting corrosion pits based on the four-channel data of the carbon steel sample to be predicted and the environmental factor data of the location of the carbon steel sample to be predicted, the training equipment builds a neural network on its own and then trains and learns it with samples according to application requirements.

[0069] The device used refers to a computer device that has the requirement to use a neural network. Optionally, the device uses a neural network from other devices through the network according to the application requirements. For example, if the device has the requirement to predict the growth direction of pitting corrosion pits, it can use the network to obtain a neural network that has been trained and learned to predict the growth direction of pitting corrosion pits from other devices, and use the neural network to predict the growth direction of pitting corrosion pits.

[0070] Based on this, the technical solution of the present invention will be described and explained below with reference to several examples.

[0071] Example 1: As shown in the attached document Figure 2 As shown in the figure, an embodiment of the present invention discloses a method for predicting the growth direction of pitting corrosion in carbon steel, including:

[0072] Step S110: Obtain four-channel data of the carbon steel sample to be predicted and environmental factor data of the location of the carbon steel sample to be predicted. The four-channel data is the spliced ​​data of depth information and RGB information of the carbon steel sample to be predicted.

[0073] Step S120: Input the four-channel data of the carbon steel sample to be predicted and the environmental factor data of the location of the carbon steel sample to be predicted into the prediction model group to obtain the corresponding pitting growth direction. The prediction model group includes an image segmentation sub-model, a stitching unit, and a growth direction prediction sub-model. The image segmentation sub-model is obtained by deep learning the DeepLabV3+ network through multiple first samples. Each first sample includes the four-channel data of the historical carbon steel sample and the corresponding image segmentation result identification information. The stitching unit stitches the image segmentation result and the environmental factor data. The growth direction prediction sub-model is obtained by deep learning the feedforward neural network through multiple second samples. Each second sample includes the stitched data of the image segmentation result of the historical carbon steel sample and the environmental factor data of its location, as well as the corresponding pitting growth direction identification information.

[0074] In step S110 above, four-channel data of the carbon steel sample to be predicted is obtained. First, an image of the carbon steel sample to be predicted is obtained (the image here can be a pitting image of the carbon steel sample to be predicted). Then, the depth information and RGB information are extracted and stitched together to obtain a set of four-channel data.

[0075] This invention discloses a method for predicting the growth direction of pitting corrosion in carbon steel. It utilizes a DeepLabV3+ network and a feedforward neural network to learn the relationship between four-channel data of a carbon steel sample, environmental factor data of its location, and the growth direction of the pitting corrosion. A prediction model set is then constructed. This model set can directly predict the growth direction of pitting corrosion using images of the carbon steel sample and environmental factor data of its location. This provides data support for studying the corrosion behavior of carbon steel under specific environments and selecting anti-corrosion measures. Furthermore, this embodiment incorporates data from different corrosion environments in both model construction and usage, improving the predictive generalization ability to adapt to the evolution of pitting corrosion in carbon steel under different environments.

[0076] Example 2: As shown in the attached document Figure 3 As shown, this embodiment of the invention is a further optimization of the above embodiment, wherein the four-channel data of the carbon steel sample to be predicted is obtained in the same way as the four-channel data of historical carbon steel samples, wherein the four-channel data of the carbon steel sample to be predicted includes:

[0077] Step S210: Obtain the preprocessed laser confocal microscope scanning image of the carbon steel sample to be predicted;

[0078] The above preprocessing includes format conversion, that is, converting the 2D images in BMP format obtained by laser confocal microscope into JPG format for model training and use.

[0079] Step S220: The laser confocal microscope scan image is processed again, including Gaussian blurring, image enhancement, and image normalization.

[0080] The specific steps of the above image Gaussian blur processing include:

[0081] (1) Determine the standard deviation of the convolution kernel size used for Gaussian blur, which is expressed by formula (1):

[0082] (1)

[0083] in, σ Standard deviation, k The size of the convolution kernel to use.

[0084] Based on standard deviation σ Construct a Gaussian kernel (filter matrix). The Gaussian kernel is the discretized result of the Gaussian function. The Gaussian function values ​​calculated at the location points form a matrix. The size of the matrix is ​​determined by the calculated standard deviation and is used to represent the weight of each pixel during convolution.

[0085] (3) The Gaussian kernel and the image are weighted and averaged by convolution operation to achieve the blurring effect. The Gaussian function is expressed by formula (2):

[0086] (2)

[0087] in, G ( x , y ) is the value of the Gaussian function, representing the point ( x , y The weight of ); σ The standard deviation determines the width of the Gaussian function, which in turn affects the intensity of the blur. x , y The Gaussian function at different points is calculated relative to the center of the filter, forming the Gaussian kernel, which is the filter matrix.

[0088] The specific steps of the above image enhancement process include:

[0089] In this embodiment, the contrast stretching method is used for image enhancement processing. This method can map the pixel values ​​of the original image to a new range, and its formula is expressed as formula (3):

[0090] (3)

[0091] in, r These are the pixel values ​​(values ​​in the red, green, and blue channels) of the original image. s These are the pixel values ​​(values ​​in the red, green, and blue channels) in the mapped target image. r min and r max These are the minimum and maximum pixel values ​​of the original image, respectively; s min and s max These are the minimum and maximum pixel values ​​for the target range, respectively.

[0092] The specific steps of the above image normalization include:

[0093] Data normalization scales data to a fixed range. For DeepLabV3+ networks, it is usually set to [0,1], and its formula is expressed as formula (4):

[0094] (4)

[0095] in, x The values ​​of the red, green, and blue channels for each pixel in the original image, ranging from [0, 255]; x′ The normalized image pixel values ​​range from [0,1].

[0096] Step S230: Adjust the size of the laser confocal microscope scan image to the target size, and extract the depth information and RGB information of the laser confocal microscope scan image and stitch them together to obtain a set of corresponding four-channel data.

[0097] The target size of the image is set according to the input requirements of the DeepLabV3+ network. The adjustment process is to adjust the image to the target size using a simple image scaling method.

[0098] The depth and RGB information of the laser confocal microscope scan image extracted above are stitched together to obtain a corresponding set of four-channel data, which is expressed by formula (5):

[0099] (5)

[0100] in, This is a concatenation function; For RGB channels; This is depth information.

[0101] Example 3: As shown in the attached document Figure 4 As shown, the embodiments of the present invention are further optimizations of the above embodiments, wherein the construction process of the image segmentation sub-model includes:

[0102] Step S310: Obtain multiple first samples and divide them into training sample set and test sample set according to the ratio. Each first sample includes four-channel data of historical carbon steel sample and corresponding image segmentation result identification information. The four-channel data is the spliced ​​data of depth information and RGB information of historical carbon steel sample.

[0103] The acquisition method for the four-channel data of the historical carbon steel samples mentioned above is the same as that in Example 2, and will not be repeated here.

[0104] Step S320: Train the DeepLabV3+ network using the training sample set. During training, optimize the network parameters by optimizing the network weights through backpropagation. End the training when the loss function is minimized to obtain the image segmentation sub-model.

[0105] The DeepLabV3+ network described above includes an encoder, a decoder, and a dimensionality reduction module. The input data is first encoded and then decoded. After decoding, the dimensionality reduction module is used for dimensionality reduction processing. The encoder includes a backbone network (a ResNet network in this embodiment), an ASPP module (in this embodiment, the ASPP module includes multi-scale dilated convolution operations), and a global average pooling network. The decoder module introduces an attention mechanism, and the dimensionality reduction module performs dimensionality reduction processing based on global average pooling.

[0106] Here, the ResNet network is used to extract high-level features of the image. ResNet has a deep structure and can further process the data into high-level features, thus laying the groundwork for input into the DeepLabV3+ model. Its formula is expressed as formula (6):

[0107] (6)

[0108] in, x Input feature map; The residual function is the feature map obtained through a series of convolution operations; For the first i The weights of each convolutional layer; This is the output result of the residual block.

[0109] Here, the ASPP module performs multi-scale dilated convolution operations to expand the receptive field, thereby capturing contextual information at different scales. Its formula is expressed as formula (7):

[0110] (7)

[0111] in, This is the output of the ASPP module; For different hole convolution layers Convolution operations; For global average pooling; This is the output result of the residual block.

[0112] Among them, multi-scale dilated convolution can process features at multiple scales at the same time, which helps to enhance the model's ability to perceive multi-scale information. Its formula can be expressed as formula (8). Global average pooling is a pooling technique used to obtain global context information, so as to reduce the spatial dimension of the feature map to a single value, thereby obtaining the global representation of the image. Its formula can be expressed as formula (9).

[0113] (8)

[0114] in, y ( t The output feature map is located at... t The value at; x ( t ) is the input feature map at the location t The value at; To address different void ratios d The convolution kernel weights; i The location index of the input feature map; D ={ d 1 , d 2 ,…,d k} represents a set of different void ratios, each void ratio representing a scale.

[0115] (9)

[0116] in, This is the output of global average pooling; x ( i , j , c ) is the input feature map at position ( i , j ) and channels c Pixel values; H and W The height and width of the input feature map; c This represents the number of channels.

[0117] Here, the decoder introduces a spatial attention mechanism, which allows the model to better focus on the region where the pits are located. Spatial attention operates on the input feature map to produce a weight map related to the spatial dimension, which is expressed by formula (10):

[0118] (10)

[0119] Among them, softmax() is the softmax attention mechanism; The query vector represents the information request for the current time step or current location; As a key vector, the input feature at each position is mapped to a key; For each pixel position i , j Attention weights between them.

[0120] This weight map can be applied after convolution or other feature extraction layers, allowing the model to focus on regions with important information in the feature map. Its formula is expressed as formula (11):

[0121] (11)

[0122] in, This is the weighted feature map; For each pixel position i , k Attention weights between them; This is the original feature map.

[0123] Further decoding by fusing multi-scale features allows for the use of spatial attention to restore image accuracy.

[0124] Here, the feature map F output by the decoder is multidimensional, and its spatial size H′×W′ is usually reduced. These features need to be further processed before the feedforward neural network. Dimensionality reduction is performed using a dimensionality reduction module. In this embodiment, global average pooling is used again to reduce its dimensionality. The role of global average pooling is to compress the entire feature map F into a vector of length C. The specific calculation method is to perform an average operation on the feature map of each channel to obtain the feature of that channel. The formula is expressed as formula (12):

[0125] (12)

[0126] in, F avg For length is c vector; GAP( F This represents global average pooling; For feature map F Central Channel cAt position ( i , j The value on ); and These represent the image height and width, respectively.

[0127] The aforementioned loss function specifically uses the cross-entropy loss function to measure the difference between the probability distribution of the model's output and the true label. L The calculation formula is shown in formula (13).

[0128] (13)

[0129] in, For the first i The real label of each pixel; For the first i The predicted probability of each pixel in the grid output; N This represents the total number of pixels in the image.

[0130] The above optimization of network weights through backpropagation to minimize the loss function is expressed as formula (14).

[0131] (14)

[0132] in, θ These are the parameters of the network; L(θ) Let be the loss function of the network; To minimize the result.

[0133] Step S330: Test the trained image segmentation sub-model using the test sample set, optimize the model parameters of the image segmentation sub-model, and output an image segmentation sub-model that meets the test evaluation requirements.

[0134] Example 4: As shown in the appendix Figure 5 As shown, the embodiments of the present invention are further optimizations of the above embodiments, wherein the construction process of the growth direction prediction sub-model includes:

[0135] Step S410: Obtain multiple second samples and divide them into training sample set and test sample set according to the ratio. Each second sample includes the image segmentation result of the historical carbon steel sample and the spliced ​​data of the environmental factor data of the location, as well as the identification information of the growth direction of the corresponding pitting corrosion pit.

[0136] The above environmental factor data includes temperature, pressure, ion concentration related to the corrosion process, gas composition, microbial content, etc. The image segmentation results are spliced ​​with the environmental factor data of the location, and the formula is expressed as formula (15):

[0137] (15)

[0138] in, F avg For length is c The vector represents the feature data output by the image segmentation sub-model, i.e., the image segmentation result; E It is a length of d The vector represents environmental factors; x This is a vector formed by concatenating the image segmentation result with environmental factor data of the location. x The dimension is c + d .

[0139] Step S420: Train the feedforward neural network using the training sample set. During training, optimize the model parameters based on the deep learning optimizer. When the loss function is minimized, end the training to obtain the growth direction prediction sub-model. The feedforward neural network is a feedforward neural network with multiple fully connected layers.

[0140] The aforementioned feedforward neural network includes a feedforward neural network with multiple fully connected layers. The specific process includes the input data first passing through the first fully connected layer, then through the ReLU activation function, then into the second fully connected layer, passing through the ReLU activation function again, and finally outputting the result of the third layer. The ReLU activation function is used to perform nonlinear transformation to increase the expressive power of the model. Its formula is expressed as formulas (16) to (18):

[0141]

[0142] in, x This is a vector obtained by concatenating the image segmentation result with environmental factor data of the location. W i For the first i Layer weight matrix; For the first i The layer's bias term; ReLU is the activation function; For the first i The number of neurons in a layer; y This indicates the direction of pitting corrosion growth.

[0143] Furthermore, the output of the ReLU activation function is transformed using a threshold: if the ReLU output is greater than 0, it is transformed into 1; if the ReLU output is equal to 0, it is transformed into 0. Here, 0 indicates that the growth direction of the pitting corrosion in carbon steel is horizontal, and 1 indicates vertical.

[0144] The mean squared error loss is used as the loss function of the neural network, and its formula is expressed as formula (19):

[0145] (19)

[0146] in, n The number of samples; It is the first i The true value of each sample; It is the first i The predicted value for each sample.

[0147] The Adam optimizer updates the model parameters (i.e., weights and biases) by calculating gradients, thereby reducing the loss. Its formula is expressed as formula (20):

[0148] (20)

[0149] in, θ These are the parameters of the network; L(θ) is the loss function for the feedforward neural network; To minimize the result.

[0150] Step S430: Test the trained growth direction prediction sub-model using the test sample set, optimize the model parameters of the growth direction prediction sub-model, and output a growth direction prediction sub-model that meets the test evaluation requirements.

[0151] Example 5: As shown in the attached document Figure 6 As shown, this embodiment of the invention discloses a device for predicting the growth direction of pitting corrosion in carbon steel, comprising:

[0152] The data acquisition unit acquires four-channel data of the carbon steel sample to be predicted and environmental factor data of the location of the carbon steel sample to be predicted. The four-channel data is the spliced ​​data of the depth information and RGB information of the carbon steel sample to be predicted.

[0153] The prediction unit takes into account the four-channel data of the carbon steel sample to be predicted and the environmental factor data of the sample's location, and inputs them into the prediction model group to obtain the corresponding pitting growth direction. The prediction model group includes an image segmentation sub-model, a stitching unit, and a growth direction prediction sub-model. The image segmentation sub-model is obtained by deep learning on a DeepLabV3+ network using multiple first samples. Each first sample includes the four-channel data of a historical carbon steel sample and the corresponding image segmentation result identification information. The stitching unit stitches the image segmentation result and the environmental factor data. The growth direction prediction sub-model is obtained by deep learning on a feedforward neural network using multiple second samples. Each second sample includes the stitched data of the image segmentation result of a historical carbon steel sample and the environmental factor data of its location, as well as the corresponding pitting growth direction identification information.

[0154] The data acquisition unit to be predicted includes:

[0155] The image acquisition module acquires preprocessed laser confocal microscope scan images of the carbon steel sample to be predicted;

[0156] The first processing module further processes the laser confocal microscope scan image, including Gaussian blurring, image enhancement, and image normalization.

[0157] The second processing module adjusts the size of the laser confocal microscope scanned image to the target size, and extracts the depth information and RGB information of the laser confocal microscope scanned image and stitches them together to obtain a corresponding set of four-channel data.

[0158] Example 6: As shown in the appendix Figure 7 As shown, this embodiment of the invention discloses a device for predicting the growth direction of pitting corrosion in carbon steel, comprising:

[0159] The first model building unit constructs an image segmentation sub-model, including:

[0160] Multiple first samples are obtained and divided into training sample set and test sample set according to the ratio. Each first sample includes four-channel data of historical carbon steel sample and corresponding image segmentation result identification information. The four-channel data is the spliced ​​data of depth information and RGB information of historical carbon steel sample.

[0161] The DeepLabV3+ network was trained using a training sample set. During training, the network parameters were optimized by backpropagation to optimize the network weights. Training ended when the loss function was minimized, resulting in an image segmentation sub-model.

[0162] The trained image segmentation sub-model is tested using a test sample set, the model parameters of the image segmentation sub-model are optimized, and an image segmentation sub-model that meets the test evaluation requirements is output.

[0163] The second model building unit constructs a growth direction prediction sub-model, including:

[0164] Multiple second samples were obtained and divided into training sample set and test sample set according to the proportion. Each second sample included the image segmentation results of historical carbon steel samples, the spliced ​​data of environmental factor data of the location, and the identification information of the growth direction of the corresponding pitting corrosion pit.

[0165] The feedforward neural network is trained using a training sample set. During training, the model parameters are optimized based on a deep learning optimizer. Training ends when the loss function is minimized, resulting in a growth direction prediction sub-model. The feedforward neural network is a feedforward neural network with multiple fully connected layers.

[0166] The trained growth direction prediction sub-model is tested using a test sample set, the model parameters of the growth direction prediction sub-model are optimized, and a growth direction prediction sub-model that meets the test evaluation requirements is output.

[0167] The data acquisition unit acquires four-channel data of the carbon steel sample to be predicted and environmental factor data of the location of the carbon steel sample to be predicted. The four-channel data is the spliced ​​data of the depth information and RGB information of the carbon steel sample to be predicted.

[0168] The prediction unit takes the four-channel data of the carbon steel sample to be predicted and the environmental factor data of the location of the carbon steel sample to be predicted as input to the prediction model group to obtain the corresponding pitting growth direction.

[0169] Example 7: This embodiment of the invention discloses a storage medium storing a computer program that can be read by a computer. The computer program is configured to execute a method for predicting the growth direction of pitting corrosion in carbon steel when it is run.

[0170] The aforementioned storage media may include, but are not limited to, USB flash drives, read-only memory, portable hard drives, magnetic disks, optical disks, and other media capable of storing computer programs.

[0171] Example 8: This embodiment of the invention discloses an electronic device, including a processor and a memory. The memory stores a computer program, which is loaded and executed by the processor to implement a method for predicting the growth direction of pitting corrosion in carbon steel.

[0172] The processor described above can be a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), an ASIC, an FPGA, or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this invention. It can also be a combination that implements computational functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc. The memory can include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, read-only memory, portable hard drives, magnetic disks, or optical disks.

[0173] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The solutions in the embodiments of the present invention can be implemented using various computer languages, such as the object-oriented programming language Java and the interpreted scripting language JavaScript.

[0174] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0175] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0176] The above content is only a specific embodiment of the present invention, which has strong adaptability and implementation effect. However, the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be covered within the protection scope of the present invention. Therefore, equivalent changes made in accordance with the claims of the present invention are still within the scope of the present invention.

Claims

1. A method for predicting the growth direction of pitting corrosion in carbon steel, characterized in that, include: Acquire four-channel data of the carbon steel sample to be predicted and environmental factor data of the location of the carbon steel sample to be predicted. The four-channel data is the spliced ​​data of the depth information and RGB information of the carbon steel sample to be predicted. The prediction model group inputs four-channel data of the carbon steel sample to be predicted and environmental factor data of the sample's location to obtain the corresponding pitting corrosion growth direction. The prediction model group includes an image segmentation sub-model, a stitching unit, and a growth direction prediction sub-model. The image segmentation sub-model is obtained by deep learning on a DeepLabV3+ network using multiple first samples. The DeepLabV3+ network includes an encoder, a decoder, and a dimensionality reduction module. The encoder encodes the input data, and the decoder performs dimensionality reduction processing using the dimensionality reduction module. The encoder includes a ResNet network, an ASPP module, and a global average pooling network. The decoder introduces a spatial attention mechanism. Each first sample includes four-channel data of a historical carbon steel sample and corresponding image segmentation result identification information. The stitching unit stitches the image segmentation result and environmental factor data. The growth direction prediction sub-model is obtained by deep learning on a feedforward neural network using multiple second samples. The feedforward neural network includes a feedforward neural network with multiple fully connected layers. Each second sample includes the stitched data of the historical carbon steel sample's image segmentation result and environmental factor data of its location, as well as the corresponding pitting corrosion growth direction identification information.

2. The method for predicting the growth direction of pitting corrosion in carbon steel according to claim 1, characterized in that, The four-channel data of the carbon steel sample to be predicted is obtained in the same way as the four-channel data of historical carbon steel samples. The four-channel data of the carbon steel sample to be predicted includes: Acquire preprocessed laser confocal microscopy scanning images of the carbon steel sample to be predicted; The laser confocal microscope scanned images are further processed, including Gaussian blurring, image enhancement, and image normalization. Adjust the size of the laser confocal microscope scan image to the target size, and extract the depth information and RGB information of the laser confocal microscope scan image and stitch them together to obtain a corresponding set of four-channel data.

3. The method for predicting the growth direction of pitting corrosion in carbon steel according to claim 1 or 2, characterized in that, The construction process of the image segmentation sub-model includes: Multiple first samples are obtained and divided into training sample set and test sample set according to the ratio. Each first sample includes four-channel data of historical carbon steel sample and identification information of corresponding image segmentation result. The four-channel data is the spliced ​​data of depth information and RGB information of historical carbon steel sample. The DeepLabV3+ network was trained using a training sample set. During training, the network parameters were optimized by backpropagation to optimize the network weights. Training ended when the loss function was minimized, resulting in an image segmentation sub-model. The trained image segmentation sub-model is tested using a test sample set, the model parameters of the image segmentation sub-model are optimized, and an image segmentation sub-model that meets the test evaluation requirements is output.

4. The method for predicting the growth direction of pitting corrosion in carbon steel according to claim 3, characterized in that, The DeepLabV3+ network includes an encoder and a decoder. The encoder includes a backbone network, an ASPP module, a global average pooling module, and a dimensionality reduction module. The backbone network extracts high-level features from the four-channel data to obtain corresponding feature maps. The ASPP module performs multi-scale dilated convolution operations on the high-level features to obtain multi-scale feature maps. The global average pooling module provides a global representation of the multi-scale feature maps. The decoder introduces a spatial attention mechanism to obtain weighted feature maps. The dimensionality reduction module reduces the dimensionality of the multi-scale feature maps to complete image segmentation.

5. The method for predicting the growth direction of pitting corrosion in carbon steel according to claim 1, 2, or 4, characterized in that, The construction process of the growth direction prediction sub-model includes: Multiple second samples were obtained and divided into training sample set and test sample set according to the proportion. Each second sample included the image segmentation result of historical carbon steel sample, the spliced ​​data of environmental factor data of its location, and the corresponding pitting pit growth direction identification information. The feedforward neural network is trained using a training sample set. During training, the model parameters are optimized based on a deep learning optimizer. Training ends when the loss function is minimized, resulting in a growth direction prediction sub-model. The feedforward neural network is a feedforward neural network with multiple fully connected layers. The trained growth direction prediction sub-model is tested using a test sample set, the model parameters of the growth direction prediction sub-model are optimized, and a growth direction prediction sub-model that meets the test evaluation requirements is output.

6. A device for predicting the growth direction of pitting corrosion in carbon steel using the method described in any one of claims 1 to 5, characterized in that, include: The data acquisition unit acquires four-channel data of the carbon steel sample to be predicted and environmental factor data of the location of the carbon steel sample to be predicted. The four-channel data is the spliced ​​data of the depth information and RGB information of the carbon steel sample to be predicted. The prediction unit takes four-channel data of the carbon steel sample to be predicted and environmental factor data of the sample's location as input to the prediction model group to obtain the corresponding pitting growth direction. The prediction model group includes an image segmentation sub-model, a stitching unit, and a growth direction prediction sub-model. The image segmentation sub-model is obtained by deep learning on a DeepLabV3+ network using multiple first samples. The DeepLabV3+ network includes an encoder, a decoder, and a dimensionality reduction module. The encoder encodes the input data, and the decoder performs dimensionality reduction processing using the dimensionality reduction module. The encoder includes a ResNet network, an ASPP module, and a global average pooling network. The decoder incorporates a spatial attention mechanism. Each first sample includes four-channel data of a historical carbon steel sample and corresponding image segmentation result identification information. The stitching unit stitches the image segmentation result and environmental factor data. The growth direction prediction sub-model is obtained by deep learning on a feedforward neural network using multiple second samples. The feedforward neural network includes a feedforward neural network with multiple fully connected layers. Each second sample includes stitched data of the historical carbon steel sample's image segmentation result and environmental factor data of its location, as well as corresponding pitting growth direction identification information.

7. The carbon steel pitting corrosion growth direction prediction device according to claim 6, characterized in that, The data acquisition unit to be predicted includes: The image acquisition module acquires preprocessed laser confocal microscope scan images of the carbon steel sample to be predicted; The first processing module further processes the laser confocal microscope scan image, including Gaussian blurring, image enhancement, and image normalization. The second processing module adjusts the size of the laser confocal microscope scanned image to the target size, and extracts the depth information and RGB information of the laser confocal microscope scanned image and stitches them together to obtain a corresponding set of four-channel data.

8. The carbon steel pitting corrosion growth direction prediction device according to claim 6 or 7, characterized in that, It also includes a first model building unit and a second model building unit; The first model building unit constructs an image segmentation sub-model, including: Multiple first samples are obtained and divided into training sample set and test sample set according to the ratio. Each first sample includes four-channel data of historical carbon steel sample and corresponding image segmentation result identification information. The four-channel data is the spliced ​​data of depth information and RGB information of historical carbon steel sample. The DeepLabV3+ network was trained using a training sample set. During training, the network parameters were optimized by backpropagation to optimize the network weights. Training ended when the loss function was minimized, resulting in an image segmentation sub-model. The trained image segmentation sub-model is tested using a test sample set, the model parameters of the image segmentation sub-model are optimized, and an image segmentation sub-model that meets the test evaluation requirements is output. The second model building unit constructs a growth direction prediction sub-model, including: Multiple second samples were obtained and divided into training sample set and test sample set according to the proportion. Each second sample included the image segmentation result of historical carbon steel sample, the spliced ​​data of environmental factor data of its location, and the corresponding pitting pit growth direction identification information. The feedforward neural network is trained using a training sample set. During training, the model parameters are optimized based on a deep learning optimizer. Training ends when the loss function is minimized, resulting in a growth direction prediction sub-model. The feedforward neural network is a feedforward neural network with multiple fully connected layers. The trained growth direction prediction sub-model is tested using a test sample set, the model parameters of the growth direction prediction sub-model are optimized, and a growth direction prediction sub-model that meets the test evaluation requirements is output.

9. An electronic device, characterized in that, It includes a processor and a memory, wherein the memory stores a computer program, which is loaded and executed by the processor to implement the steps of the method as claimed in any one of claims 1 to 5.

10. A storage medium, characterized in that, The storage medium stores a computer program that can be read by a computer, the computer program being configured to execute the steps of the method as described in any one of claims 1 to 5 when it is run.

Citation Information

Patent Citations

  • A pitting corrosion evaluation method based on ultra-depth-of-field microscope

    CN115791833B

  • Buried pipeline outer surface pitting corrosion prediction and factor analysis method

    CN117313041A

  • Prediction method for corrosion rate of steel bridge bolt

    CN116563626A

  • Lightweight DeepLabV3 + image semantic segmentation method and device

    CN116704190A

  • Method for predicting service life of heat distribution pipeline

    CN119004118A