Deep Learning for Automated Corrosion Detection-Part 1

Max
8 min readJun 17, 2021

--

Visual inspection is a vital component of asset management that stands to benefit from automation. Using artificial intelligence to assist inspection can increase safety, reduce access costs, provide objective classification, and integrate with digital asset management systems. The automated detection of corrosion from images presents significant advantages in terms of corrosion inspections. The advantages include access to remote locations (wind turbine corrosion detection, underground pipeline corrosion detection, subsea pipeline corrosion detention, etc.), mitigation of risk of inspectors, cost savings, and detecting speed. The work presented here used deep learning convolutional neural networks to build automated corrosion detection models.

What is Corrosion?

Corrosion is defined as the deterioration of a material, usually a metal, because of reaction with its surrounding environment (Chilingarian, 1989; Popoola, Grema, Latinwo, Gutti, Balogun, 2013). The reaction can be known as the electrochemical process, which contains various solid and liquid substances. Corrosion can lead to the loss of the purity of the metal. When a metal structure undergoes corrosion, it loses its strength, and the tendency to experience structural collapse increases. For example, ships, tankers, pipelines, wind turbines, and concrete rebars are often subject to the dangerous effects of corrosion. A study by NACE [1] estimates the global annual cost of corrosion at US$2.5 trillion, which is about 3.4% of the worldwide GDP (2013). These numbers solely represent the direct costs such as forced shutdowns or accidents; neither individual safety nor environmental consequences are included. Therefore, effective corrosion control methods become highly critical in preventing the damaging effects of corrosion. Various methods are widely used in the industry to control and prevent corrosion. These methods include cathodic and anodic protection, corrosion inhibitors, material selection, application of internal and external protective coatings, corrosion monitoring, and inspections (Meresht, Farahani, & Neshati, 2011; Popoola et al., 2013; Samimi & Zarinabadi,2011). Early detection of structural degradation prior to failure does not only have financial benefits. Still, it can also prevent catastrophic collapses of structures and avoid harmful situations for both humans and the environment.

Challenges

For corrosion protection, the first step towards the maintenance of structures is the visual inspection. Nowadays, this is mainly done by humans to collect qualitative data. Despite that these inspectors are certificated and experienced, the performance of this time-consuming method is subjective and largely dependent on the experience and qualifications of the individual (Agdas et al., 2016).

On top of that, some locations of structures are difficult or completely inaccessible because of safety reasons, such as deep-sea pipelines, oil tanks, wind turbines, and some hindering constructions. In this paper, supervised learning image classification towards the detection of corrosion is investigated. The purpose of this research is to support the inspectors during the visual corrosion inspection to quickly detect corrosion through images taken by the drone reaching the inaccessible locations without bringing the inspector’s safety in danger. In addition, this research also aims to develop a human-level accuracy model for automated corrosion detection, thus increasing the visual inspection efficiency.

Data

Supervised learning utilizes ‘labeled data’ to train neural networks. Such data, which could be an image, will include identification of whether or not corrosion is present in that image. In general terms, more training data leads to better deep learning accuracy. It has been demonstrated that using more training data outperforms supervised learning models developed with more accurately labeled data, provided that the incidence of so-called adversarial labeling (i.e., incorrect labeling of training data) is low [3,4,5]. There is a need for a certain amount of data to learn a good, generalized relationship between the inputs and the desired outputs. Without the benefit of a publicly available dataset, labeling large quantities of data is the first and most important step toward developing accurate deep learning models. In this research, the dataset is labeled into two categories, which are CORROSION and NO CORROSION. The entire dataset includes a total number of 1819 images containing 990 images of CORROSION and 829 images of NO CORROSION. These images were collected from the internet and labeled by the author with a background in corrosion engineering.

All the labeled CORROSION and NO CORROSION images were collected by scraping images from google. Selenium was used to automate web browser interaction with Python. Selenium pretends to be a real user, opens the browser, moves the cursor around, and clicks buttons if you tell it to do so. Please reference this complete guide of “Image Scraping with Python” for the detailed explanation and steps with codes.

The CORROSION images were scraped from Google Images using keyword searches that include eight categories of corrosion problems, such as ‘Steel Corrosion/Rust,’ ‘Ships Corrosion,’ ‘Ship Propellers Corrosion,’ ‘Cars Corrosion,’ ‘Oil and Gas Pipelines Corrosion,’ ‘Concrete Rebar Corrosion,’ ‘Water/Oil Tanks Corrosion,’ and ‘Stainless Steel Corrosion,’ The NO CORROSION images were also scraped from Google Images using the same terms without corrosion. The following demonstrates the examples of CORROSION and NO CORROSION images in each category.

Steel Corrosion/Rust

Rust is the most common form of corrosion. Rusting is the oxidation of iron in the presence of air and moisture and occurs on surfaces of iron and its alloys (steel).

Figure 1: Corrosion and No Corrosion images of the steel plate

Ship Corrosion

The ship is one that continuously faces corrosion challenges stemming from marine environments, particularly seawater. Seawater contains a significant concentration of dissolved salts and is very corrosive to steel, infrastructures, and assets. Ship corrosion is a major hazard for the industry. The deterioration of these structures causes higher maintenance costs, early system failures, or an overall shortened service life.

Figure 2: Corrosion and No Corrosion images of the ship hull

Ship Propeller Corrosion

Propeller performance plays an important part in a ship’s operation. Therefore, maintaining propellers in a smooth and corrosion-free condition is critical to the efficient propulsion of a vessel.

Figure 3: Corrosion and No Corrosion images of the ship propeller

Car Corrosion

Most of the cars are made of steel. The rust of vehicles can make an expensive car look like a beater. It lowers the resale value of a vehicle, and if left untreated, will make your vehicle unsafe to drive.

Figure 4: Corrosion and No Corrosion images of the car

Oil and Gas Pipelines Corrosion

Corrosion is the destructive attack of a material by reaction with its environment [6] and a natural potential hazard associated with oil and gas production and transportation facilities [7]. Almost any aqueous environment can promote corrosion, which occurs under numerous complex conditions in oil and gas production, processing, and pipeline systems [8]. Crude oil and natural gas can carry various high-impurity products which are inherently corrosive. In the case of oil and gas wells and pipelines, such highly corrosive media are carbon dioxide (CO2), hydrogen sulfide (H2S), and free water [9]. Continual extraction of CO2, H2S, and free water through oil and gas components can make the internal surfaces of these components suffer from corrosion effects. Oil and gas pipeline corrosion contains several different corrosion types, which include CO2 corrosion, H2S Corrosion, oxygen corrosion, galvanic corrosion, crevice corrosion, microbiologically induced corrosion, and stress corrosion cracking. Figure 5 shows the diagrammatic representation of oxygen corrosion.

Figure 5: Corrosion and No Corrosion images of the oil and gas pipelines

Concrete Rebar Corrosion

Corrosion of reinforcing steel and other embedded metals is the leading cause of deterioration in concrete. When steel corrodes, the resulting rust occupies a greater volume than the steel. This expansion creates tensile stresses in the concrete, which can eventually cause cracking, delamination, and spalling.

Figure 6: Corrosion and No Corrosion images of the concrete rebar

Water Storage Tank Corrosion

In a water tank, the steel wall of the tank is the anode. It gives off electrons that flow into the water. The water is the cathode, and the tank’s surface is the closure circuit that connects the anode and cathode. As the electrons flow out of the steel wall of the tank, the tank corrodes. Over time, this corrosion can discolor the water and can result in leaks in the tank wall.

Figure 7: Corrosion and No Corrosion images of the water tank

Stainless Steel Corrosion

Stainless steel is one of the most durable of metals. Its mechanical properties enable its structures to remain highly resistant to rust. Stainless steel's fine layer of chromium oxide is a natural coating to protect stainless steel from corrosion. However, if this coating is attacked by certain species and damage is too extensive, corrosion can occur.

Figure 8: Corrosion and No Corrosion images of the stainless-steel fastener

Reference

[1] NACE IMPAC: ECONOMIC IMPACT. http://impact.nace.org/economic-impact.aspx

[2] J. Yosinski, J. Clune, A. Nguyen, T. Fuchs, H. Lipson, Understanding Neural Networks Through Deep Visualization, Int. Conf. Mach. Learn. — Deep Learn. Work. 2015. (2015) 12. http://arxiv.org/abs/1506.06579.

[3] W. Nash, T. Drummond, N. Birbilis, A review of deep learning in the study of materials degradation, Npj Mater. Degrad. 2 (2018) 1–12. doi:10.1038/s41529–018- 0058-x.

[4] D.E. Rumelhart, G.E. Hinton, R.J. Williams, Learning representations by back- propagation errors, Nature. 323 (1986) 533–536.

[5] Z. Cui, G. Gong, The effect of machine learning regression algorithms and sample size on individualized behavioral prediction with functional connectivity features, Neuroimage. 178 (2018) 622–637. doi:10.1016/j.neuroimage.2018.06.001.

[6] Roberge PR (2000) Handbook of corrosion engineering. McGraw-Hill, New York

[7] Kermani MB, Smith LM (1997) CO2 corrosion control in oil and gas production: design considerations. The Institute of Materials, European Federation of Corrosion Publications, London

[8] Champion Technologies (2012) Corrosion mitigation for complex environments. Champion Technologies, Houston

[9] Lusk D, Gupta M, Boinapally K, Cao Y (2008) Armoured against corrosion. Hydrocarb Eng 13:115–118

--

--