Corrosion damage can lead to a decrease in the ultimate strength and carrying capacity of ship structures, and even result in buckling or fracture. With the rapid development of deep learning, image recognition processing, and convolutional neural networks (CNN) are playing an important role in the field of corrosion damage detection and assessment. In this paper, corrosion damage images are obtained by taking photos of test pieces of accelerated corrosion tests, and a corrosion damage database is established to provide data for the establishment of the subsequent image corrosion damage level dataset and the training of the CNN model. Digital image processing methods and unsupervised learning clustering algorithms are used to identify and process corrosion images and obtain corrosion parameters. Based on the corrosion parameters, the images are classified into different corrosion damage levels to establish a corrosion damage dataset with corrosion damage level labels. This dataset is used to train a CNN model and establish a corrosion damage level assessment interface. By inputting corrosion damage images, the corrosion damage level assessment results can be obtained.

Corrosion is a major cause of failure in aging ship structures,1  and has increasingly attracted the attention of relevant researchers. Corrosion damage can lead to a decrease in the ultimate strength and carrying capacity of ship structures, and even result in buckling or fracture. In the past decade, image recognition and processing techniques based on corrosion damage datasets as well as convolutional neural network (CNN) models have played an increasingly important role in the field of corrosion damage detection and assessment due to the rapid development of artificial intelligence and deep learning.

For the detection and assessment of corrosion damage, current research can be mainly divided into three aspects. First, traditional digital image processing methods are used for macroscopic corrosion image analysis, which started in the 1960s and has since become very mature. When analyzing pitting corrosion, the corrosion images are usually obtained through a scanner and then subjected to threshold processing. The pitting rate is calculated by counting the number of pits to describe and evaluate the pitting corrosion situation.2  In addition to traditional digital image processing methods, combining fractal theory with digital image processing to present the clear morphology of macroscopic corrosion images is an important research direction. By using a binary image method and establishing a fractal model, the macroscopic corrosion morphology features can be extracted and quantitatively analyzed to assess corrosion characterstics.3 

The second aspect is the analysis of the microscopic morphology of corrosion images. For example, by analyzing the metallographic structure of the images, the relationship between the depth of the corrosion pits and the corrosion area can be established, and a three-dimensional distribution map of the corrosion pits can be obtained.4  In addition, microscopic corrosion images can be observed under a microscope and the wavelet transform method can be applied to analyze the morphological features of corrosion pits. This is also a commonly used method in the field of corrosion detection.5  In recent years, as obtaining high-resolution images has become easier, multiscale statistical analysis methods based on high-resolution and large-field-of-view optical image recognition for the spatial distribution of corrosion pits have seen wider applications.6 

The third aspect is the current research hotspot of pattern recognition and neural network applications in corrosion image recognition and processing. Initial neural network research mainly utilized artificial neural networks and applied them to established corrosion damage models, which in turn assessed changes in structural ultimate strength.7  In recent years, with the development of deep learning, CNNs have been increasingly applied by researchers in the field of corrosion damage detection. Related studies have shown that the performance of CNNs is superior to that of multilayer perceptron networks based on visual corrosion detection developed using texture and color analysis.8  Sufficient image datasets are required to support the use of CNNs. A common research method is to establish a relevant database of the research object, conduct testing on the CNN structure, and modify, train, validate, and test the CNN architecture using this database.9  In addition, the structure of the CNN is usually adapted to the specific research objectives to make it more suitable for corrosion detection of the target structure. Algorithms such as overlapping windows are also combined to identify and locate the corrosion regions.10 

In the last decade, many researchers have devoted themselves to making full use of computer technology in ship corrosion inspection and have achieved certain results.11-12  For example, by introducing a reliable and cost-effective corrosion damage model development technique to predict the residual life of ship structures with nonlinear corrosion damage over time.13  The random field theory is used to describe the defects of the ship structure, and the artificial neural network is used to evaluate the variability of the ultimate strength of the VLCC cruise ship under the action of random geometric defects and the ultimate strength of the ship beam with different defect models is predicted.7  In China, there is a faster regional CNN architecture and VGG-19 model for deep transfer learning to achieve rapid corrosion detection in the field of ships.14 

CNNs are now commonly recognized not only in engineering but also in medicine. Relying on its great signal processing capability, the automatic extraction of local features from biomedical signals through convolutional layers shows significant advantages in recognizing anisotropic square waves in heart failure, which greatly facilitates the recognition and diagnosis of heart failure.15-16  In malignant tumors, CNNs can help doctors in diagnosis by recognizing features in images and are applied to predict the disease risk and prognosis level of patients.17 

Currently, research mainly focuses on the detection and assessment of corrosion damage in metal materials,18-19  but the results are not suitable for engineering applications. This paper analyzes the factors that affect the accuracy of the evaluation of CNN models and obtains a corrosion damage evaluation model for underwater hull plating. A corrosion damage evaluation system is established which can be used for corrosion damage detection and assessment of ship structures.

Experimental Methods

In the experiment, the entire Q345D steel plate was laser-cut into 50 mm × 50 mm × 4 mm specimens. Plastic compartment boxes were used to avoid corrosion of the immersion tank by the corrosive solution. Relevant corrosion solutions and weighing operations were required in the experiment, so instruments such as measuring cups and electronic balances were prepared. According to the current relevant research results, 3.5% sodium chloride solution is the concentration that has the highest corrosion rate on steel.20  In addition, H2O2 was added to seawater to strengthen the cathode depolarization to simulate and accelerate the corrosion in the seawater immersion zone of hull steel. The test results were similar to those in a seawater system, and the composition of the rust layer was the same.21  The experiment selected a mixed solution of 0.8 mol/L hydrogen peroxide and 3.5% sodium chloride solution as the accelerated corrosion solution for simulating a seawater immersion zone. As this study is only concerned with the recognition of corrosion from images and the temperature of the corroded samples does not directly affect the image recognition results, the effect of external environment parameters such as temperature has not been directly considered.

The experimental procedure followed the national standard GB10124-1988 “Method for uniform corrosion immersion test of metal materials in laboratory.” Before conducting the accelerated corrosion test, all specimens were polished with sandpaper until the surface scratches were uniform, then rinsed with distilled water, dehydrated with ethanol, and dried with a hair dryer. Before the experiment, photographs were taken of all the specimens, and the original images were saved and numbered according to the position of each specimen in each compartment of the test box. The length, width, and thickness of each specimen were measured with a vernier caliper, and the weight of each specimen was recorded. Eight corrosion test boxes were used to place the corrosion specimens, which were arranged closely together to ensure the same environmental conditions for all eight test boxes, and to facilitate observation and operation, as shown in Figure 1(a).
FIGURE 1.

Schematic diagram of accelerated corrosion test. (a) Layout of corrosion test boxes and (b) immersion of specimens in corrosive solution.

FIGURE 1.

Schematic diagram of accelerated corrosion test. (a) Layout of corrosion test boxes and (b) immersion of specimens in corrosive solution.

Close modal

Next, the prepared accelerated corrosion solution was poured into the corrosion box, and the surface-treated specimens were completely immersed in the accelerated corrosion test box. The height of the solution was approximately two-thirds of the height of the test box. The specimens were kept from touching the walls of the box and were stably immersed in the corrosion solution, as shown in Figure 1(b). The cycle of the accelerated corrosion test was set to 10 d, 20 d, 30 d, 40 d, 50 d, and 60 d.

At the end of each corrosion period, the corroded specimens were carefully removed and placed on a table to dry until the surface moisture evaporated. The specimens were then photographed and their weights were measured. All specimens were then subjected to surface rust removal, weighed again, and their weight was recorded. After replacing the corrosion solution, all specimens were returned to their original positions for the next corrosion cycle. These steps were repeated until the completion of six accelerated corrosion cycles.

Experimental Results

During the experiment, images of different corrosion periods and stages were obtained and analyzed from three aspects: rust color, rust morphology, and corrosion products. From the analysis of rust color, in the initial stage of corrosion, the rust layer was black, gradually changing to dark red in the middle stage, and finally turning yellow-brown in the late stage of corrosion. Figure 2 shows the change in the corrosion color of the specimens, where the corrosion area gradually developed from dot-like to flake-like, and multiple small areas gradually connected into a large area.
FIGURE 2.

Schematic diagram of rust color variation. (a) Initial corrosion, (b) mid-term corrosion, and (c) late-term corrosion.

FIGURE 2.

Schematic diagram of rust color variation. (a) Initial corrosion, (b) mid-term corrosion, and (c) late-term corrosion.

Close modal

From the analysis of rust morphology, in the initial stage, the rust layer on the surface of the specimen was thin and had poor adhesion, which was loose and allowed more oxygen to enter, accelerating the corrosion process. In the middle stage, the corrosion rust layer gradually thickened, and the inner rust layer increased, but less than the outer rust layer. The outer rust layer was loose, while the inner rust layer was dense. In the late stage of corrosion, the outer rust layer increased slowly and was almost as dense as the inner rust layer, hindering the entry of oxygen and slowing down the corrosion rate.

From the analysis of corrosion products, the outer rust layer mainly consists of loose and porous β-FeOOH and γ-FeOOH. The continuous and dense Fe3O4 and α-FeOOH are the main components of the inner rust layer. In the initial stage of corrosion, the outer layer of the product occupies most of the space, and the corrosion product increases rapidly. As the corrosion continues, the inner layer of the product occupies more and more space, and the corrosion rate gradually slows down.

Establishment of Corrosion Image Database

Increasing the diversity of the corrosion image database is crucial to avoid the uniformity of images and improve the training of corrosion damage assessment models. This can be achieved by considering several aspects such as distance, lighting conditions, shooting angles, and postprocessing techniques.

The corrosion image database contains information on the experimental conditions and data augmentation methods used in the precorrosion experiments, along with the storage path of the images. The database is mainly divided into several categories based on different experimental periods, each containing all samples. Each sample is numbered and includes the corresponding images, shooting conditions, and data augmentation methods.

In terms of shooting distance, both far and close-range shooting methods were used. For lighting conditions, bright and dim conditions were designed to simulate the uncertainty of lighting conditions during actual shooting, which enables the corrosion assessment models to recognize images affected by various lighting conditions. To approach real-world scenarios, the shooting angles were diversified by tilting the camera.

In addition, data enhancement techniques are widely used to increase the diversity of image datasets in machine learning applications. Cropping, flipping, and rotating are the most common techniques used in data enhancement. By applying these techniques to increase the number of corrosion images, efficiency in dataset creation can be enhanced, leading to improved accuracy of machine learning models. Figure 3 shows images of various forms of corrosion of the specimen under different conditions. The final corrosion damage database includes the number of corrosion cycles, sample id, sample weight parameters, and corrosion image path. After the final data enhancement, the training set database of the original 155 initial samples contains roughly 3,000 images, and the remaining images not selected for the training set are used as the test set. Establishing the corrosion image database can provide image and data support for the subsequent corrosion image recognition processing as well as train the corrosion damage assessment model. It also has a certain engineering reference value.
FIGURE 3.

Various forms of corrosion images: (a) long-distance shooting, (b) close-range shooting, (c) bright conditions, (d) dim conditions, (e) cropped images, (f) flipped images, (g) tilted images, and (h) rotated mages.

FIGURE 3.

Various forms of corrosion images: (a) long-distance shooting, (b) close-range shooting, (c) bright conditions, (d) dim conditions, (e) cropped images, (f) flipped images, (g) tilted images, and (h) rotated mages.

Close modal

Corrosion Damage Image Recognition

Digital Image Processing

Corrosion images obtained from experiments were subjected to recognition and processing using digital image processing techniques and unsupervised learning clustering methods to extract corrosion feature parameters. OpenCV was used to implement the corrosion parameter extraction from the images in digital image processing techniques. The techniques included gray transformation, edge detection, and contour extraction, to obtain the corrosion grayscale image and corrosion binary image. Edge detection and contour extraction methods were used to further identify the corrosion regions in the images. By calculating the number of pixels in the corrosion region, the area of the corrosion region and the ratio of the total area of the corrosion can be obtained.

Figure 4 shows a series of image processing operations performed on the corrosion images, including (a) the original corrosion image, (b) the binary image obtained after preprocessing and thresholding, (c) the image obtained by applying Canny22  edge detection to the binary image, and (d) the image obtained after contour extraction. The centroid method was used to obtain the corrosion center of each small corrosion region from the contour extraction image. The corrosion area and area ratio were obtained by calculating the total number of pixels, and the actual corrosion area was obtained by conversion with the actual structural area.
FIGURE 4.

Corrosion image identification and processing procedure. (a) Original image, (b) binary image, (c) edge detection image, and (d) contour extraction image.

FIGURE 4.

Corrosion image identification and processing procedure. (a) Original image, (b) binary image, (c) edge detection image, and (d) contour extraction image.

Close modal

Digital image processing techniques can provide accurate and efficient analysis of corrosion damage, which is crucial for ensuring the safety and reliability of structures and components in various industries. The use of unsupervised learning methods can also help automate the analysis process and reduce human errors.

Figure 5 shows the corrosion parameters of the image, including the corrosion area and corrosion center of each region. In the image identification and processing procedure, the images obtained at each step of the procedure are saved, and the corresponding corrosion parameters are saved in a text document for future reference and use.
FIGURE 5.

Display of corrosion image parameters.

FIGURE 5.

Display of corrosion image parameters.

Close modal

Unsupervised Learning Clustering Methods

For complex corrosion images with ambiguous corrosion boundaries, unsupervised learning clustering methods can be used for image recognition and segmentation. The self-organizing neural network algorithm is used to segment the corrosion area, and the color difference between the corroded and noncorroded areas is used for clustering. The area of the corroded region and the ratio of the total corroded area to the total area are calculated by counting the number of pixels in each region.

As shown in Figure 6, the initial clustering is performed in the first step to classify all of the pixel points with corrosive color features. By taking the pixels of each point as a vector of inputs into the neural network for iterative computation, the winning neurons are obtained to achieve the classification of that input. Then the above operation is repeated and the weights and parameters are constantly updated to finally achieve the classification of all the pixel points, at this time many pixel points with corrosion possibilities are also classified into the corrosion region for labeling as shown in Figure 6(b).
FIGURE 6.

Image segmentation using self-organizing neural network clustering method: (a) original image, (b) initial clustering image, (c) first-round clustering image, (d) second-round clustering image, (e) corrosion area display, and (f) corrosion area removal.

FIGURE 6.

Image segmentation using self-organizing neural network clustering method: (a) original image, (b) initial clustering image, (c) first-round clustering image, (d) second-round clustering image, (e) corrosion area display, and (f) corrosion area removal.

Close modal

In the second step, the initial clustering result is further refined by performing one or two additional rounds of clustering to filter out the ambiguous corrosion areas. Finally, the corroded regions are comprehensively clustered based on the selected features, resulting in a fully labeled corrosion map, as shown in Figures 6(c) and (d).

Two methods of displaying the corrosion regions are shown in Figures 6(e) and (f). The first method displays the corroded regions on a white background, while the second method removes the corroded regions from the original image and sets them to a black background. By selecting the coordinate of a pixel corresponding to a corroded area in the program, the number of pixels in that corroded area can be counted. Meanwhile, the program also marks the irrelevant areas outside the corroded image with color. The coordinate of any pixel in the irrelevant area can be selected to calculate the number of pixels in that area. Assuming the width and height of the image are known, the ratio of the total corroded area can be calculated using Equation (1).
where u was the ratio of the total corroded area and Nc was the total number of pixels in the corroded area divided by the sum of the total number of pixels in the irrelevant area and corroded area. Nn was the total number of pixels in the irrelevant area can be defined as the sum of all pixels that are not part of the corroded area in the image. l × h was the image width and the height.

Criteria for Assessing the Degree of Corrosion Damage

This paper’s corrosion assessment method is mainly based on the proportion of the corroded area to the entire material surface, referring to the coating inspection and grading rules in GB8923-88 “Surface Rust and Rust Removal Grades for Steel Before Coating” and Section 8.2 of the “Guidelines for Corrosion Inspection of Ship Structures” by China Classification Society. In cases where the thickness of the rust layer in a rust image is difficult to distinguish, or where there is a large area of rust but not much rust loss or gain, it is not possible to determine the degree of rust based on the area ratio alone. Therefore, the mass method can be used for further evaluation. This paper uses the weight gain ratio as one of the parameters for corrosion damage assessment. The weight gain ratio is calculated by measuring the weight change of the test piece before and after corrosion and using Equation (2).

In addition to the mass method, the depth method is also an important corrosion assessment method. The corrosion rate characterized by the mass method can be converted to the corrosion rate characterized by the depth method. The average corrosion rate is generally calculated using the weight loss method, which involves determining the weight before corrosion, the weight after corrosion and rust removal, the corrosion time, and the material density, as shown in  Equation (3)
where q was the weight gain ratio, m0 was the weight of the test piece before corrosion, measured in grams, m1 was the weight of the test piece after corrosion, also measured in grams, m2 was the weight of the test piece after corrosion and rust removal, measured in grams, and S was the surface area of the test piece, measured in square millimeters. The corrosion rate is represented by vw, which is the weight loss of the test piece per unit area per unit time, expressed in grams per square millimeter per hour. The time of corrosion is represented by t, measured in hours.
The conversion formula for the average corrosion rate characterized by the depth method is shown in  Equation (4). Converting the average corrosion rate helps to better characterize the degree of corrosion damage. This formula is important for assessing the corrosion rate and is commonly used in corrosion assessment methods.
where v was the average corrosion rate characterized by the depth method, expressed in millimeters per year (mm/a), vw was the average corrosion rate characterized by the weight loss method, expressed in grams per square millimeter per hour (g/mm2/h), and ρ was the density of the material, expressed in grams per cubic centimeter (g/cm3).

Combining the weight gain ratio and the average corrosion rate characterized by the depth method, a set of evaluation standards for the degree of corrosion damage has been developed, as shown in Table 1. Based on the comprehensive evaluation of these two parameters, the degree of corrosion damage is classified into five levels according to the values of weight gain ratio and average corrosion rate. Level 0 corresponds to extremely slight corrosion or no corrosion, while level 1 corresponds to mild corrosion. As the level increases, the corrosion becomes more severe, and when reaching levels 3 or 4, the material becomes unusable due to the severity of the corrosion.

Table 1.

Evaluation Criteria for the Degree of Corrosion Damage

Evaluation Criteria for the Degree of Corrosion Damage
Evaluation Criteria for the Degree of Corrosion Damage

The specific corrosion damage assessment method is presented in Table 2 and is divided into five levels denoted as 0, 1, 2, 3, and 4. The table provides a set of standards for evaluating the degree of corrosion damage based on the weight gain ratio and the average corrosion rate characterized by the depth method. The lower portion of the table lists example corrosion images corresponding to each corrosion damage level.

Table 2.

Table for Corrosion Image Level Assessment

Table for Corrosion Image Level Assessment
Table for Corrosion Image Level Assessment
Level 0 corresponds to the situation where the material has not undergone any corrosion, as shown in Figures 7(a) and (f). The degree of corrosion damage increases gradually from levels 1 to 4, with the area ratio of floating rust, trace rust, and layered rust as the primary standard for assessing the corrosion level, and the weight gain ratio and average corrosion rate as secondary assessment standard.
FIGURE 7.

Example images of corrosion damage levels. (a) and (f) Level 0 corrosion, (b) and (g) level 1 corrosion, (c) and (h) level 2 corrosion, (d) and (i) level 3 corrosion, and (e) and (j) level 4 corrosion.

FIGURE 7.

Example images of corrosion damage levels. (a) and (f) Level 0 corrosion, (b) and (g) level 1 corrosion, (c) and (h) level 2 corrosion, (d) and (i) level 3 corrosion, and (e) and (j) level 4 corrosion.

Close modal

In level 1 corrosion, all area ranges of floating rust are included, which means that very slight corrosion can only be seen on the surface of the material as slight rust, and it can even be easily wiped off, as shown in Figure 7(b). Level 1 corrosion also includes situations where a small amount of pitting corrosion occurs on the material surface, which means that the material has been corroded by a small area of trace rust, as shown in Figure 7(g). This kind of corrosion has a very minor impact on the material properties. In level 2 corrosion, trace rust occupies nearly half of the area, as shown in Figure 7(c), or the material surface exhibits relatively slight layered rust, as shown in Figure 7(h). Layered rust is a thick corrosion product on the material surface that seriously damages the original structure of the material surface, leading to increasingly severe corrosion. Therefore, layered rust is a very dangerous presence for the material.

In level 3 corrosion, trace rust covers more than half of the area and begins to spread on the material surface, as shown in Figure 7(d), or layered rust begins to increase and gradually approaches half of the material surface area, as shown in Figure 7(i). This belongs to a relatively severe corrosion situation. In level 4 corrosion, the material surface is covered with layered rust, and it is almost impossible to see any completely uncorroded surface, as shown in Figures 7(e) and (j). This is a very severe corrosion situation and requires immediate protective measures. By using the above classification method, the degree of corrosion damage can be subdivided in detail, and the existing corrosion images can be assessed based on this table.

Establishment of Corrosion Damage Dataset

First, the corrosion image database established by 2.3 can be used to assess the corrosion damage level of the images according to the corrosion assessment standard in 2.5. For the same sample, only one set of forms needs to be selected as a representative for corrosion parameter acquisition since other forms of corrosion images are obtained by changes in shooting conditions or through data enhancement approaches. The corrosion damage database contains all of the samples of each corrosion cycle, and the corrosion parameters corresponding to the images are calculated, including the corrosion area ratio, the weight increase ratio, the average corrosion rate, etc. The corrosion degree assessment results are stored for data analysis and organization, and the corrosion damage dataset is also established for the later CNN model training. The established corrosion damage database is shown in Figure 8.
FIGURE 8.

Corrosion damage database.

FIGURE 8.

Corrosion damage database.

Close modal

In the training of CNN, the images are divided into a training set and test set. The test dataset is the images that have not been entered into the training set and the ratio of the two is 7:3. Because the process of making the test set is similar to that of the training set, it will not be explained too much.

Construction of a Convolutional Neural Network Model

Regarding the construction of CNN model, there are many good CNN models given by many researchers through a lot of research and analysis, including LeNet,23  AlexNet,24  VGGNet,25  GoogleNet,26  ResNet,27  and these classical networks have been used by the researchers a lot. The LeNet and AlexNet structures are simpler and have less room for improvement, while the GoogleNet and ResNet are more complicated to improve. As VGG networks use deeper hierarchies and smaller convolutional kernels, they can extract richer image features and perform better for complex visual tasks. On the other hand, the structure of VGG networks is relatively simple and easy to understand and modify. Researchers can adjust the network structure according to specific task requirements to improve performance or adapt to different application scenarios.

Corrosion image features are designed for corrosion pits and other corrosion pits with depth features The VGG network can better identify such corrosion pit features and just like the VGG structure it is easy to adjust and can be adjusted by a small number of parameters to achieve the effect of recognition of corrosion images. Therefore, this paper establishes a CNN model that considers the accuracy and efficiency, takes the CNN model VGG as the basis, and adjusts its structure so that it is suitable for the corrosion damage level classification task of corrosion images.

For the input layer, on the one hand, because its corrosion products are more complex, its corrosion features are more reflected in texture and color, etc., and corrosion features are not obvious; on the other hand, for different corrosion damage levels of the image features are more similar, if the use of a low resolution may make the subsequent convolution operation can not be able to extract enough initial corrosion features, leading to the poor model training effect, so the corrosion image The input size is adjusted to 320 × 320.

For the convolution layer, the corrosion of the outer plate of the hull often appears in different sizes, shapes, and corrosion areas of different rust colors, these corrosion image features belong to the lower level features, the convolution layer structure design process should ensure that the convolution of the convolution kernel to extract a large number of low-level corrosion features, such as corrosion area geometry, edges, textures, etc., to facilitate the subsequent more abstract feature extraction operations, so the convolution layer The network structure of the second, third, and fourth layers of the convolutional kernels are all halved, as shown in Figures 9 and 10. In this paper, the parameter settings of the pooling layer in the original VGG network are used, the size of the convolution kernel of the pooling layer is 2 × 2 × 1 and the step size is 2. As the corroded image is to be processed, in this paper the maximum pooling method is chosen to preserve the texture information of the picture.
FIGURE 9.

Structure of the first three convolutional layers.

FIGURE 9.

Structure of the first three convolutional layers.

Close modal
FIGURE 10.

Structure of the last two convolutional layers.

FIGURE 10.

Structure of the last two convolutional layers.

Close modal

The number of neurons in the fully connected layers of the original VGG network structure was adjusted to avoid overfitting, so the number of neurons in the fully connected layers was adjusted to 1,000 in layers F1 and F2. As the ultimate goal of this model is to evaluate the input corrosion image to one of the five corrosion damage levels. the F3 layer is set to five neurons. The output layer is implemented using the activation function Softmax. The specific structure of the final CNN model is shown in Table 3..

Table 3.

Structure of CNN Model Applied to Corrosion Assessment

Structure of CNN Model Applied to Corrosion Assessment
Structure of CNN Model Applied to Corrosion Assessment

Convolutional Neural Network Model Training

This paper focuses on the role of three parameters, namely learning rate, batch size, and training rounds, in the training process of the k CNN model. The hyperparameters used for training this model and their settings are shown in Table 4. The learning rate setting for the training of this model uses the following standard: first set a large learning rate for observation, so that the model loss value decreases significantly, and then gradually decrease the learning rate to prevent the global optimum from being skipped. The learning rate is set to 0.001, 0.0005, 0.0001, and 0.000054 cases to train the CNN model, respectively.

Table 4.

Model Training Parameters Settings

Model Training Parameters Settings
Model Training Parameters Settings

Large batches of training can make the loss function converge faster, but the loss value may fall into a local minimum; selecting small batches for training can introduce randomness, which is conducive to the improvement of the model training effect, but may lead to oscillation of the loss function and failure to converge to the minimum value. Comprehensive computer configurations, 4, 16, and 32 batches, were selected for training in this paper to analyze the effects of different batch sizes on the model training effect. The accuracy of the test set in the model training results is used to adjust the size of the training rounds in time. For the neural network structure of corrosive image classification, four training rounds of 15, 25, 50, and 75 are selected for model training.

Analysis of Training Results

The training results of the original VGG11 network structure and the adjusted network structure were compared, and the training effect was determined by comparing the damage function value and accuracy of the training and test set. The accuracy rate as a calculation formula is shown in Equation (5)
where TP was the actual number of positive cases and the predicted number of positive cases, FP was the number of cases that are negative and predicted to be positive, FN was the actual number of positive cases and the predicted number of negative cases, and TN was the actual number of negative cases and the predicted number of negative cases.

Table 5 shows the training results of the various hyperparameters adjusted corresponding to the CNNs. According to the training results in Table 5, when the learning rate was large, i.e., 0.001 and 0.0005, both models showed that the accuracy rate remained below 50% with the increasing number of training rounds, which is a gradient explosion, and the weight parameters in the neural network could not be further optimized at this time.

Table 5.

Training Results of Corrosion Grade Assessment Model

Training Results of Corrosion Grade Assessment Model
Training Results of Corrosion Grade Assessment Model

When the learning rate is small, i.e., the learning rate of 0.00005 is selected, both models show an extremely slow increase in the accuracy rate with the increase of training rounds, which indicates that the optimization parameters of the model corresponding to this learning rate take too long and still cannot reach the global minimum after several iterations.

To study the effect of each hyperparameter on the training results, the accuracy of the original VGG11 model and the modified VGG11 model with structural adjustments at different learning rates were selected for comparison with the CNN model at a batch size of 16, and the specific results are shown in Figure 11.
FIGURE 11.

Effect of learning rate on training results.

FIGURE 11.

Effect of learning rate on training results.

Close modal

As can be seen from Figure 9, when the learning rate is 0.0001, the accuracy of both models is higher than that of their respective models under the other three learning rates, and the accuracy of the improved VGG11 is higher than that of the original VGG11. From the above analysis, it can be seen that the training effect is best when the learning rate is selected to be 0.0001, and the accuracy of the test set is the highest.

Next, we analyze the effect of batch size on the training effect of the model, select a learning rate of 0.0001, and compare the original VGG11 with the improved VGG11 in batches of 4, 16, and 32, and the specific results are shown in Figure 12. When batch 16 is selected, the accuracy of the two training models is improved compared to batch 4 and batch 32, but overall the batch has little effect on the accuracy of this model.
FIGURE 12.

Effect of batch size on training results.

FIGURE 12.

Effect of batch size on training results.

Close modal
Two neural network models with different numbers of training rounds with a learning rate of 0.0001 and batch 16 are compared, and according to the model accuracy under four training rounds in Figure 13, it can be seen that 15 and 25 training rounds cannot make the model reach the global minimum, and the loss function has converged and gradually stabilized at 50 rounds.
FIGURE 13.

Effect of training rounds on training results.

FIGURE 13.

Effect of training rounds on training results.

Close modal
After the analysis of the above results, the accuracy of the improved VGG11 is higher than that of the original VGG11. The hyperparameters of the model are learning rate 0.0001, batch size 16, and number of training rounds 50 to obtain a CNN model that can be used for corrosion damage level assessment. The loss functions and accuracy rates of the training and test sets are shown in Figures 14, 15, 16, and 17, respectively, with the highest accuracy rate of 94.28% in the test set.
FIGURE 14.

Training set loss function values.

FIGURE 14.

Training set loss function values.

Close modal
FIGURE 15.

Training set accuracy.

FIGURE 15.

Training set accuracy.

Close modal
FIGURE 16.

Test set loss function values.

FIGURE 16.

Test set loss function values.

Close modal
FIGURE 17.

Test set accuracy.

FIGURE 17.

Test set accuracy.

Close modal
To further analyze the effect of this corrosion damage class classification model, it was compared with four other classical neural network models, and the same hyperparameters and optimization algorithms were used to train the models for Alex-Net, VGG16-Net, Google-Net, and Res-Net, and the same test sets were used for testing. The model training results are shown in Figure 18 and the highest accuracy of each CNN model is shown in Table 6.
FIGURE 18.

Comparison of training results of each model.

FIGURE 18.

Comparison of training results of each model.

Close modal
Table 6.

Comparison of the Accuracy of Each Network Model

Comparison of the Accuracy of Each Network Model
Comparison of the Accuracy of Each Network Model

The analysis of the above table shows that the other four CNN models, all perform relatively well, and the highest accuracy of the test set is over 80% and close to 90%. The accuracy of the test set of the improved VGG is higher than the other four classical neural network models, the training time of the improved VGG is shorter, and the training efficiency is higher than the other four neural network models. The accuracy of the model was verified by comparing it with other classical CNN structures.

In the context of corrosion damage assessment, the database containing the corrosion images and associated parameters can be used to train and test corrosion damage assessment models. The availability of a diverse and comprehensive database can help improve the accuracy and reliability of corrosion damage assessment, which is crucial for ensuring the safety and longevity of structures and components in various industries. Correctly detecting and assessing the corrosion damage on the outer plate of the underwater hull can reduce the probability of structural damage caused by corrosion damage on the hull of the ship and thus the occurrence of safety accidents. The trained model is applied to the actual corrosion damage assessment, the corrosion damage image is input into the assessment model, the corrosion is detected and assessed, and the corresponding protective measures are given according to the assessment results.

The corrosion damage level assessment system is mainly composed of three parts. The first part is the accelerated corrosion test of the hull structure and the corrosion image database established on the basis, which mainly provides a large number of corrosion damage images and related corrosion parameters. The second part is the corrosion image recognition and processing system, which is mainly divided into two aspects—one is the procedure based on the traditional digital image processing method and the other is the image clustering and segmentation procedure based on unsupervised learning. The two are used in combination to do corrosion image recognition and processing to extract corrosion damage parameters. According to the corrosion damage images and parameters obtained by the corrosion image recognition processing system, the corrosion damage dataset is constructed. In the third part, the corrosion damage dataset is imported into the structurally adjusted CNN model for training, and the corrosion damage level assessment model is established and applied. Finally, the corrosion damage level assessment of corroded ship hull pictures is achieved.

After the image is input to the CNN model, it will undergo a convolutional operation, pooling operation, nonlinear mapping, and other operations in each layer of the model structure, and finally, output five numerical results, which will be transformed into the probability of each corrosion grade by the Softmax function, and the model will display the grade corresponding to the largest probability value as the evaluation result. Figure 19 shows the results of the model applied to the corrosion damage level assessment, and Table 7 shows the probability corresponding to each corrosion damage level and the final predicted corrosion level.
FIGURE 19.

Example of corrosion damage level assessment: (a) corrosion image 1, (b) corrosion image 2, (c) corrosion image 3, and (d) corrosion image 4.

FIGURE 19.

Example of corrosion damage level assessment: (a) corrosion image 1, (b) corrosion image 2, (c) corrosion image 3, and (d) corrosion image 4.

Close modal
Table 7.

Evaluation of Corrosion Damage Level

Evaluation of Corrosion Damage Level
Evaluation of Corrosion Damage Level

In this paper, the accelerated corrosion test images were detected and processed to obtain the corrosion parameters, and the corrosion damage assessment criteria and image corrosion damage level dataset were established. The dataset was introduced into the CNN model for training, and the effects of the number of training rounds, iteration number, and learning rate on the accuracy of the model were analyzed The CNN model for corrosion damage level assessment was obtained and an interface for corrosion damage level assessment was established. The specific findings are as follows.

  • Corrosion damage characterization parameters were obtained. Using traditional digital image processing methods, a digital image recognition and processing console application was written to realize image preprocessing, thresholding, edge detection, and contour extraction; an improved self-organizing neural network algorithm was used for image corrosion area identification and segmentation. The parameters of the corrosion center, corrosion area, and total corrosion area ratio are obtained by two methods of image recognition and processing. Combined with the average corrosion rate and corrosion weight loss ratio parameters calculated from the test data and the corrosion parameters obtained by the image identification and processing methods, the corrosion damage level assessment standard was established.

  • The corrosion damage level assessment model is established. In the construction of the CNN model, the VGG network was adjusted from the input layer, convolutional layer, and output layer to make it more suitable for corrosion damage level assessment. In the construction of the corrosion damage dataset, the corrosion damage level assessment criterion established in the previous stage was used to calibrate the corrosion images and add corrosion damage level labels to them. iIn the training of the CNN model, three hyperparameters of learning rate, batch size, and training rounds were selected and the original VGG11 and the improved VGG11 were compared for training. The accuracy of the model was verified by comparing it with other classical CNN structures.

  • A corrosion damage level assessment system for hull plates was formed. The system contains a corrosion damage database and uses image recognition and CNN to save and call the trained corrosion damage level assessment model to realise the corrosion damage level assessment of the corroded hull plate.

Trade name.

The authors would like to thank the financial support from the Aeronautical Science Foundation of China (Grant No. 2023M031077001) and the Open Project Program of Shandong Marine Aerospace Equipment Technological Innovation Center, Ludong University (Grant No. MAETIC202209).

1.
Wang
G.
,
Spencer
J.
,
Elsayed
T.
,
ASME 2003 22nd Int. Conf. Offshore Mech. Arctic Eng.
3
(
2003
):
p
.
253
258
.
2.
Itzhak
D.
,
Dinstein
I.
,
Zilberberg
T.
,
Corros. Sci.
21
,
1
(
1981
):
p
.
17
22
.
3.
Wang
K.
,
Li
C.P.
,
Lu
J.L.
,
Coatings
12
,
7
(
2022
):
p
.
1
12
.
4.
Quin
M.J.
,
Bailey
M.G.
,
Ikeda
B.M.
,
Government of Canada Public Works & Government Services Canada AECL-10966
(
1993
):
p
.
1
58
.
5.
Frantziskonis
G.N.
,
Simon
L.B.
,
Woo
J.
,
Eur. J. Mech. A
19
,
2
(
2000
):
p
.
309
318
.
6.
Wang
Y.F.
,
Tian
Z.Q.
,
Hu
S.Y.
,
Materials
13
,
21
(
2020
):
p
.
1
16
.
7.
Georgiadis
D.G.
,
Samuelides
M.S.
,
Marine Struct.
76
,
6
(
2021
):
p
.
1
26
.
8.
Atha
D.J.
,
Jahanshahi
M.R.
,
Struct. Health Monitor.
17
,
5
(
2018
):
p
.
1110
1128
.
9.
Cha
Y.J.
,
Choi
W.
,
Suh
G.
,
Comput. Aid. Civil Infrastruct. Eng.
33
,
9
(
2018
):
p
.
731
747
.
10.
Yao
Y.
,
Yang
Y.
,
Wang
Y.P.
,
Appl. Ocean Res.
90
,
1
(
2019
):
p
.
1
11
.
11.
Okasha
N.M.
,
Frangopol
D.M.
,
Decò
A.
,
Marine Struct.
23
,
3
(
2010
):
p
.
303
321
.
12.
Dong
Y.
,
Frangopol
D.M.
,
Ocean Eng.
101
,
1
(
2015
):
p
.
161
171
.
13.
Kim
D.K.
,
Wong
E.W.C.
,
Cho
N.K.
,
Int. J. Naval Architect. Ocean Eng.
12
(
2020
):
p
.
657
666
.
14.
Liu
L.L.
,
Tan
E.
,
Zhen
Y.D.
,
2018 13th IEEE Conf. Ind. Electron. Appl.
(
2018
):
p
.
606
610
.
15.
Rai
H.M.
,
Chatterjee
K.
,
Appl. Intell.
52
,
5
(
2022
):
p
.
5366
5384
.
16.
Hou
B.
,
Yang
J.
,
Wang
P.
,
IEEE Trans. Instrum. Meas.
69
,
4
(
2019
):
p
.
1232
1240
.
17.
Azer
S.A.
,
World
J.
Gastrointestinal Oncol.
12
,
11
(
2019
):
p
.
1218
1230
.
18.
Zhang
S.X.
,
Lu
S.X.
,
Dong
X.
,
Machines
11
,
1
(
2023
):
p
.
1
15
.
19.
Jia
Z.T.
,
Fu
M.J.
,
Zhao
X.D.
,
Displays
76
,
1
(
2023
):
p
.
1
11
.
20.
Peng
W.
,
Liu
S.
,
Li
X.
,
Proceedings of the 10th National Corrosion Conference
,
Nanchang, Jiangxi, China
,
2019
.
21.
Zeng
H.B.
, “
Study on Indoor Simulated Accelerated Test Method for Corrosion of Hull Steel in Seawater Immersion Zone
,”
in
Hunan University of China
,
Changsha, China
,
2010
.
22.
Canny
J.
,
IEEE Trans. Pattern Anal. Mach. Intell.
8
,
6
(
1986
):
p
.
679
698
.
23.
Lecun
Y.
,
Bottou
L.
,
Bengio
Y.
,
Haffner
P.
,
Proc. IEEE
86
,
11
(
1998
):
p
.
2278
2324
.
24.
Aled
K.
,
llya
S.
,
Geoffrey
E.H.
,
ACM
60
,
6
(
2017
):
p
.
84
90
.
25.
Simonyan
K.
,
Zisserman
A.
,
arXiv:1409.1556
,
2014
.
26.
Szegedy
C.
,
Liu
W.
,
Jia
Y.
,
Proc. IEEE Conf. Comput. Vision Pattern Recognit.
2015
:
p
.
1
9
.
27.
He
K.M.
,
Zhang
X.
,
Ren
S.
,
Proc. IEEE Conf. Comput. Vision Pattern Recognit.
2016
:
p
.
770
778
.