Encoder-decoder based active learning approach for corrosion segmentation in industrial and lab environments

Abstract

Despite significant progress in corrosion monitoring, accurately targeting critical areas remains a persistent challenge due to irregular textures and environmental variability, which limit the effectiveness of traditional transfer learning approaches. To address this, this study explores the potential of optimised pool-based active learning to enhance corrosion detection. Pool-based active learning prioritises high-value samples, improving segmentation performance while reducing annotation costs by focusing on refining sample selection for corrosion-specific features rather than generic image uncertainty. Two distinct datasets were used to validate the segmentation model rigorously. The first is a laboratory-controlled dataset featuring standardised corrosion samples with precise ground-truth annotations, and the second is a site-realistic dataset captured under real-world environmental conditions. The laboratory experiments were conducted first to validate the methodology under controlled conditions, ensuring accurate segmentation against well-defined corrosion samples, before progressing to the site dataset. Experimental results demonstrate that the DeepLabv3 + model with an EfficientNet backbone, train with batch size of 16 and 50 epochs with an 80% train, 10% validation and 10% test dataset split using the Bayesian Active Learning by Disagreement (BALD) method, achieves 98% ± 0.16% pixel accuracy in controlled laboratory conditions and 87.8% ± 0.98% pixel accuracy on real-world on-site images. Furthermore, the on-site model demonstrated robust segmentation capabilities with a mean Intersection over Union (IoU) of 86.7% ± 0.28%, under challenging conditions. The findings underscore the strengths and trade-offs of active learning in corrosion detection. Future work would explore further optimisation methods to balance accuracy, efficiency, and scalability across diverse operating conditions.
 

Introduction

Corrosion is a complex and multifaceted phenomenon involving the degradation of metals through chemical reactions that form more stable compounds, such as oxides or hydroxides. This process occurs when metals encounter corrosive environments, including solid, liquid, or gaseous substances, and can be influenced by various factors such as temperature, humidity, and impurities. As a result of thermodynamic stability, metal compounds spontaneously degrade upon exposure to external factors such as moisture and oxygen, leading to the breakdown of metal structures and equipment [1]. The corrosion process can be characterised by general surface attack, localised area attack, and grain boundary attack, which arise from differences in resistance to corrosive environments, leading to preferential degradation of less noble metals [2]. These mechanisms can cause significant economic losses, equipment failures, and environmental hazards if not properly managed. The financial and ecological impacts of corrosion are substantial, with estimated annual losses of hundreds of billions of dollars. Industrial accidents, equipment failures, and contamination of potable water sources can also be the result of uncontrolled corrosion processes [3], [4].
 
In the oil and gas industries, pipelines and valves that transport oil and gas from wellheads to processing facilities are particularly vulnerable to corrosion, with an estimated annual cost of $1.372 billion [5]. In addition to the oil and gas industry, the offshore sectors are also affected by accelerated corrosion driven by high salinity, humidity, and extreme weather conditions. Without proper monitoring and maintenance, metal degradation can lead to structural failure, costly downtime, and safety hazards. A notable example is the 2022 breakaway of the mobile offshore drilling unit in Mississippi. The vessel drifted and collided with the cargo ship after a critical mooring bollard failed. Post-incident investigations revealed that the bollard exhibited significant external corrosion and steel wastage, with a reduction in wall thickness of approximately 70%. This severe thinning compromised the structural integrity of the bollard, causing it to break [6].
 
This incident highlights how undetected corrosion in key infrastructure components can lead to severe operational disruptions and financial losses. Therefore, this paper aims to contribute by improving inspection accuracy through providing a deployable, cost-effective solution for corrosion management. This optimisation establishes a scalable paradigm for real-world corrosion management by minimising annotation effort through strategic prioritisation of high-value corrosion features.
Detecting corrosion is crucial to maintaining structural integrity across industries such as oil and gas, aerospace, transportation, and construction. Corrosion can lead to costly repairs, equipment failure, and even catastrophic consequences. To prevent such outcomes, several non-destructive testing technologies have been developed to detect corrosion at an early stage [2]. Existing methods include techniques such as ultrasonic gauging, radiographic testing, electromagnetic testing, acoustic emission, electrochemical analysis, and visual inspection [2]. Ultrasonic gauging utilises sound waves to measure material thickness and monitor corrosion, whereas radiographic testing employs X-rays or gamma rays to detect internal corrosion, such as corrosion under insulation. Electromagnetic testing, such as eddy current methods, detects corrosion beneath coatings by detecting changes in conductivity. Acoustic emission detects sound signals from stressed materials, enabling the early detection of cracks and corrosion. Electrochemical tests, such as polarisation and impedance methods, are used to measure corrosion rates. Lastly, visual inspection involves capturing an image of the material surface to assess corrosion damage [7].
 
Several of these approaches have been enhanced using neural networks to tackle corrosion. Researchers have integrated various neural network approaches, including small neural networks representing top-of-the-line corrosion by integrating physics-grounded validation with optimised machine learning, providing insights for improved corrosion prevention and maintenance planning [8]. Convolutional Neural Network (CNN) are used for classifying corrosion severity from optical images of pipelines with different levels of corrosion, reducing the need for costly, disruptive manual inspections or non-vision-based evaluation techniques [9]. Vision Transformer (ViT) architectures have also shown strong potential, with semantic segmentation combined with image stitching enabling large-scale corrosion localisation and outperforming conventional CNN models such as U-Net and DeepLabV3+ [10]. Physics-informed reinforcement learnings are used to anticipate two-phase flow interfacial area in pressure vessels [11], and data-driven machine learning strategies using feedforward neural networks, gradient boosting machines, random forests, and deep neural networks, to predict and assess uniform corrosion with improved accuracy and robustness for computing future corrosion risks and supporting proactive maintenance planning [12].
 

Although these approaches offer promising solutions, the choice of approach will still depend on the specific task, operational requirements, and user experience and expertise. For structures that require constant monitoring, visual inspection remains the most efficient and cost-effective way to identify surface defects. However, data limitations can pose challenges to its successful deployment [7]. Hence, this paper proposes an encoder-decoder active learning framework for pixel-level corrosion segmentation that efficiently leverages both industrial and laboratory-acquired imagery to address the existing challenges:

  • Reduces high annotation costs while maintaining high segmentation accuracy, enabling practical deployment in real-world inspection workflows
  • Adaptability to variations in environmental conditions, such as lighting, surface texture, and noise, that can impact segmentation performance
  • Produces more fine-grained and interpretable corrosion masks, improving the detection of subtle defect regions that are often missed by standard approaches

Semantic segmentation

In recent years, many semantic segmentation methods have been proposed for detecting corrosion. Among those methods, encoder-decoder models have been dominant in corrosion segmentation [6]. Recent studies have successfully applied deep learning techniques to corrosion detection, assessment, and infrastructure inspection and maintenance, achieving exceptional performance and accuracy. For instance, N. Yala et al. utilised and compared six different semantic segmentation models on diverse

Data Preparation

Two distinct datasets were curated to evaluate the architecture performance across controlled and site environments, with consistent class definitions for Low Corrosion, High Corrosion, Structure, and Background to enable direct comparison. The varying dataset is used to test the feasibility of active learning in both site and lab scenarios, as engineers need to deal with a diverse environment. The first dataset consisted of 1,640 images, split into 80% for training, 10% for validation, and 10%

Lab sample results

An empirical evaluation was conducted on the lab dataset to assess the performance of DeepLabV3 + deployed on an RPi device. EfficientNet-B1 would be the optimal choice for evaluating the importance of data selection, given its low input size. The selected heuristics are Random, Entropy, and BALD Sampling, and the evaluation metrics are mean IoU and pixel accuracy. Fig. 9 shows the impact of data acquisition strategy on model performance.
When the model makes a prediction, the predicted image

Lab model results

The results reveal that BALD consistently outperforms Random and Entropy sampling in Mean IoU, highlighting its effectiveness at refining pixel-level segmentation. With 1250 samples, BALD achieved the highest Mean IoU of 96.28%, representing a 0.18% improvement over Random and a marginal 0.01% gain over Entropy. This confirms BALD’s strength in prioritising informative and uncertain samples, which are critical for precise boundary delineation. However, improvements in overall pixel accuracy

Summary

An optimised active learning approach was implemented and evaluated across both models, improving corrosion segmentation pixel accuracy through a pool-based methodology tailored to corrosion-specific features. This approach enhances sample selection efficiency by prioritising high-impact regions in corrosion images. However, it still requires human intervention to determine sample viability, limiting full automation. The current findings are as follows:

  • The lab sample model achieved a final mean

Credit authorship contribution statement

Zhen Qi Chee: Writing – original draft, Visualization, Validation, Methodology, Investigation, Formal analysis, Data curation, Conceptualization. Cheng Siong Chin: Writing – review & editing, Validation, Supervision, Project administration, Funding acquisition, Formal analysis. Hao Chen: Writing – review & editing, Supervision, Project administration, Funding acquisition, Formal analysis. Zi Jie Choong: Writing – review & editing, Supervision, Project administration, Funding acquisition, Formal
 

Declaration of competing interest

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
 

Acknowledgment

This research was supported by the Economic Development Board (EDB), Singapore under the Industrial Postgraduate Programme with Cetim-Matcor Technology & Services Pte Ltd, Singapore and Newcastle University, United Kingdom, in Singapore Campus. The author would also like to thank CETIM, France and CETIM-Matcor, Singapore for providing the essential data used in training the model.

References (45)

  • P. Silakorn
    Top-of-line corrosion via physics-guided machine learning: a methodology integrating field data with theoretical models
    J. Petrol. Sci. Eng.

    (Aug. 2022)

  • Z. Dang et al.
    Towards stochastic modeling for two-phase flow interfacial area predictions: a physics-informed reinforcement learning approach
    Int. J. Heat Mass Transf.
    (2022)

  • B.G. Pantoja-Rosero et al.

    Partial annotations in active learning for semantic segmentation

    Autom. Constr.
    (2024)

  • N. Perez, Electrochemistry and Corrosion Science. Cham: Springer International Publishing, 2016. doi:…

  • P.R. Roberge

    Corrosion inspection and monitoring. in Wiley series in corrosion
    (2007)

  • S. Harsimran et al.

    Overview of corrosion and its control: a critical review
    PES
    (2021)

  • L. Popoola et al.

    Corrosion problems during oil and gas production and its mitigation
    Int J Ind Chem
    (2013)

  • Gerhardus H. Koch, Jeff Varney, Neil Thompson, Oliver Moghissi, Melissa Gould, and Joe Payer, “NACE Impact Report,”…

  • National Transportation Safety Board, “Breakaway of Moored Mobile Offshore Drilling Unit VALARIS DS-16 and Subsequent…

  • A. Hussein Khalaf et al., “Emerging AI technologies for corrosion monitoring in oil and gas industry: A comprehensive…

  • B. T. Bastian, J. N, S. K. Ranjith, and C. V. Jiji, “Visual inspection and characterization of external corrosion in…

  • Z. Lu et al.

    A multilevel bridge corrosion detection method by transformer-based segmentation in a stitched view
    J Civil Struct Health Monit
    (2025)

  • C.I. Ossai

    A Data-Driven Machine Learning Approach for Corrosion Risk Assessment—A Comparative Study
    BDCC
    (2019)

  • N. Yala and N. Nacereddine, “Deep Corrosion: Semantic Segmentation Unveiled Through Advanced Learning,” in 2024 6th…

  • M. Scherff, F. Hake, and H. Alkhatib, “Adaptation Of Deeplab V3+ For Damage Detection On Port Infrastructure Imagery,”…

  • G. Csurka et al.

    Semantic image segmentation: two decades of research
    FNT in Computer Graphics and Vision
    (2022)

  • A. Steiner, A. Kolesnikov, X. Zhai, R. Wightman, J. Uszkoreit, and L. Beyer, “How to train your ViT? Data,…

  • J. Huang et al.

    A Lightweight Residual Model for Corrosion Segmentation with Local Contextual Information

    Appl. Sci.
    (Sept. 2022)

  • B. Yan et al.

    Research on the performance of the SegFormer model with fusion of edge feature extraction for metal corrosion detection
    Sci. Rep.
    (Mar. 2025)

  • A. Subedi et al.

    CorFormer: a hybrid transformer-CNN architecture for corrosion segmentation on metallic surfaces
    Mach. Vis. Appl.
    (Mar. 2025)

  • L.-C. Chen, Y. Zhu, G. Papandreou, F. Schroff, and H. Adam, “Encoder-Decoder with Atrous Separable Convolution for…

  • M. Tan and Q. V. Le, “EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks,” Proceedings of the…
There are more references available in the full text version of this article.