Introduction

The problem of deep-sea corrosion in metallic structural materials is a significant obstacle to the exploration and development of deep-sea resources1,2,3. Organic anti-corrosion coatings are one of the most commonly used protective measures in marine environments4,5. However, the complex nature of the deep-sea environment can lead to premature coating failure and reduced lifetime6,7,8. Since organic coatings are directly exposed to seawater, rapid degradation of the coatings can result in premature corrosion of marine structural materials. Therefore, accurately predicting coating service life based on the degradation behavior of organic coatings in deep-sea environments is essential for their development, offering significant scientific value.

Methods for predicting the service life of coatings or other materials can generally be categorized into two types, experience-based prediction methods9,10,11 and data-driven prediction methods12,13,14. Experience-based models typically use accelerated experiments to simulate the specific service environment of materials and establish empirical equations with key parameters to predict the lifespan of coatings15,16. These methods can make quite accurate predictions under certain simple conditions. However, due to the complexity of material stress states and service environments, constructing realistic physical models is often very challenging. On the other hand, data-driven methods utilize collected monitoring data to predict lifespan by analyzing the relationship between data and material characteristics, without the need for complex physical models17,18. However, this approach requires a high quantity and quality of data, which sometimes limits its widespread application.

Compared to shallow-water environments, the degradation behavior of coatings in deep-sea environments undergoes significant changes4,19,20,21,22. Our previous research has indicated that the synergistic effects of pressure and fluid in deep-sea environments lead to rapid cracking on the surface of coatings6. The cracks progressively expand and interconnect over time, causing the detachment of polymer fragments from the coating surface and ultimately accelerating coating failure. This particular failure form under the deep-sea environment is directly correlated with changes in the microstructure of coating. Unfortunately, certain performance tests may not promptly demonstrate these changes during the early stages of failure, which presents challenges for precise predictions based on testing performance parameters. Therefore, the information of degradation of coating structure, achieved by capturing the evolution of their morphology images, plays a pivotal role in coating detection and lifetime prediction.

Image recognition technology, also known as machine vision analysis, has emerged as a promising tool for advancing research and development in various fields, including materials science23,24. Image recognition has the potential to streamline and enhance material characterization25,26, quality control27, and manufacturing processes28,29. By harnessing artificial intelligence and computer vision algorithms, this technology offers numerous possibilities for accelerating scientific discoveries, optimizing material properties, and improving efficiency in materials-related industries30,31. In the field of corrosion research, image recognition also proves to be an efficient method for analyzing corrosion patterns and assessing the corrosion condition of materials32,33,34,35. Silva et al. present 2D images produced by a confocal microscope of corrosion on copper alloy surfaces36. By calculating various parameters from these images, discernible trends in corrosion information can be obtained37. Feliciano et al. proposed the use of texture analysis for non-destructive surface corrosion monitoring in steel structures34. The authors utilize image processing algorithms to analyze corrosion patterns and assess the severity of corrosion. These studies provide insights into the application of image recognition technology in corrosion research, showcasing its potential for automated corrosion analysis and detection under complex influencing factors. Given the evident phenomenon of rapid cracking for organic coatings in deep-sea environment6, we believe that the evolution of coating surface morphology might suggest an efficient strategy for developing advanced coating detection and even lifetime prediction methods. Since the features of the pixel points in the organic coating image are similar across most areas except for cracks in a few regions, applying the current approach is challenging for organic coatings. Appropriate methods must be established to deal effectively with the characteristics of the coating images.

Herein, based on the characteristics observed in coating images, the information on structure degradation was integrated with coating performance data to establish a new “performance-structure” failure model, enabling accurate prediction of coating lifetime. First, image recognition technology incorporating convolutional neural networks (CNN) and post-processing was developed to analyze indistinguishable microscopic morphology images of epoxy mica coatings under simulated dynamic deep-sea environments. Statistical information on crack propagation was quantitatively analyzed. The results indicate that the degradation behavior was divided into three stages according to the dominant mechanisms of crack initiation and crack growth. Second, the kinetics of the crack length was used as a feature parameter of coating structure, to combine with the parameters of coating properties. Finally, the quantitative relationship between these parameters and the service life of the coating was obtained by the gray relational analysis method. This work lays the foundation for developing image-based life prediction methods by establishing a framework for analyzing the microstructural features of coatings.

Results

Morphology evolution and image recognition results of the epoxy coatings

The microscopic morphology of the epoxy mica coating surface after serving in the deep-sea pressure-fluid environment was observed, and the evolution of the cracks on the coating is taken as one of the structure features, giving that the crack propagation is directly related to the coating failure. As shown in Fig. 1a, the degradation of the epoxy mica coating surface increases as the service time increases. The coating surface experiences surface cracking failure as the main failure state. The phenomenon of cracking is often initiated from the edge of the pore at the coating surface or the mica filler/resin interface (see Fig. 1b). Subsequently, crack propagation near the pores/fillers was observed approximately at 72 h, and the propagation paths appeared to be non-directional. This evidence for deterioration is obviously responsible for the protective performance of the coating. The cracks are gradually connected to a large network at 96 h. After 120 h of service, cracks appear on the coating surface in the form of a mesh pattern. It suggests that the coating is experiencing significant degradation and may not provide effective protection to the underlying substrate. The initiation and propagation of cracks on the coating surface are important characteristics of the coating failure under deep-sea pressure-fluid condition.

Fig. 1: Morphology evolution of the coating surface immersing in the simulated deep-sea environment.
figure 1

a Typical images of the coatings at different time periods with distinctive crack characteristics. Internal stress is rapidly released through cracking, and these cracks quickly propagate and interconnect to form a vast network. The interconnected cracks ultimately result in premature failure of the coating. b Enlarged images of coating surfaces at 24 h and 96 h. The initial state and evolution of the cracking can be observed clearly.

A large number of SEM photographs of the coating surface (×500 magnification) after 12, 24, 48, 72, 96, and 120 h immersion were taken. After careful selection, 1815 valid images were acquired and used to create a preliminary image database for further research. The number of images for each time point is provided in Table 1. Some of the image database of surface morphology of epoxy coatings is shown in Supplementary Fig. 1. Subsequently, 80% of the samples were randomly selected as the training set and 20% as the testing set for each time point.

Table 1 Sample sizes of SEM images at different time and the classification accuracy by CNN

As a type of deep learning model, CNNs are specifically designed to process data that has a known grid-like topology, which are particularly effective for tasks like image recognition. The aim of image recognition in this experiment is to handle the coating photos without clear characteristics, enabling accurate and effective extraction of corresponding statistical information of cracks from the image database. Although CNNs have been widely applied in recognizing metal corrosion, there is currently no suitable CNN setup available for reference. Images of organic coatings tend to have indistinct color differences and blurred crack edges since the conductivity of organic coatings is poor. In addition, the uncertainty in the length, direction, and shape of cracks complicates the detection of crack areas. Therefore, a targeted approach containing CNN and post-processing was established for the crack area detection of coating surface. To accurately identify these cracks, 640 × 640 pixel photos of RGB channels were cropped and used as the input layer. A detailed setup for CNN and corresponding hyperparameters can be found in section of “Methods”.

The image recognition results and evaluation metric are shown in Fig. 2. First, a typical raw image at 48 h with many indiscernible cracks was taken as an example (Fig. 2a), and its identification and location results of the suspected crack area using the CNN are shown in Fig. 2b. In the figure, each blue box represents the identification of a crack (defining the category of “0” represents the crack). The accompanying number denotes the level of classification confidence. It can be seen that the values for the vast majority of cracks are close to 1, indicating a high level of recognition confidence. After the detection of crack areas, a series of post-processing were performed to extract the crack skeletons, which provides a clear visualization of the crack paths (Fig. 2c). The detailed processes are provided in the “Methods” section.

Fig. 2: Image recognition results for the surface of organic coatings servicing in the simulated deep-sea environment.
figure 2

a A typical raw image at 48 h with many indiscernible cracks. b Identification and location of the suspected crack area using the convolutional neural network. c Extractable crack features after post-processing of the image. d ROC curves of the images (class 0–class 5 represent 12, 24, 48, 72, 96, and 120 h, respectively). e Confusion matrix of the images.

To further evaluate and understand the model performance, receiver operating characteristic (ROC) curves and confusion matrix of the images are provided in Fig. 2d, e. All the ROC curves close to the upper left corner and are above the diagonal line, indicating a good prediction performance with high sensitivity and low false positive rate (FPR). From the confusion matrix results, the images have been classified well. The precision and recall metrics are shown in Table 1, and the corresponding formulas are given in the sections. Precision emphasizes the correctness of recognition, which indicates the proportion of examples classified as positive that are indeed positive. The precision value for each time point exceeds 80%, and the overall correctness of the model is 82.81%. Recall results also indicate that most of the positive cases were captured by the model, as demonstrated in Table 1. The results suggest that the model has a good classification accuracy. By utilizing the image recognition method above, crack length distribution can be accurately obtained for further analysis, which is provided in the discussion section below.

Coating adhesion evolution and the kinetics fitted by GM (1,1) model

The adhesion of the coating is a critical parameter for evaluating coating performance, which is used to construct the comprehensive failure model in the following section. Based on the macroscopic morphologies of the coatings in service at different time in Fig. 3a–d, it can be seen that the coating exhibited rapid blistering associated with a loss of coating adhesion. Few corrosion products were observed within such a short service time in this environment. The coating was severely damaged after 72 h of immersion, which directly determined the failure of the coating. Figure 3e shows the variations in the adhesion of the epoxy-mica coating in the deep-sea environment. The decline in wet adhesion of the coatings can be found during the entire test period. The values of the coating rapidly decreased from 7.20 MPa to 2.44 MPa within 72 h, exhibiting a nonlinear variation trend.

Fig. 3: Evolution of the coating adhesion to the metal substrate.
figure 3

The macroscopic morphologies of the coating surface at a 0 h, b 24 h, c 48 h, d 72 h show a rapid blistering phenomenon due to the loss of coating adhesion. e Curves of the experimental data and the fitting results by GM (1, 1) model for coating adhesion in the deep-sea environment.

Since adhesion degradation is an extremely complex process with many uncertain influencing factors, it is difficult to study the mathematical and prediction models. Gray System Theory (GST), a modern mathematical method involved in the ambiguous systems was used to study the kinetics of coating adhesion in this work. GST is suitable for the ambiguous systems which have unclear structures or unexplained principles and certain results. Herein, as the most widely used gray prediction model, GM (1,1) model was applied to calculate the raw adhesion data. Experiment data before 96 h was used for model training, and the values at 96 h and 120 h were used for predicting. More introduction and a detailed derivation of the model are provided in the “Methods” sections of the text.

Equation (1) is the function formula of coating adhesion fitted by gray GM (1, 1) model. The fitting curve and corresponding results are given in Fig. 3e and Table 2. The observation in the figure reveals that the predict values of GM (1, 1) models are in good agreement with the experimental data. The average relative error (ARE) (Eq. 28) of the model is 6.37%, suggesting that the fitted formula has a good reliability and can reflect the trend of coating adhesion very well.

$${{X}_{p}^{(0)}}_{(t)}=6.363{e}^{(-0.01245t)}$$
(1)

where \({{X}_{p}^{(0)}}_{(t)}\) is the adhesion of the coating at immersion time t, and p represents the predicted value.

Table 2 The relative error between the fitting results and the measured data for the wet adhesion of the coating

Water absorption kinetics of the coating

The transport of seawater in the coating is one of the factors that leads to the failure of the coating. The water absorption kinetics of the coating can reflect the changes in the internal defects of the coating and characterize the infiltration resistance of the coating, so it is an important parameter in evaluating the failure and destruction of the coating. Under deep-sea pressure-fluid conditions, the transport of water in the coating no longer conforms to the ideal Fick diffusion behavior. A Case II absorption diffusion behavior was used to fitted the data, which was accompanied by a considerable amount of swelling. It suggests that the water absorption of the coating is determined by the non-Fick diffusion caused by the structural relaxation of the polymer. The corresponding water absorption equation can be expressed as:

$${Q}_{t}={Q}_{\infty }(1-{e}^{(-{bt})})$$
(2)

where Qt is the water absorption of the coating at immersion time t, Q is the maximum water absorption and b is a constant. The value of b was 0.03323 through the process of fitting. The fitting results are shown in Fig. 4 and Table 3. It can be seen that the model values are in good agreement with the measured values, indicating that the water absorption kinetic equation at this time can correctly reflect the change of the water absorption rate of the coating with time in the coupled environment.

Fig. 4: Water absorption kinetics of the coating in the deep-sea environment.
figure 4

The curve was fitted by Case II absorption equation.

Table 3 Fitting results of the water diffusion behavior and the relative error

Discussion

The goal of image recognition is to consider crack length as a parameter representing the structural evolution of the coating and to contribute to the development of a life prediction model. Thus, the number of pixels occupied by the highlighted part in the image was calculated after image processing, to measure the length of the crack in the subsequent step.

The crack length distributions of the coating surface at different time are shown in Fig. 5. The length distribution has a relatively large span, and the concentrated distribution area appears at 50–2000 pixels, indicating that the degradation degrees of the coating at different time are uneven, and the crack length is mostly distributed between 50 and 2000 pixels. The statistical values of the crack show that the standard deviation of the values is very high, which could not well reflect the overall level of the estimated population. Therefore, the cumulative frequency distribution function (CDF) was introduced to calculate the histogram. The fitted cumulative distribution function can effectively reduce the error caused by the sample distribution. The CDF value (L50) corresponding to the cumulative distribution reaching 50% can effectively reflect the overall level of crack length. Therefore, the value of L50 is selected to carry out the further study.

Fig. 5: Histogram of the crack length distribution of the epoxy coating at different time.
figure 5

a 12 h, b 24 h, c 48 h, d 72 h, e 96 h, and f 120 h.

The values of L50 crack length were logarithmically processed (logged), and the logarithmic value with base 10 was returned (see Supplementary Fig. 2). Based on the results above, the corresponding frequency distribution histogram was plotted in Fig. 6 to obtain the probability density distribution function (PDF). The variation in cracks roughly went through three stages with immersion time, according to the calculated peak area and peak position at different stages, and the crack initiation and propagation were quantitatively analyzed. For the first stage (12 h, 24 h, and 48 h), the frequency distribution showed double-peak characteristics, suggesting that crack initiation and propagation occurred simultaneously. In Fig. 6, the smaller peak is defined as the crack initiation peak and is marked as P1, its peak position is x1, and the corresponding peak area is S1; the larger peak is defined as the crack propagation peak and marked as P2, the peak position is x2, and the corresponding peak area is S2. The distance between two peaks is |x2x1|. The integrated value from the start position to the first trough of the probability distribution function is defined as the area of the crack initiation peak, and the integrated value of the remaining part is the area of the crack propagation peak. The sum of the areas of the two peaks is 1. The results of the peak areas and the distance between the two peaks are given in Supplementary Fig. 3, and the total calculation results are shown in Table 4.

Fig. 6: Histogram of the crack frequency distribution of the epoxy coating at different time (after taking the logarithm).
figure 6

a 12 h, b 24 h, c 48 h, d 72 h, e 96 h, and f 120 h.

Table 4 Calculation results related to PDF of surface crack length of the coating (12–48 h)

From the above results, the area of P1 gradually increases from 12 to 48 h, and its peak position also gradually shifts to the right, indicating that crack initiation is constantly in progress, and the initiated length gradually increases. At the same time, the area of P2 gradually decreased, and the peak position gradually shifted to the left; the distance between the two peaks decreased from 1.043 to 0.625, indicating that the crack gradually transitions from the initiation stage to the propagation stage. The crack variation is dominated by crack initiation at this stage.

The distribution of the crack exhibits unimodal characteristics from 72 to 120 h. At 72 h, the horizontal axis of the peak is 3.004, which is at the center of the sample distribution. It indicates that the crack initiation peak and crack propagation peak merged into a single peak. At 96 h and 120 h, the crack initiation peak disappears, and the cracks completely enter the propagation stage. The horizontal axis of the propagation peak changes from 3.803 to 3.967, and the peak position gradually shifts to the right with time. This corresponds to the crack feature shown in Fig. 1.

Based on the above analysis, it can be considered that if the horizontal axis corresponding to the distribution peak is less than 3.004, the actual crack lengths are concentrated in the area less than 586.77 μm (1.72 pixels = 1 μm). That is, crack initiation occurs on the coating surface; if the horizontal axis is greater than 3.004, the actual crack lengths are concentrated in areas greater than 586.77 μm, and the cracks propagated on the coating surface. When the peak only appears at the position where the actual crack length is greater than 586.77 μm, the crack variation is dominated by crack propagation. The coating surface present a reticular characteristic of cracking with severe degradation. In contrast, When the peak is observed only at a position corresponding to crack lengths of less than 586.77 μm, the variation in cracks is dominated by crack initiation.

The kinetics of the crack length was then fitted to be part of the comprehensive model. At each immersion time, the crack value of L50 was converted to the actual crack length, and the dynamics of crack propagation versus the service time t was constructed. It can effectively reflect the variation pattern of the crack length on the coating surface versus time, and the results are shown in Fig. 7. Through observation of the point distribution of the value of L50 versus service time, it can be seen from the results that the point distribution of the value of L50 versus service time roughly conforms to the exponential distribution only except the value at 72 h. Therefore, the fitted dynamics characteristic equation of crack propagation is:

$${L}_{t}={L}_{0}+A{e}^{({R}_{0}t)}$$
(3)

where Lt represents the crack length in μm. The values of L0, A, and R0 were 559.16, 66.82, and 0.030, respectively. The equation can be used to represent the crack variation characteristics of the coating surface cracks at the corresponding service time. The calculation results are shown in Table 5.

Fig. 7
figure 7

Variation in the crack length on the surface of the epoxy mica coating and the fitting curve.

Table 5 Crack length of epoxy mica coatings and the fitting results

Based on the analyses above, the coating failure model can be determined by three dominant factors, including coating adhesion, water diffusion, and crack length. The first two factors represent changes in coating properties, and the length of cracks related to coating structure degradation. Therefore, the quantitative relationships of service time changing with these dominant factors can be derived from the Eqs. 13, respectively:

$${t}_{{{\rm{crack}}}}=\frac{\mathrm{ln}\left(\frac{{L}_{t}-{L}_{0}}{A}\right)}{{R}_{0}}$$
(4)
$${t}_{{{\rm{adhesion}}}}=\frac{N}{a}\frac{\mathrm{ln}[{X}^{(0)}(1)-\frac{u}{a}](1-{e}^{a})}{{X}_{p}^{(0)}(t)}+{t}_{1}$$
(5)
$${t}_{{{\rm{absorption}}}}=\frac{\mathrm{ln}\left(\frac{{Q}_{\infty }-{Q}_{t}}{{Q}_{\infty }}\right)}{-b}$$
(6)

where tcrack, tadhesion, and tabsorption represent the coating lifetime dominated by coating crack degradation, adhesion loss, and water absorption, respectively. In the Eq. 5, t1 is the initial time of the time series, N is the time interval, a and u are coefficient obtained by fitting results.

Finally, the construction of performance-structure failure model was performed. A comprehensive model combining coating properties and coating structure degradation was developed as follows:

$$\begin{array}{l}{t}_{{{\rm{total}}}}={r}_{1}{t}_{{{\rm{crack}}}}+{r}_{2}{t}_{{{\rm{adhesion}}}}+{r}_{3}{t}_{{{\rm{absorption}}}}={r}_{1}\left\{\frac{\mathrm{ln}\left(\frac{{L}_{t}-{L}_{0}}{A}\right)}{{R}_{0}}\right\}\\\qquad\quad\,+\,{r}_{2}\left\{\frac{N}{a}\mathrm{ln}\frac{\left[{X}_{(1)}^{(0)}-\frac{u}{a}\right](1-{e}^{a})}{{W}_{t}}+{T}_{1}\right\}+{r}_{3}\left\{\frac{\mathrm{ln}\left(\frac{{Q}_{\infty }-{Q}_{t}}{{Q}_{\infty }}\right)}{-b}\right\},{r}_{1}+{r}_{2}+{r}_{3}=1\end{array}$$
(7)

where r1, r2, and r3 are the corresponding weight factors. To determine the weight factor for each variable, the gray correlation method was utilized, which is a branch of gray system theory. In this method, the correlation between the factors studied is found in a random factor sequence through certain data processing from incomplete information to obtain the main affecting factors. The closeness among factors is measured according to the similarity or difference in the development trend of the factors. The detailed deduction process is given in the sections.

The weight factor is calculated based on the correlation between the lifetime and the dominant factors, which were calculated by the gray relational analysis method. After calculation, the r1, r2, and r3 values are 0.3321, 0.3450, and 0.3229, respectively. Furthermore, the predicted service time from the model were compared with the experiment values, and the results are shown in Table 6. Obviously, the predicted values of the coating life calculated by the model match well with the experimental values obtained from the experiment with an average relative error of 6.11%. In addition, the values at 96 h and 120 h were used as the group for model detection, and the average prediction error was 2.60%, indicating that the accuracy of the model is excellent. The establishment of a comprehensive “performance-structure” failure model ultimately enables accurate prediction of coating lifetime, which lays the groundwork for developing image-based methods to predict coating life.

Table 6 Predicted service time from the model and the experiment values

In summary, a performance-structure model for predicting the lifetime of epoxy coatings in deep-sea environments was proposed, based on an understanding of image recognition approaches. CNN and post-processing were integrated for crack area detection. The length distribution and statistical evolution of cracks were extracted from SEM images to derive the kinetic equation of cracks related to coating structure degradation. Subsequently, the kinetics of water diffusion and coating adhesion were examined, as they are critical parameters of coating performance. Based on this achievement, a comprehensive failure model incorporating three dominant factors was established using the gray relational analysis method, achieving excellent prediction accuracy.

Methods

Experimental materials and coating preparation

In this study, a simple epoxy resin-based model coating system was utilized. The coating consisted of E-44 epoxy resin (bisphenol A; Xingxing Synthetic Materials Co., Ltd., Nantong, China) as the binder, polyamide (TY-650; Zhengtai Anticorrosive Material Co., Ltd., Shenyang, China) as the curing agent, and xylene as the solvent, with a mass ratio of 1:0.8:0.3 for a stoichiometric reaction. The amount of a commercial mica powder (400 mesh, Shanghai Macklin Co., Ltd.) is 20 wt% of the coating (epoxy resin and the curing agent). Other reagents and solvents were purchased from Sinopharm Chemical Reagent. All chemicals and solvents were used as received. The paints were stirred at 1000 rpm for 1 h and then allowed to stand for 0.5 h to partially cure before brushing.

Two types of samples were prepared, coating/metal sample and free film sample. The coating thickness used in the experiment was 200 ± 10 μm. The thickness of free film sample was measured by a micrometer caliper, and the coating thickness of coating/metal sample was obtained by a hand-held electronic gauge (PosiTector 6000, Defelsko, USA) following the ISO 2808 standard procedures. The samples that meet the requirements were selected for the next experiments. The coating/metal sample was prepared by brushing the paint on a steel substrate, then it was cured in an oven under the conditions: 40 °C for 4 h, 60 °C for 20 h, and then room temperature (25 °C, 30% RH) for 7 days. The substrate was hot-rolled steel sheets with the following composition (in wt%): 4.67 Ni, 0.60 Cr, 0.46 Mo, 0.065 V, 0.54 Mn, 0.076 C, and Fe balance. The steel sheets were ground to 240-grit finish and then degreased and dewatered using acetone and ethanol, respectively. The surface roughness of substrate Ra (the profile arithmetic average error) was 15–20 mm. The dimensions of the steel substrate were 40 mm × 15 mm × 2 mm for the simulated deep-sea experiments. The free film sample for water absorption test was prepared by brushing the paints onto a clean silica gel plate. After curing in an oven at 40 °C for 4 h, the film was peeled off from the plate and cut into the dimensions of 75 mm × 15 mm × 0.2 mm. The film was further cured at 60 °C for 20 h and at room temperature (25 °C, 30% RH) for 7 days.

Experimental setup and performance measurements

The environmental simulation experiments were conducted using an Automatic Deep-Sea Simulation System6. Based on the composition of an autoclave, a pressurizing device, a magnetic-driving rotating device and a control device, this equipment enables precise control and simultaneous simulation of hydrostatic pressure and fluid flow conditions. The schematic diagram for the equipment is provide in Supplementary Fig. 5a. A double-decker rotating clamp design was utilized to precisely control the linear velocity of the specimen surface during service, which can simulate a specific flow rate in actual flow condition (see Supplementary Fig. 5b). The diameter of the rotating clamp disk was 88 mm with eight specimens installed equally spaced in the slots near the edge of each layer.

The deep-sea fluid-pressure condition (6 MPa, 3 m/s) was simulated in the equipment. The simulated pressure was set to 6 MPa, which corresponds to the hydrostatic pressure experienced at a depth of 600 meters in deep-sea environments. In addition, the fluid rate conducted by rotating device (specimen peripheral velocity) was maintained at 3 m/s to simulate the dynamic conditions that coatings might encounter in these environments. The experimental period lasted for 120 h. This duration was chosen to ensure sufficient exposure time for potential degradation or changes to occur. The solution temperature was kept at 25 ± 1 °C throughout the experiment. A solution of 3.5 wt% NaCl was prepared with analytical grade NaCl and distilled water. The dissolved oxygen in the solution is sufficient as air can circulate during the removal process for specimens.

The scanning electron microscope (SEM, JSM-6360LV, Japan) was used to observe and record the surface morphology of the coatings at different time. A gravimetric test was conducted to investigate the behavior of water absorption. The mass gains of free film samples were measured using a Sartorius MC5 microbalance with a resolution of 1 μg after different immersion time. Three replications were needed for each test and the averages were calculated. The adhesion of the coating to the steel substrate was measured following the guidelines of ASTM D4541-02. A Positest Pull-Off Adhesion Tester was used to obtain the adhesion values. This instrument applies a force to the coating surface until it detaches from the steel substrate, providing a quantitative measure of the adhesion strength.

Construction of the image recognition process

The Framework of the image recognition includes CNN and post-processing. First, the convolutional neural network is utilized to identify and locating the suspected crack area, which contributes to further calculation of crack length distribution. The network is composed of input layer, convolution layer, pooling layer, fully connected layer and output layer, as shown in Fig. 8. To accurately identify these cracks, 640 × 640 pixel photos of RGB channels were cropped and used as the input layer. An eight-layer CNN network with 3 convolutional layers and 3 × 3 convolution kernels in each convolutional layer is selected to train the input image. Each convolutional layer is followed by a pooling layer. The maximum pooling method is adopted and a 2 × 2 sliding filter is used to improve the efficiency of data processing. In the fully connected layer, regularized Dropout random neuron inactivation is used, and SoftMax classifier is used for classification, thereby increasing the anti-interference ability of the network and reducing over-fitting. To improve of the accuracy of crack identification, the network architecture was optimized by increasing the network depth and using multi-scale convolutional layers. The Pytorch deep learning framework was used to extract image information features in the network. During the training process, the network was iterated 100 times with a batch size of 20. The learning rate was set to 0.001, and a dropout regularization coefficient of 0.5 was used to increase the anti-interference ability of the network and reduce over-fitting. The Adam optimizer and ReLU actiation function were used in the network. The loss function was Categorical Crossentropy, and the network was trained using cross-validation.

Fig. 8
figure 8

Construction of convolutional neural networks for the suspected crack area identification.

Second, the mask of suspected crack areas was obtained from the results of CNN processing. Taking the mask and raw image as the input again, the post-processing procedure was carried out to retrieve the cracks, including the Sobel edge gradient calculation, Sobel edge detection, Hough transform and normalization. The Sobel edge gradient calculation is used to calculate the gradient intensity of the image, which helps to highlight the edges of the cracks. The Sobel edge detection algorithm is then applied to detect these edges and obtain a binary image where the cracks are represented as white pixels. The Sobel edge detection algorithm was chosen since it has a simple structure and can better suppress noise, achieving preliminary extraction of crack contours in the image. The effect of the Sobel algorithm is shown in Fig. 9. The following step is to perform the Hough transform to replace the pixels of the image into the parameter space, thereby extracting the graphic of a specific shape in the image, which is most commonly used to detect straight lines. After the Hough transform, the straight-line segments are connected to form a complete cracked skeleton, effectively representing the cracks in the image. This skeleton provides a clear visualization of the crack paths, as shown in Fig. 9. By utilizing this image recognition method, accurate and effective extraction of crack length distribution from the coating photos can be achieved. This information is crucial for the construction of a life prediction model for the coating, as it helps in understanding the extent and distribution of cracks, which are important factors in predicting the remaining useful life of the coating.

Fig. 9
figure 9

Framework of the image recognition for crack information extraction of the organic coatings.

Precision measures the correctness of crack recognition in images processed by the constructed model, which indicates the proportion of examples classified as positive that are indeed positive, namely, the proportion of all results predicted by the model to be positive samples that are truly positive. Confidence is used to determine whether an object within the bounding box is a positive or a negative sample, with greater than confidence thresholds determined to be positive samples and less than confidence thresholds determined to be negative samples (i.e., backgrounds).

The formula is as follows:

$${Precision}=\frac{{TP}}{{TP}+{FP}}$$
(8)

where True Positive (TP) is the number of positive samples recognized as positive, and False Negative (FP) refers to the number of negative samples misclassified as positive.

Compared with precision, recall emphasizes the assessment of integrity. The formula is as follows:

$${Recall}=\frac{{TP}}{{TP}+{FN}}$$
(9)

where True Positive (TP) is the number of positive samples recognized as positive, and False Negative (FN) refers to the number of positive samples misclassified as negative.

GM (1,1) model

Given the limited experimental data on coating adhesion, the GST prediction methodology leverages its inherent advantages to utilize available information effectively and forecast future trends. The white system in GST refers to a fully defined information system, while the black system represents an undefined information system. The gray system, on the other hand, combines both defined and undefined information. One of the requirements of this theory is that the original data should have equal time intervals. Data accumulation helps to reduce the influence of random factors present in the original time series data. By accumulating the data, the random fluctuations are averaged out, and the underlying trends or patterns in the data become more prominent. Once the data has been accumulated, a differential equation known as GM (n,m) is established for the generated numbers, where n denotes the order of the differential equation and m signifies the number of variables. Particularly, GM (1,1) model, which consists of a first-order differential equation and one variable, has the advantages of the simplicity of the calculation and high accuracy of the model, is suitable for the small amount of the data.

A sequence X(0) was defined as the wet adhesion values of the coatings at different immersion time, and the initial sequence is:

$$\left\{{X}^{(0)}\right\}=\left\{{{X}^{(0)}}_{(1)},{{X}^{(0)}}_{(2)},{{X}^{(0)}}_{(3)},...,{{X}^{(0)}}_{(n)}\right\}$$
(10)

where X(0) represents the wet adhesion (non-negative value), and n is the sample size of the data.

The corresponding time sequence is:

$$\{t\}=\{{t}_{1},{t}_{2},{t}_{3},...,{t}_{n}\}$$
(11)

where t is the immersion period. In practice, the sequence of the coating is:

$$\{{X}^{\left(0\right)}\}=\{\mathrm{7.20,5.21,5.02,4.36,3.25,3.10,2.44}\}$$
(12)

and its corresponding time sequence is:

$$\{t\}=\{12,24,36,48,60,72\}$$
(13)

Accumulating Generation Operator (AGO) or Inverse AGO is the precondition of the establishment of the gray model, which can smooth the randomness and strengthen the regularity of the sequence. Herein, the gray sequence generation is performed by AGO, and the monotonically increasing sequence X(1) is obtained as follows:

$$\left\{{X}^{(1)}\right\}=\left\{{{X}^{(1)}}_{(1)},{{X}^{(1)}}_{(2)},{{X}^{(1)}}_{(3)},...,{{X}^{(1)}}_{(n)}\right\}$$
(14)

where

$$\left\{{{X}^{(1)}}_{(k)}\right\}=\mathop{\sum }\limits_{i=1}^{k}{{X}^{(0)}}_{(i)},(k=\mathrm{1,2,3}\cdots n)$$
(15)

The mean sequence Z(1) of X(1) is defined as follows:

$$\left\{\begin{array}{c}{Z}^{(1)}\end{array}\right\}=\left\{\begin{array}{c}{{Z}^{(1)}}_{(1)},{{Z}^{(1)}}_{(2)},{{Z}^{(1)}}_{(3)},\cdots {{Z}^{(1)}}_{(n)}\end{array}\right\}$$
(16)

where

$${Z}_{(k)}^{(1)}=\frac{1}{2}\left[{X}_{(k)}^{(1)}+{X}_{(k-1)}^{(1)}\right],(k=\mathrm{2,3,4}\cdots n)$$
(17)

The least-square estimate sequence of the gray differential equation is as follows:

$${{X}^{(0)}}_{(k)}+a{{Z}^{(1)}}_{(k)}=u$$
(18)

Then, the GM (1, 1) whitening differential equation of X(1)(k) is as follows:

$$\frac{d{{X}^{(1)}}_{(k)}}{{dt}}+a{{X}^{(1)}}_{(k)}=u$$
(19)

where the parameters a and u, can be determined by the least-square method:

$${[a,u]}^{T}={({B}^{T}B)}^{-1}{B}^{T}{Y}_{n}$$
(20)

where

$$B={\left[-{Z}_{(1)}^{(1)},-{Z}_{(2)}^{(1)},\ldots ,-{Z}_{(n)}^{(1)};1,1,\ldots ,1\right]}^{T}$$
(21)
$${Y}_{n}={[{{X}^{(0)}}_{(2)},{{X}^{(0)}}_{(3)},...,{{X}^{(0)}}_{(n)}]}^{T}$$
(22)

By solving Eqs. (20)–(22) based on the data above, the parameters a and u of the coating is 0.1493 and 6.9756, respectively.

The solution of X(1)(k) at time k is:

$${{X}_{p}^{(1)}}_{(k)}=\left[{{X}^{(0)}}_{(1)}-\frac{u}{a}\right]{e}^{-a(k-1)}+\frac{u}{a},(k=2,3,...,n)$$
(23)

As above, p represents the predicted value. Then, to obtain the predicted value of the primitive data at time k, the Inverse Accumulating Generation Operator (IAGO) is used to establish the following GM (1, 1):

$${{X}_{p}^{(0)}}_{(k)}=\left[{{X}^{(0)}}_{(1)}-\frac{u}{a}\right]{e}^{-a(k-1)}(1-{e}^{a}),(k=2,3,...,n)$$
(24)

for

$$t={t}_{1}+N(k-1)$$
(25)

where t1 is the initial time of the time series. N is the time interval, that is 12 h. Replacing the parameter k in Eq. 23 with t, the following equation can then be obtained:

$${{X}_{p}^{(0)}}_{(t)}=\left[{X}_{(1)}^{(0)}-\frac{u}{a}\right]{e}^{-a(\frac{t-{T}_{1}}{N})}(1-{e}^{a})(t\ge {t}_{1}+N)$$
(26)

Equation (26) is the gray GM (1,1) model of coating based on GST for the wet adhesion of coatings. The measured adhesion data are calculated according to the above steps.

To analyze the accuracy of the model, the relative error (RE) and average relative error (ARE) were calculated using the following formula.

$${RE}=\frac{{X}^{(0)}(k)-{X}_{p}^{(0)}}{{X}^{(0)}(k)}\times 100 \%$$
(27)
$${ARE}=\frac{1}{n}\mathop{\sum }\limits_{k=1}^{n}\frac{\left|{X}^{(0)}(k)-{X}_{p}^{(0)}(k)\right|}{{X}^{(0)}(k)}\times 100 \%$$
(28)

Weight factors of failure model calculated by gray relational analysis

The data series that reflects the behavior characteristics of the system is called the reference series, and the data series consisting of the factors affecting the system behavior are called the comparison series. In this experiment, the low-frequency total impedance value |Z|0.01 Hz obtained from the EIS test of the coating at each time was selected as the reference series. The equivalent EIS results are shown in Supplementary Fig. 4. The crack length, wet adhesion of the coating and the water absorption of the coating at each time were defined as comparison series. These data are shown in Supplementary Table 1.

The original data of the experiment were further averaged, and then the correlation coefficient of each series was calculated as follows:

$${\xi }_{i}\left(k\right)=\frac{{\min }_{i}{\min }_{k}\left|y\left(k\right)-{x}_{i}\left(k\right)\right|+\rho {\max }_{i}{\max }_{k}\left|y\left(k\right)-{x}_{i}\left(k\right)\right|}{\left|y\left(k\right)-{x}_{i}\left(k\right)\right|+\rho {\max }_{i}{\max }_{k}\left|y\left(k\right)-{x}_{i}\left(k\right)\right|}$$
(29)
$$\begin{array}{l}{\rm{Order}}{\varDelta }_{i}(k)=\left|y(k)-{x}_{i}(k)\right|,{\rm{then}}\\\qquad\qquad\quad{\xi }_{i}\left(k\right)=\frac{{\min }_{i}{\min }_{k}{\varDelta }_{i}\left(k\right)\,+\,\rho {\max }_{i}{\max }_{k}{\varDelta }_{i}\left(k\right)}{{\varDelta }_{i}\left(k\right)\,+\,\rho {\rm{maxmax}}{\varDelta }_{i}\left(k\right)}\end{array}$$
(30)

of which ρ (0, ∞) is called the resolution coefficient. The larger the resolution coefficient is, the larger the resolving power and the smaller ρ. In general, the value range of ρ is (0,1), and the specific value depends on the situation. When ρ ≤ 0.5463, the resolution is the best, and ρ is usually set to 0.5.

Since the correlation coefficient is the value of the degree of correlation between the subseries and the parent series at each time (i.e., each point in the curve), there is more than one correlation coefficient, and the information is too scattered for overall comparison. Therefore, it is necessary to concentrate the correlation coefficients at each time (each point on the curve) to one value, that is, to find the mean value. As a quantitative expression for comparing the degree of association between the number series and the reference number series, the formula of the association degree w i is as follows:

$${w}_{i}=\frac{1}{n}\mathop{\sum }\limits_{k=1}^{n}{\xi }_{i}(k)$$
(31)

From Eq. (29), the calculation formula of the weight Factor ri is

$${r}_{i}=\frac{{w}_{i}}{{\sum }_{i=1}^{n}{w}_{i}}$$
(32)

Equation (32) is the weight factor calculated by gray relational degree method, and the results are shown in the main text.