Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
79 views56 pages

Final Report - Merged

The document discusses the use of computer vision for corrosion detection in maritime environments, highlighting the significance of corrosion and its various types, causes, and effects on ships. It outlines the development of algorithms and techniques for detecting corrosion using computer vision, emphasizing the importance of effective maintenance and mitigation strategies. The project is part of a postgraduate diploma in naval construction at IIT Delhi and acknowledges contributions from various mentors.

Uploaded by

Naval Cadets
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
79 views56 pages

Final Report - Merged

The document discusses the use of computer vision for corrosion detection in maritime environments, highlighting the significance of corrosion and its various types, causes, and effects on ships. It outlines the development of algorithms and techniques for detecting corrosion using computer vision, emphasizing the importance of effective maintenance and mitigation strategies. The project is part of a postgraduate diploma in naval construction at IIT Delhi and acknowledges contributions from various mentors.

Uploaded by

Naval Cadets
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 56

USE OF COMPUTER VISION FOR CORROSION DETECTION

Guided by
LT CDR NAVNEET V SAXENA

Submitted by
LT SANJU YADAV (2024AMX5523)
SLT PRANAV SOMASEKHAR (2023AMX5503)

In partial fulfilment for the requirements of the award


of

POST GRADUATION DIPLOMA IN NAVAL CONSTRUCTION

DEPARTMENT OF APPLIED MECHANICS


INDIAN INSTITUTE OF TECHNOLOGY DELHI
HAUZ KHAS, NEW DELHI-110016

NAVAL CONSTRUCTION WING


ACKNOWLEDGEMENT

We would like to express our sincere gratitude to the following individuals who have
contributed significantly to the completion of this minor project report:

First and foremost, we extend our heartfelt thanks to Lt Cdr Navneet Saxena, for
his invaluable guidance, unwavering support, and insightful feedback throughout the
duration of this project. Their expertise and encouragement have been instrumental
in shaping the direction and quality of this work.

We are equally indebted to Cdr Subir Kumar Singh, Officer-in-Charge, whose


expertise, and constructive criticism have greatly enriched the content and
presentation of this report. His meticulous attention to detail and commitment to
excellence have been truly inspiring.

Furthermore, we extend our appreciation to Lt Cdr Kiran R, whose mentorship and


willingness to share knowledge have been immensely valuable.

Their collective contributions have been indispensable, and we are sincerely


thankful for their support.

SLt Sanju Yadav SLt Pranav S


(2023AMX5523) (2023AMX5503)
CONTENTS

1. Introduction ....................................................................................................... 1
2. Corrosion Detection Techniques ....................................................................... 7

3. Computer Vision ............................................................................................... 15

4. Corrosion Detection Algorithm Development .................................................... 21

5. Training, Testing and Results ............................................................................ 25

6. Validation of Results……………………………………………………………………31

7. Inferences and Conclusion ................................................................................ 46

8. References ........................................................................................................ 51
LIST OF TABLES

Table 2.1: Advantages and Limitations of Conventional and Computer Vision-


Based Methods…………………………………………………………….……………..13

Table 7.1: Aspect comparison of v8 and v11 models based on recorded


metrics……………………………………………………………………………………..48
LIST OF FIGURES

Figure 1.1: Different Types of Corrosion………………………………………………………...3

Figure 2.1: Visual inspection of corrosion ………………………………………………………8

Figure 2.2: Non-Destructive Testing of corrosion……………………………………………..10

Figure 2.3: Acoustic Emission Testing of corrosion……………………………………………11

Figure 3.1: Schematic diagram of a Convolutional Neural Network…………………………19

Figure 3.2: Types of Computer Vision Tools……………………………………………………20

Figure 4.1: Bounding Box Annotations………………………………………………………….23

Figure 5.1: Tasks performed by Ultrlytics……………………………………………………….26

Figure 5.2: Precision and Recall-YoloV8 model……………………………………………….27

Figure 5.3: Map Scores-YoloV8 model…………………………………………………………28

Figure 5.4: Losses-YoloV8 model……………………………………………………………….28

Figure 5.5: Precision and Recall-YoloV11 model……………………………………………...30

Figure 5.6: mAP Scores -YoloV11 model………………………………………………………30

Figure 5.7: Losses - YoloV11 model…………………………………………………………….31

Figure 5.8: Validation images for corrosion detection – YoloV11 model………………….…32

Figure 5.9: Confusion Matrix(Training Data) – YoloV11 model………………………………33

Figure 5.10: Confusion Matrix(Testing Data) – YoloV11 model………………………………33

Figure 6.1: Corrosion Detection Instances – Above Water Dataset……………...………….37

Figure 6.2: Distribution of Confidence Scores – Above Water Dataset…… …….………..37

Figure 6.3: Distribution of Confidence Scores – Underwater Dataset………...……………..39

Figure 6.4: Corrosion Detection Instances – Underwater Dataset……………………………40

Figure 6.5: Corrosion Detection using video input- General Corrosion Detection…………..43

Figure 6.6: Corrosion Detection using video input- Underwater Input ……………………….44

Figure 6.7: Overall Video Processing Statistics (Underwater Video Input)………..…………45


Introduction Use of Computer Vision for Corrosion Detection

CHAPTER-1

INTRODUCTION

1.1 Corrosion is a natural and inevitable process that occurs when materials,
particularly metals, interact with their environment, leading to their gradual degradation.
In the maritime industry, corrosion poses a critical challenge due to the harsh and highly
corrosive nature of the marine environment. Factors such as saltwater, high humidity,
and fluctuating temperatures accelerate the deterioration of ships and marine structures.
This degradation compromises their structural integrity, safety, and operational
efficiency, resulting in increased maintenance costs and potential safety hazards.
Corrosion not only affects the lifespan of ships but also has far-reaching implications for
the maritime sector, including economic losses and environmental risks. The marine
environment is uniquely aggressive, with saltwater acting as a highly conductive
electrolyte that facilitates various types of corrosion. Ships are constantly exposed to
seawater spray, immersion, and atmospheric moisture, creating ideal conditions for
corrosion to thrive. Temperature variations and the presence of dissolved oxygen and
other corrosive agents exacerbate the problem. Corrosion can manifest in several forms,
each with distinct causes and effects. Understanding these types is essential to
developing effective strategies to mitigate their impact.

Causes of Corrosion in Ships.

1.2 The primary cause of corrosion in ships is the exposure of metal surfaces,
particularly steel, to the marine environment. The high salinity of seawater accelerates
electrochemical reactions, leading to the breakdown of metallic bonds. Additionally,
oxygen dissolved in water promotes oxidation, while temperature variations and
microbial activity further exacerbate the process. Poor maintenance practices, improper
coatings, and the presence of dissimilar metals can also contribute to accelerated
corrosion.

Types of Corrosion in Ships.

1.3 Uniform Corrosion. Uniform corrosion occurs evenly across the


surface of a metal, leading to a consistent reduction in thickness. This type of
corrosion is the most predictable and, therefore, easier to manage and mitigate. It
typically affects metals with a homogeneous composition that are exposed to
uniform environments, such as air or water.[1] While it weakens the material over

1 Naval Construction Wing, IIT Delhi


Introduction Use of Computer Vision for Corrosion Detection

time, it is relatively straightforward to detect using visual inspections or thickness


measurement tools. Preventive measures include applying protective coatings like
paint or plating, using corrosion-resistant materials, or employing cathodic
protection systems.

1.4 Pitting Corrosion. Pitting corrosion is a highly localized form of


corrosion characterized by small pits or holes that form on the metal's surface.
Though the overall surface may appear intact, these pits can penetrate deeply into
the material, significantly compromising its strength. Chloride ions, often found in
seawater, are a common cause of pitting corrosion. This type of damage is
particularly dangerous as it can progress unnoticed until catastrophic failure occurs.
Advanced inspection techniques, such as ultrasonic testing or X-ray imaging, are
necessary for detection.[2] To prevent pitting corrosion, materials with high
resistance to pitting, such as certain grades of stainless steel, can be used, and
environmental factors, like chloride concentrations, should be carefully controlled.

1.5 Galvanic Corrosion. Galvanic corrosion arises when two dissimilar


metals come into electrical contact in the presence of an electrolyte, such as
seawater. In this process, the more electrochemically active metal (the anode)
corrodes faster, while the less active metal (the cathode) is protected. The severity
of this corrosion depends on the difference in the metals' positions in the galvanic
series and the environmental conditions. A common example is the corrosion of
aluminum rivets in steel structures. To prevent galvanic corrosion, engineers often
avoid direct contact between dissimilar metals by using insulating materials or
coatings. Sacrificial anodes, such as zinc, can also be employed to protect more
critical structures.[3]

1.6 Crevice Corrosion. Crevice corrosion occurs in confined spaces,


such as joints, bolts, or overlaps, where stagnant micro-environments form. Within
these crevices, conditions such as differential oxygen levels and the buildup of
acidic or chloride-rich solutions promote localized corrosion. This type of corrosion
is challenging to detect because it occurs in hidden areas and can cause significant
damage before it becomes apparent. Preventive measures include designing
structures to eliminate crevices, using welding instead of bolting, employing non-
absorbent gaskets or sealants, and selecting materials that are resistant to this form
of attack.

1.7 Stress Corrosion Cracking (SCC). Stress corrosion cracking is a


dangerous phenomenon that occurs when a material is exposed to a combination
of tensile stress and a corrosive environment. Cracks typically begin at microscopic
flaws on the surface and grow over time, potentially leading to sudden and
catastrophic failure. SCC is commonly seen in materials like stainless steel and

2 Naval Construction Wing, IIT Delhi


Introduction Use of Computer Vision for Corrosion Detection

certain high-strength alloys, especially in environments containing chlorides or


caustic substances. This form of corrosion is particularly hazardous because it often
provides little to no warning before failure occurs. Advanced inspection techniques,
such as dye penetrant testing or X-ray imaging, are used to detect SCC. Reducing
tensile stress through design changes, heat treatments, or selecting materials
resistant to SCC can help mitigate the risk.

1.8 Microbiologically Influenced Corrosion(MIC). Microbiologically


influenced corrosion occurs when microorganisms, such as bacteria or fungi,
accelerate the corrosion process. These organisms form biofilms on the surface of
metals, creating localized environments that facilitate corrosion. Sulfate-reducing
bacteria (SRB) are particularly harmful as they produce hydrogen sulfide, which can
severely degrade metals. MIC is commonly observed in pipelines, water systems,
and marine environments. It can cause rapid and localized damage, drastically
reducing the service life of equipment.[4] Managing MIC involves regular inspection
using microbial activity tests and surface sampling, the use of biocides to control
microbial growth, and frequent cleaning to prevent biofilm formation. Selecting
materials resistant to microbial attack is also an effective strategy.

Fig 1.1: Different Types of Corrosion[5]


Source: https://civiconcepts.com/blog/types-of-corrosion

1.9 Effects of Corrosion on Ships. The impact of corrosion on ships is


multifaceted, with wide-ranging consequences that affect operational efficiency,
safety, economic viability, and environmental sustainability. Corrosion weakens the
ship's structural components, particularly the hull, leading to a gradual loss of
strength and, in severe cases, catastrophic structural failures. This can compromise
the vessel's ability to withstand the stresses of the marine environment, such as
rough seas, high winds, and heavy cargo loads. A weakened hull not only endangers

3 Naval Construction Wing, IIT Delhi


Introduction Use of Computer Vision for Corrosion Detection

the ship and its crew but also poses significant environmental risks, such as oil spills
or the release of hazardous substances, which can have devastating ecological
consequences. Beyond structural concerns, corrosion negatively impacts the
performance and functionality of critical components, such as propellers, rudders,
and cargo tanks. Damage to these elements can reduce the vessel's
maneuverability, impair propulsion systems, and lead to inefficiencies in cargo
handling and storage. For example, corroded cargo tanks may become prone to
leaks or contamination, jeopardizing the quality of goods being transported.
Similarly, corroded rudders and propellers can diminish the ship's speed and fuel
efficiency, increasing operational costs and environmental emissions.

1.10 Economic repercussions are another major consequence of corrosion. The


need for frequent maintenance and repairs significantly drives up operating costs, while
the shortened lifespan of corroded vessels necessitates costly replacements.
Unscheduled downtime caused by corrosion-related issues disrupts shipping
schedules and delays cargo delivery, leading to financial losses and potential damage
to the shipping company's reputation. The cumulative economic impact of corrosion on
the maritime industry is immense, with billions of dollars spent annually on repairs,
replacements, and preventative measures.[6]
1.11 Safety is perhaps the most critical aspect of corrosion's impact on ships. The
compromised integrity of structural components and essential systems increases the
likelihood of accidents, endangering the lives of the crew and passengers. Corrosion-
related failures can lead to onboard fires, flooding, or even capsizing, with devastating
consequences. Moreover, when carrying hazardous cargo, such as oil, chemicals, or
liquefied natural gas, corrosion-induced breaches in containment systems can result in
large-scale disasters with far-reaching effects.

Mitigation Strategies.

1.12 Protective Coatings. Protective coatings are one of the most


effective and widely used methods for preventing corrosion. By applying high-
quality paints and coatings, a barrier is formed between the metal surface and
the corrosive environment, shielding it from moisture, oxygen, and other corrosive
agents. Specialized coatings, such as anti-corrosion paints, are designed to resist
chemical and physical damage, enhancing their durability in harsh marine
conditions. Additionally, anti-fouling paints are used to prevent the growth of
marine organisms like algae, barnacles, and mussels on the hull. These
organisms can trap moisture and create localized areas of corrosion. Modern
advancements have introduced coatings with enhanced performance, such as
self-healing polymers that repair small scratches and abrasions automatically,
further extending their lifespan. Proper surface preparation before application is
critical to ensuring the coating adheres effectively, providing long-lasting
protection.

4 Naval Construction Wing, IIT Delhi


Introduction Use of Computer Vision for Corrosion Detection

1.13 Cathodic Protection. Cathodic protection is a proven


electrochemical method for controlling corrosion in ships and marine structures.
This technique works by making the metal structure act as a cathode, which
inhibits its corrosion. There are two primary types of cathodic protection:
sacrificial anodes and impressed current systems. Sacrificial anodes are made
from more reactive metals, such as zinc, aluminum, or magnesium, which corrode
preferentially, thereby protecting the ship's steel surfaces. These anodes are
strategically placed on the ship’s hull, propellers, or other submerged
components.[7] Alternatively, impressed current systems use an external power
source to provide a consistent flow of protective current, offering more control
over the corrosion prevention process. Regular monitoring and replacement of
sacrificial anodes or maintenance of impressed current systems are crucial for
sustained effectiveness.

1.14 Material Selection. Choosing the right materials for shipbuilding


and components is another fundamental strategy for mitigating corrosion.
Corrosion-resistant materials, such as stainless steel, copper-nickel alloys, and
titanium, are specifically designed to withstand harsh marine environments. These
materials either naturally form a protective oxide layer or are alloyed to enhance
their resistance to corrosion. For example, stainless steel contains chromium,
which reacts with oxygen to create a thin, self-repairing oxide film that protects
the surface from further corrosion. While these materials can be more expensive
than standard steels, their durability and reduced maintenance costs make them
cost-effective over the ship’s lifecycle. Engineers must carefully select materials
based on their specific application, exposure conditions, and mechanical
requirements to maximize their performance.

1.15 Regular Maintenance. Routine maintenance is essential for detecting


and addressing corrosion before it causes significant damage. Regular
inspections of critical areas, such as the hull, cargo tanks, rudders, and propellers,
can identify early signs of corrosion, such as pitting, discoloration, or surface
roughness. Non-destructive testing methods, such as ultrasonic thickness
gauging, X-ray imaging, or dye penetrant testing, are often employed to evaluate
the extent of corrosion without damaging the structure. Timely repairs, such as
cleaning, recoating, or replacing corroded parts, help maintain the structural
integrity of the ship. Maintenance schedules should be strictly followed, and
records of inspections and repairs should be kept to track the ship’s condition over
time. Neglecting maintenance can lead to accelerated corrosion, increasing the
risk of costly downtime, structural failure, and safety hazards.

5 Naval Construction Wing, IIT Delhi


Introduction Use of Computer Vision for Corrosion Detection

1.16 Environmental Controls. Managing the environmental conditions


around the ship can significantly reduce the rate of corrosion. For example,
minimizing exposure to corrosive elements like saltwater and high humidity is key
in reducing the overall impact of the marine environment. Dehumidifiers or
ventilation systems can be used in cargo holds and other enclosed spaces to
maintain low humidity levels, preventing the formation of condensation that
promotes corrosion. Similarly, sealing joints and overlaps to prevent the ingress
of seawater or moisture into confined areas reduces the likelihood of crevice
corrosion. Environmental controls also extend to protective measures during
storage or downtime, such as using covers or coatings to shield the ship from rain,
salt spray, or chemical exposure. These proactive measures help mitigate
environmental contributions to corrosion.

1.17 Corrosion Inhibitors. Corrosion inhibitors are chemical compounds


designed to slow down or prevent corrosion by forming a protective film on metal
surfaces. These inhibitors work by reacting with the metal surface or the corrosive
environment to reduce the electrochemical reactions that drive corrosion.
Commonly used in cooling systems, ballast tanks, and pipelines, corrosion
inhibitors can be added directly to the water or other operating fluids.[8] For
example, in seawater cooling systems, inhibitors containing chromates or
phosphates form a protective layer on metal surfaces, preventing chloride ions
from causing damage. The selection of an appropriate inhibitor depends on the
type of metal, the environment, and the operating conditions. Regular monitoring
of inhibitor concentrations is necessary to ensure optimal performance, as
improper usage or dilution can reduce their effectiveness.

Conclusion.

1.18 Corrosion in ships is a major challenge caused by saltwater, humidity,


and harsh marine conditions, leading to structural degradation, costly repairs, and
environmental risks. Addressing corrosion is essential for ensuring vessel safety,
efficiency, and longevity. Preventative measures include selecting corrosion-
resistant materials like stainless steel and applying protective coatings to shield
metal surfaces. Anti-fouling paints prevent marine organism buildup, while cathodic
protection, using sacrificial anodes or impressed currents, safeguards submerged
components. Regular inspections, non-destructive testing, and timely maintenance
ensure early detection and repair of corrosion. Environmental controls, such as
dehumidifiers and ventilation, minimize moisture exposure, while corrosion
inhibitors protect metal in critical systems. Proactive corrosion management
reduces costs, extends vessel lifespans, and promotes sustainable maritime
operations, protecting both the industry and the environment.

6 Naval Construction Wing, IIT Delhi


Corrosion Detection Techniques Use of Computer Vision for Corrosion Detection

CHAPTER-2

CORROSION DETECTION TECHNIQUES

2.1 Over the years, there has been an increased level of concern from both the
public and regulatory authorities over the integrity and reliability of various corrosion
detection methods. This is important because corrosion and its effects are well
documented and they have been known to affect various industries and institutions such
as manufacturing, transportation, and healthcare. Various methods and technologies
have been developed and are currently being used in the detection and assessment of
corrosion in a wide range of equipment and structures. Some of these methods have
been used for many years and in many cases, they have become the "traditional" option
and set the standard to which newer technologies are compared. Studies are ongoing
to validate and optimize these traditional methods and similarly, there is ongoing
research in new techniques and technologies. Broadly speaking, corrosion detection
methods are either "passive", relying on the corrosion process to manifest itself as a
visible or measurable effect, such as increased mass loss, or "active", where a physical
or chemical process is initiated, and the subsequent response is measured. Visual
inspection, electrochemical techniques, ultrasonic testing, and X-ray radiography are all
examples of "active" methods, and these are brough out in the report. The requirement
for the assessment of corrosion in safety critical components and structures is the prime
driver in the development and application of new and improved detection technologies.
This is reflected in the increasing trend towards alternatives to the more commonly used
traditional methods, which often require the removal of material coatings and/or access
to both sides of the structure to conduct tests. The development of non-invasive,
efficient, and cost-effective technologies will be necessary for the implementation of any
new strategy for assessments of both new and existing materials and structures.

Traditional Methods.

2.2 Visual Inspection. Visual inspection is the simplest and most


commonly used method for detecting corrosion. It involves visually examining
metal surfaces for signs of rust, discoloration, pitting, or other indications of
degradation. This can be performed using the naked eye, magnifying glasses,
or specialized optical instruments like borescopes. While it is cost-effective and
easy to implement, visual inspection is subjective and limited to surface-level
detection, making it suitable primarily for identifying obvious corrosion or
defects. To improve accuracy, it is often combined with other diagnostic

7 Naval Construction Wing, IIT Delhi


Corrosion Detection Techniques Use of Computer Vision for Corrosion Detection

techniques.

Fig 2.1: Visual inspection of corrosion[10]


Source: Copyright 2009-Dennis Wingert www.sanevictory.org

2.3 Physical measurements. Physical measurement techniques are


used to assess the thickness of metal components and identify areas of
corrosion-induced thinning. Tools such as thickness gauges and calipers
measure the material's remaining thickness to determine the extent of
degradation. Advanced instruments, such as ultrasonic thickness gauges and
magnetic thickness gauges (e.g., magnetic induction and eddy current), offer
non-invasive methods to evaluate corrosion. These tools are particularly
effective for monitoring structural elements like hull plates, pipelines, and
storage tanks, where uniform material loss or pitting corrosion may occur.

2.4 Chemical Analysis. Chemical analysis involves collecting samples


from corroded surfaces and analyzing them to determine the composition of
corrosion products and underlying degradation mechanisms. Techniques such as
spectroscopy and chromatography can identify compounds like iron oxides or
sulfides, providing insight into the environmental factors causing corrosion. [9]
Chemical analysis is particularly useful for understanding localized corrosion
phenomena, such as pitting or microbiologically influenced corrosion, and for
guiding the selection of mitigation strategies.

2.5 Electrochemical Methods. Electrochemical methods assess the corrosion


susceptibility or rate of materials by analyzing their electrochemical properties.
Techniques like potentiodynamic polarization and electrochemical impedance
spectroscopy (EIS) measure parameters such as corrosion current density and
resistance, providing valuable data about the corrosion process. Corrosion potential

8 Naval Construction Wing, IIT Delhi


Corrosion Detection Techniques Use of Computer Vision for Corrosion Detection

measurement is another electrochemical technique that monitors the


electrochemical behavior of metals in real-time. These methods are highly sensitive
and provide quantitative insights, making them essential for studying corrosion
mechanisms and evaluating protective coatings or inhibitors.

Non-Destructive Testing.

2.6 Non-destructive testing (NDT) techniques allow for evaluating the integrity of
materials and detecting corrosion damage without causing harm to the component.
These methods are particularly valuable for assessing critical structures where
physical testing or sample removal is impractical.

2.7 Ultrasonic Testing (UT). Ultrasonic testing uses high-frequency sound


waves to detect internal defects and measure material thickness. The sound waves
are transmitted into the material, and their reflections are analyzed to identify
irregularities or corrosion-induced thinning. This method is highly effective for
detecting subsurface defects and is widely used for inspecting ship hulls, pipelines,
and structural components.

2.8 Radiographic Testing (RT). Radiographic testing employs X-rays or


gamma rays to inspect the internal structure of materials and detect corrosion-
induced defects, such as cracks or voids. The radiation penetrates the material, and
the resulting image reveals internal discontinuities. Radiographic testing is highly
accurate and suitable for examining welds, pipelines, and structural elements where
internal corrosion is a concern.

2.9 Magnetic Particle Testing (MPT). Magnetic particle testing is used to


detect surface and near-surface defects in ferromagnetic materials. A magnetic field
is applied to the material, and magnetic particles are spread over the surface.
Defects cause disturbances in the magnetic field, attracting the particles and making
the defects visible. MPT is effective for detecting cracks, pits, and other surface
irregularities caused by corrosion.

2.10 Eddy Current Testing (ECT). Eddy current testing relies on electromagnetic
induction to detect surface and near-surface defects in conductive materials. An
alternating current is passed through a coil, creating a magnetic field that interacts
with the material. Variations in the induced eddy currents reveal defects and
changes in material thickness. ECT is widely used for inspecting heat exchanger
tubes, aircraft components, and marine structures due to its precision and ability to
detect corrosion in inaccessible areas.

9 Naval Construction Wing, IIT Delhi


Corrosion Detection Techniques Use of Computer Vision for Corrosion Detection

Fig 2.2: Non-Destructive Testing of corrosion[10]


Source: Copyright 2009-Dennis Wingert www.sanevictory.org

2.11 Dye Penetrant Testing. Dye penetrant testing is a surface-


level inspection method that identifies cracks, pores, and other defects on
a material's surface. The process involves cleaning the surface and
applying a liquid dye, which seeps into any cracks or flaws. After a specified
dwell time, the excess dye is removed, and a developer is applied to draw
out the dye trapped in the defects, making them visible. [11] This technique
is simple, cost-effective, and widely used for detecting surface irregularities
in non-porous materials. While it is limited to surface defects, DPT is
particularly useful for inspecting welds, joints, and other critical areas prone
to corrosion.

2.12 Acoustic Emission Testing. Acoustic emission testing detects


transient elastic waves produced by crack growth, material deformation, or
corrosion-related processes within a structure. When materials experience
stress or undergo corrosion-induced degradation, they emit high-frequency
acoustic waves. Sensors placed on the surface of the component capture these
signals, which are then analyzed to identify the location and severity of the
damage. AET is particularly valuable for monitoring active corrosion processes
and assessing the structural integrity of large components under load, such as
pressure vessels, storage tanks, and ship hulls. It provides real-time data and
helps predict potential failures, enabling timely corrective actions.

10 Naval Construction Wing, IIT Delhi


Corrosion Detection Techniques Use of Computer Vision for Corrosion Detection

Fig 2.3: Acoustic Emission Testing of corrosion[12]


Source: https://www.asce.org

Computer-Vision Based Methods.

2.13 Computer vision techniques enable machines to interpret, analyze, and


process visual information from the world, mimicking human vision in many applications.
These techniques combine image processing, pattern recognition, and machine
learning to extract meaningful data from images and videos. Fundamental processes
include object detection, classification, segmentation, and tracking, which can be
applied across industries. For example, in the maritime sector, computer vision can
detect corrosion or cracks on ships, while in healthcare, it assists in diagnosing diseases
through medical imaging. The evolution of advanced algorithms and deep learning
models has significantly enhanced the accuracy and efficiency of these techniques,
allowing real-time processing and increasingly complex analyses.

2.14 Colour-Based Segmentation. Color-based segmentation is a


foundational technique in computer vision, used to divide an image into meaningful
regions based on colour similarities. This method relies on selecting a suitable
colour space, such as RGB, HSV, or LAB, and applying algorithms like thresholding
or clustering to isolate regions of interest. For example, in detecting rust on metal
surfaces, areas with reddish-brown hues can be segmented and analyzed
separately. The simplicity of this approach makes it widely applicable, from
agricultural monitoring to biomedical imaging. However, its performance can be
influenced by lighting conditions, shadows, or variations in object colours,
necessitating preprocessing steps to improve robustness.

2.15 Image Processing Techniques. Image processing techniques form the


backbone of computer vision, encompassing a wide array of methods for enhancing
and analyzing images. These methods include noise reduction through filtering,

11 Naval Construction Wing, IIT Delhi


Corrosion Detection Techniques Use of Computer Vision for Corrosion Detection

edge detection to highlight boundaries, morphological operations to refine shapes,


and feature extraction to identify key patterns. For instance, edge detection
algorithms like Canny or Sobel are widely used to detect structural cracks or
contours. Image processing is essential for preparing data for advanced analysis,
often serving as a precursor to machine learning or deep learning models. Its
versatility makes it integral to tasks like object recognition, defect detection, and
image enhancement in diverse fields.

2.16 Texture Analysis. Texture analysis is a technique used to quantify the


spatial arrangement and variation of pixel intensities in an image, providing
information about patterns, roughness, or uniformity. By extracting features such as
contrast, entropy, and homogeneity, texture analysis can characterize surfaces or
materials. This method is widely used in applications like defect detection in
industrial settings, where irregular textures may indicate flaws, or in medical
imaging, where texture features can distinguish between healthy and diseased
tissues. Texture analysis offers a deeper understanding of an image’s properties
and is often combined with other techniques for comprehensive evaluations.

2.17 Semantic Segmentation. Semantic segmentation is a sophisticated


computer vision method that assigns a label to every pixel in an image, classifying
it as part of a specific object or region. Unlike object detection, which provides
bounding boxes, semantic segmentation delivers precise, pixel-level information.
For example, in autonomous vehicles, it differentiates roads, sidewalks, and
pedestrians to enable safe navigation. Similarly, in healthcare, it helps identify
tumors or organs in medical scans. Semantic segmentation is powered by advanced
deep learning models like Fully Convolutional Networks (FCNs) and U-Net, making
it a critical tool for applications requiring high precision and contextual
understanding.

2.18 Deep Learning-based Object Detection. Deep learning-based object


detection involves using convolutional neural networks (CNNs) to locate and classify
objects within an image by predicting bounding boxes and associated class labels.
These methods are highly effective due to their ability to learn hierarchical features
directly from raw data. Models such as YOLO (You Only Look Once), Faster R-
CNN, and SSD (Single Shot Detector) have made object detection more accurate
and efficient, even in real-time scenarios. Applications range from surveillance
systems identifying intruders to defect detection in manufacturing and medical
diagnostics. The scalability and adaptability of these methods have transformed
computer vision, enabling machines to interpret complex visual environments with
remarkable precision.

12 Naval Construction Wing, IIT Delhi


Corrosion Detection Techniques Use of Computer Vision for Corrosion Detection

Table 2.1: Advantages and Limitations of Conventional and Computer Vision Based
Methods

Methods Advantages Limitations


Conventional Established Reliability Limited Coverage
Methods and Depth
Real-Time Results Limited Sensitivity
Versatility Limited Automation
Accessibility Subjectivity
Cost-Effectiveness Dependence on
Operator Skill
Compatibility with Surface Preparation
Regulations Requirements
Computer Visual Inspection Data Quality and
Vision- Automation Variability
Based Quantitative Analysis Ethical and Privacy
Methods Concerns
Adaptability to Various Hardware and
Environments Computational
Resources
Integration with Annotated Data
Sensor Networks Requirement
Data-driven Decision Interpretability and
Making Explainability
Accuracy and Generalization to
Consistency New Environments

Conclusion.

2.19 Corrosion detection is a critical aspect of maintaining the safety, reliability,


and longevity of structures and equipment across industries. This chapter explored both
traditional and computer vision-based methods for corrosion assessment, highlighting
their respective advantages, limitations, and applications. Traditional methods, such as
visual inspection, electrochemical techniques, and non-destructive testing, remain vital
due to their established reliability and widespread acceptance. However, these
methods often require extensive operator involvement, surface preparation, or access
to both sides of a structure, which can limit their efficiency and applicability in complex
environments.

2.20 On the other hand, computer vision-based methods, driven by advancements


in artificial intelligence and deep learning, offer new possibilities for automation,
precision, and scalability. Techniques such as semantic segmentation, texture analysis,
and deep learning-based object detection provide quantitative and data-driven insights,

13 Naval Construction Wing, IIT Delhi


Corrosion Detection Techniques Use of Computer Vision for Corrosion Detection

enabling more efficient and accurate corrosion detection. Despite their potential, these
methods face challenges, including computational demands, data variability, and the
need for annotated datasets to train models.

14 Naval Construction Wing, IIT Delhi


Computer Vision Use of Computer Vision for Corrosion Detection

CHAPTER-3

COMPUTER VISION

3.1 Computer vision is a field of artificial intelligence that trains computers to interpret
and understand the visual world. Using digital images from cameras and videos and
deep learning models, machines can accurately identify and classify objects and then
react to what they "see." This technology is not only limited to detecting the objects of
the image, but it can also extract the text and other relevant information from the images.
This ability makes computer vision truly interdisciplinary. It is a mix of multiple fields like
image processing, machine learning, data science, physics, etc. The goal of computer
vision is to replicate the complexity of human vision. Whenever we "see" something, our
brain performs an enormous amount of computational work to interpret that visual input
and provide us with a solution or result; so, does the computer vision. Therefore,
computer vision not only continues to influence and shape medical and biological
research, but the corrosion detection field too. These include better and more flexible
methodologies for image analysis, from feature detection to neural networks; an
increasing prevalence of machine learning, which is both facilitating and enhanced by
the acquisition of large datasets and better approaches to the 3D surface restoration
from 2D images.[11]

Computer Vision Fundamentals.

3.1 Image Acquisition. Image acquisition is the process of capturing


visual data from the real-world using imaging devices such as cameras, scanners,
or sensors. It involves converting physical scenes into digital images that can be
processed and analysed by computers. Image acquisition is a fundamental step in
computer vision, remote sensing, medical imaging, surveillance, and various other
applications where visual information plays a crucial role.[11]

3.1.1 Imaging Devices. Image acquisition begins with the selection of


suitable imaging devices based on the application requirements. Common
imaging devices include digital cameras, webcams, smartphones, thermal
cameras, LiDAR sensors, and satellite imaging systems.

3.1.2 Optics. Optics play a crucial role in image acquisition by focusing


light onto the imaging sensor or film. Lens parameters such as focal length,
aperture size, and optical distortion affect the quality and characteristics of
the captured images.

3.1.3 Sensors. Imaging sensors convert light energy into electrical


signals, which are then digitized and stored as digital images. Common types

15 Naval Construction Wing, IIT Delhi


Computer Vision Use of Computer Vision for Corrosion Detection

of sensors include charge-coupled devices (CCDs) and complementary


metal-oxide-semiconductor (CMOS) sensors. Each sensor type has its own
characteristics in terms of sensitivity, noise level, dynamic range, and
resolution.

3.1.4 Image Formation. When light from the scene enters the imaging
system through the lens, it forms an image on the sensor or film plane.
Factors such as exposure time, aperture size, and ISO sensitivity determine
the amount of light captured and the resulting image quality.

3.1.5 Colour Reproduction. Imaging devices can capture images in


grayscale or colour. Colour reproduction involves accurately capturing and
representing the colours present in the scene. This is achieved through
colour filter arrays (e.g., Bayer filter), which separate light into different colour
channels (e.g., red, green, blue) for digital colour imaging.

3.1.6 Resolution. Resolution refers to the level of detail captured by


an imaging device and is typically quantified in terms of the number of pixels
in the image. Higher resolution images contain more detail but may require
larger storage and processing resources.

3.1.7 Sampling and Quantization. Analog signals captured by imaging


sensors are sampled at discrete intervals and quantized into digital values.
Sampling determines the spatial resolution of the image, while quantization
determines the bit depth or dynamic range of pixel values, affecting the
image's colour depth and contrast.

3.1.8 Image Formats. Digital images are typically stored in various file
formats such as JPEG, PNG, TIFF, or RAW. Each format has its own
compression algorithm, metadata, and compatibility with different
applications and platforms.

3.2 Image Preprocessing. Image preprocessing refers to the manipulation


and enhancement of raw image data to prepare it for further analysis or processing
tasks. It involves a series of operations applied to the image to improve its quality,
reduce noise, enhance features, and make it more suitable for the intended
application.

3.3 Feature Extraction. Feature extraction involves identifying and


extracting relevant information or patterns from raw image data. These features
capture important characteristics of the image that are useful for subsequent
analysis, classification, or recognition tasks. Feature extraction is essential for
reducing the dimensionality of image data, highlighting meaningful information, and
enabling efficient and effective processing.

16 Naval Construction Wing, IIT Delhi


Computer Vision Use of Computer Vision for Corrosion Detection

3.3.1 Intensity Based Features. Intensity-based features capture


information related to pixel intensity values in the image. These features
provide insights into the overall brightness and contrast of the image.

3.3.2 Edge Detection. Edge detection techniques identify abrupt


changes in pixel intensity, which often correspond to object boundaries or
significant image structures.

3.3.3 Corner Detection. Corner detection algorithms identify key points in


the image where pixel intensity variations occur in multiple directions.
Corners are useful for image registration, object tracking, and feature-based
matching.

3.3.4 Texture Analysis. Texture features describe the spatial


arrangement and variation of pixel intensities within localized regions of the
image. Texture analysis techniques capture characteristics such as
smoothness, roughness, and regularity of textures in the image.

3.3.5 Shape Descriptors. Shape descriptors quantify the geometric


properties of objects or regions in the image. They are useful for shape-based
recognition, object classification, and image segmentation tasks.

3.3.6 Histogram Based Features. Histogram-based features capture


the distribution of pixel intensities or other image properties across the image.
They provide information about colour composition, texture patterns, and
intensity gradients in the image.

3.3.7 Deep Learning Features. Deep learning-based feature


extraction involves using pretrained convolutional neural networks (CNNs) to
extract high-level features from images. CNNs automatically learn
hierarchical representations of visual patterns and semantics from raw image
data, making them well-suited for various image analysis tasks such as
image classification, object detection, and semantic segmentation.

3.4 Image Classification. Image classification is a fundamental task in


computer vision that involves categorizing images into predefined classes or
categories based on their visual content. It is a supervised learning problem where
a machine learning model is trained on a labelled dataset of images, with each
image associated with a specific class label. The goal of image classification is to
develop a model that can accurately predict the class of unseen images based on
their visual features.

17 Naval Construction Wing, IIT Delhi


Computer Vision Use of Computer Vision for Corrosion Detection

Deep Learning and Computer Vision.

3.5 Deep learning is a specific subfield of machine learning and a type of artificial
intelligence. It aims at learning data representations using neural networks. It is called
"deep" learning because it makes use of a multi-layered neural network. In today's
context, deep learning represents a powerful set of techniques and concepts that have
seen its practical success only in the past decade or so. This is primarily due to the large
amount of data that we have in today's world and the rapid advancement of computational
resources. In general, deep learning algorithms and methods are used to learn from data.
We do not input task-specific "rules" to the system - like in traditional machine learning
algorithms. This makes the data/information that we input a key factor in influencing the
output of the system, rather than just the algorithm itself. Because it is such a flexible and
adaptive system based on the data, deep learning is widely used in a multitude of fields.
For example, it has had state-of-the-art performance in tasks such as image recognition,
natural language processing, and game playing. Deep learning, other than performing
well in these tasks by itself, is also used to advance other machine learning methods like
Computer Vision. Computer vision and deep learning are closely intertwined fields that
have seen significant advancements in recent years, revolutionizing the way machines
perceive and understand visual information. Deep learning has revolutionized computer
vision by providing powerful tools and techniques for solving complex visual recognition
tasks. Convolutional Neural Networks (CNNs) are a type of deep learning architecture
that has become the backbone of many state-of-the-art computer vision systems.[11]

Convolutional Neural Networks.

3.6 A Convolutional Neural Network (CNN) is a type of deep learning architecture


designed specifically for processing structured grid-like data, such as images. CNNs have
revolutionized the field of computer vision and are widely used for tasks such as image
classification, object detection, semantic segmentation, and image generation.

3.7 Convolutional layers are the building blocks of CNNs and are responsible for
extracting features from the input data. Each convolutional layer consists of a set of
learnable filters (also called kernels) that slide over the input image, performing
convolution operations to extract spatial patterns and features. These filters capture low-
level features such as edges, textures, and gradients, which are then combined and
refined in subsequent layers to capture higher-level features.

3.8 Pooling layers are typically inserted between consecutive convolutional layers
to reduce the spatial dimensions of the feature maps while retaining important
information. Common pooling operations include max pooling and average pooling, which
down sample the feature maps by taking the maximum or average value within each
pooling window. Pooling helps to reduce computational complexity, increase translation
invariance, and improve the network's ability to learn hierarchical features.

18 Naval Construction Wing, IIT Delhi


Computer Vision Use of Computer Vision for Corrosion Detection

3.9 Fully connected (or dense) layers are typically placed at the end of the CNN
architecture and are responsible for mapping the extracted features to the output classes
or labels. Each neuron in a fully connected layer is connected to every neuron in the
previous layer, allowing the network to learn complex mappings between features and
class labels.

3.10 CNNs are trained using a process called backpropagation, where gradients
of the loss function for the network parameters are computed and used to update the
weights of the network using optimization algorithms. During training, CNNs learn to
automatically extract discriminative features from the input data through the iterative
process of forward propagation (computing predictions) and backward propagation
(updating weights).

3.11 Transfer learning is a technique where pretrained CNN models, trained on


large-scale datasets such as ImageNet, are fine-tuned or used as feature extractors for
specific tasks or domains. Transfer learning allows leveraging knowledge learned from
one task to improve the performance of CNNs on related tasks, especially when the
available labeled dataset is small.[12]

Fig 3.1: Schematic diagram of a Convolutional Neural Network[13]


Source: https//www.britanica.com/ConvolutionalNeuralNetworks

Applications of Deep Learning in Computer Vision.

3.12 Deep learning has had a profound impact on computer vision, enabling
significant advancements in a wide range of applications. Deep learning models,
particularly Convolutional Neural Networks (CNNs), excel at image classification tasks.
They can accurately classify images into predefined categories or labels, such as

19 Naval Construction Wing, IIT Delhi


Computer Vision Use of Computer Vision for Corrosion Detection

identifying objects, animals, or scenes in photographs. Image classification has


applications in content-based image retrieval, medical diagnosis, quality control, and
autonomous vehicles. Deep learning-based object detection systems can localize and
classify multiple objects within an image or video frame. These systems utilize techniques
such as region-based CNNs (R-CNN), You Only Look Once (YOLO), and Single Shot
Multibox Detector (SSD) to detect objects of interest with high accuracy and efficiency.
Object detection is used in surveillance, security systems, autonomous driving, and
augmented reality.

3.13 Semantic segmentation involves assigning class labels to each pixel in an


image, effectively partitioning the image into semantic regions. Deep learning models,
such as Fully Convolutional Networks (FCNs) and U-Net, have significantly advanced
semantic segmentation tasks, enabling applications such as image segmentation,
medical image analysis, and scene understanding.

3.14 Instance segmentation extends semantic segmentation by not only labelling


each pixel with a class but also distinguishing between different instances of the same
class. Deep learning-based instance segmentation models, such as Mask R-CNN,
provide pixel-level segmentation masks for each object instance in an image. Instance
segmentation is used in robotics, autonomous navigation, and video analysis. Deep
learning-based object tracking systems can track the movement of objects across video
frames in real-time. These systems utilize recurrent neural networks (RNNs) or Siamese
networks to maintain object identities and predict their trajectories over time. Object
tracking has applications in surveillance, video analytics, and human-computer
interaction.

Fig 3.2: Types of Computer Vision Tools[14]


Source: https://www.leewayhertz.com/computer-vision/

20 Naval Construction Wing, IIT Delhi


Corrosion Detection Algorithm Development Use of Computer Vision for Corrosion Detection

CHAPTER-4

CORROSION DETECTION ALGORITHM DEVELOPMENT

4.1 Developing a corrosion detection algorithm involves several steps, including


data collection, preprocessing, feature extraction, model selection, training, and
evaluation.

Object Detection Models.

4.2 SSD(Single Shot Multibox Detector). The Single Shot MultiBox Detector
(SSD) is a deep learning-based object detection model designed for real-time
applications. Unlike region-based detectors like Faster R-CNN, SSD performs
detection in a single forward pass, making it significantly faster. It uses a
convolutional neural network (CNN) to extract features and predicts bounding boxes
and class scores directly from multiple feature maps at different scales. SSD
employs default anchor boxes (MultiBox) of various aspect ratios to detect objects
of different sizes. By combining predictions from both high-resolution layers (for
small objects) and low-resolution layers (for large objects), SSD achieves a balance
between accuracy and speed.

4.3 Faster R-CNN(Region-based Convolutional Neural Network). Faster


R-CNN (Region-Based Convolutional Neural Network) is a two-stage object
detection model that significantly improves both speed and accuracy over its
predecessors, R-CNN and Fast R-CNN. It introduces the Region Proposal Network
(RPN), which efficiently generates region proposals directly from convolutional
feature maps instead of relying on external proposal methods like Selective Search.
The first stage of Faster R-CNN uses the RPN to identify potential object locations,
while the second stage refines these proposals and classifies objects using a fully
connected network. This design reduces computational overhead and speeds up
detection compared to earlier R-CNN variants.

4.4 CenterNet. CenterNet is a deep learning-based anchor-free object


detection model that simplifies the detection pipeline by predicting object centers
directly, rather than relying on predefined anchor boxes or region proposals. Unlike
traditional detectors like Faster R-CNN or SSD, which predict bounding boxes
explicitly, CenterNet treats object detection as a keypoint detection problem. It uses
a heatmap-based approach where each object is represented by the center of its
bounding box, and additional regression branches predict the box dimensions and
offsets. This eliminates the complexity of anchor box design, reducing computation
and improving efficiency. CenterNet is known for its speed and accuracy, making it

21 Naval Construction Wing, IIT Delhi


Corrosion Detection Algorithm Development Use of Computer Vision for Corrosion Detection

well-suited for real-time applications while still achieving strong performance on


benchmark datasets. However, it may struggle with overlapping objects due to its
reliance on center keypoints for detection.

4.5 YOLO(You Only Look Once). YOLO (You Only Look Once) is a popular
deep learning-based object detection model known for its speed and efficiency in
real-time applications. Unlike two-stage detectors like Faster R-CNN, which first
generate region proposals and then classify objects, YOLO is a single-stage
detector that directly predicts bounding boxes and class probabilities from an input
image in a single forward pass. This makes YOLO extremely fast, enabling real-
time detection even on resource-constrained devices. YOLO divides an image into
a grid and predicts multiple bounding boxes per grid cell, refining predictions through
multiple versions such as YOLOv3, YOLOv4, and YOLOv8, which have improved
accuracy and robustness. While YOLO excels in speed, it may struggle with small
object detection and overlapping objects compared to some two-stage detectors. Its
balance of accuracy, speed, and simplicity has made it a widely used model in
applications like autonomous driving, surveillance, and robotics.

Steps to Develop a Corrosion Detection Model.

4.6 To develop a corrosion detection model using YOLO (v8 and v11) with a few-
shot learning approach, follow these steps. First, collect and preprocess a small dataset
containing corrosion images with diverse lighting, textures, and angles. Since few-shot
learning relies on limited data, employ data augmentation (flipping, rotation, brightness
adjustments) to enhance variability. Next, annotate the images using tools like Labeling
or Roboflow, ensuring accurate bounding boxes around corrosion areas. Then, choose
a pre-trained YOLOv8 or YOLOv11 model (trained on large datasets like COCO) and
fine-tune it using transfer learning to adapt it to corrosion detection. Load the dataset
into Ultralytics YOLO framework, configure hyperparameters (batch size, learning rate),
and train the model using a small number of labeled samples. Utilize few-shot learning
techniques like meta-learning or prototypical networks to improve performance on
unseen corrosion patterns. After training, evaluate the model using precision, recall, and
mAP (mean Average Precision). Finally, deploy the trained model for real-time corrosion
detection using edge devices or cloud-based inference.

4.7 Define Number of Classes. Firstly, the categories or classes that the
model needs to recognize or classify within the dataset are determined. For
example, if the model is designed to classify images of fruits, the classes might
include "apple," "banana," "orange," and others.

4.8 Upload Data. Next, the dataset containing images and their
corresponding labels (if available) is uploaded to Google Drive. This dataset will
serve as the foundation for training the model.

22 Naval Construction Wing, IIT Delhi


Corrosion Detection Algorithm Development Use of Computer Vision for Corrosion Detection

4.9 Assign Images(Train, Validate, Test). The dataset is divided into


three subsets: training, validation, and testing sets. The training set is used to train
the model, the validation set helps tune hyperparameters and prevent overfitting,
and the test set is utilized to evaluate the model's performance.

4.10 Annotate Images Using a Suitable Technique. The images in the


dataset are annotated to provide labels or annotations that indicate the location and
class of objects within them. This step is essential for supervised learning tasks, as
it enables the model to learn and recognize objects accurately.

Fig 4.1: Bounding Box Annotations[13]


Source:https://www.anolytics.ai/blog/use-of-bounding-box-annotations-is-important-for-object-
detection/

4.11 Approve the Dataset. The annotated dataset should be thoroughly


reviewed and approved to ensure it accurately represents the intended task for the
model. Any inconsistencies, errors, or ambiguities in the annotations must be
identified and corrected. Adjustments should be made as necessary to align the
dataset with the desired outcomes. This step is crucial to maintaining the quality and
reliability of the model’s training data before proceeding to the next phase.

4.12 Generate, Try and Test. YOLO should be utilized to generate


preprocessed versions of the dataset, ensuring that images are appropriately
resized, data is augmented where necessary, and annotations are converted into a
format compatible with model training. Once preprocessing is complete, the
computer vision model should be trained using the refined dataset and its
performance rigorously evaluated on both validation and test sets. To achieve
optimal results, various model architectures, hyperparameter tuning techniques,
and training strategies should be explored and tested. By systematically refining
these elements, the model’s accuracy and generalization ability can be improved,
leading to more reliable performance in real-world applications.
23 Naval Construction Wing, IIT Delhi
Corrosion Detection Algorithm Development Use of Computer Vision for Corrosion Detection

4.13 Once the models are trained, they must be evaluated for accuracy and
reliability. Evaluation metrics include precision, recall, and mean Average Precision (mAP)
to assess detection accuracy. Confusion matrices help visualize true positive, false
positive, and false negative rates, while qualitative analysis of sample predictions ensures
correct corrosion detection. To further enhance performance, optimization techniques can
be applied, such as fine-tuning hyperparameters, leveraging transfer learning with pre-
trained YOLO models, and implementing post-processing techniques like Non-Maximum
Suppression (NMS) tuning. These strategies help refine the model’s accuracy and
reliability in detecting corrosion.

4.14 Deployment is the final stage, where the trained model is integrated into real-
world applications. Deployment options include edge deployment with drones,
underwater cameras, or onboard inspection systems, cloud-based deployment for remote
corrosion monitoring, and web-based interfaces for real-time detection and reporting.
Each deployment method ensures efficient monitoring and early detection of corrosion,
enabling timely maintenance interventions.

24 Naval Construction Wing, IIT Delhi


Training, Testing and Results Use of Computer Vision for Corrosion Detection

CHAPTER-5

TRAINING, TESTING AND RESULTS

YOLO V8.

5.1 YOLOv8 (You Only Look Once version 8) is the latest iteration of the YOLO
(You Only Look Once) object detection family, developed by Ultralytics. It builds upon the
strengths of its predecessors while integrating new techniques to enhance accuracy,
speed, and efficiency. YOLOv8 is designed for object detection, segmentation, and
classification tasks, making it one of the most versatile and high-performing models in the
field of computer vision.

5.2 Model Architecture. The model architecture of YOLOv8 has been


streamlined and optimized to improve both inference speed and detection accuracy.
Unlike earlier versions that relied on anchor boxes, YOLOv8 utilizes an anchor-free
approach, simplifying the model and reducing computational overhead. The
backbone employs CSP (Cross Stage Partial) networks, which enhance gradient
flow and feature reuse, leading to better convergence and efficiency. Additional
improvements include an enhanced Feature Pyramid Network (FPN) and Path
Aggregation Network (PAN) to refine feature extraction across multiple scales, as
well as dynamic activation functions like SiLU (Swish Linear Unit) to improve non-
linearity representation and overall network expressiveness.[15]

5.3 Model Performance. YOLOv8 achieves state-of-the-art performance


across multiple benchmarks, offering improvements in both mean Average
Precision (mAP) and inference speed compared to previous YOLO models. It
provides higher mAP due to optimized loss functions and better feature extraction
while maintaining lower latency for real-time applications such as autonomous
vehicles and surveillance. Furthermore, efficient parameter tuning and architectural
optimizations result in a model that balances accuracy and computational efficiency.
Benchmarks indicate that YOLOv8 achieves up to 5-10% higher mAP on datasets
such as COCO while maintaining real-time processing speeds on edge devices and
GPUs.[15]

Ultralytics.

5.4 Ultralytics is a leading AI research and development company specializing in


computer vision technologies, particularly in real-time object detection. Known for
creating the widely adopted YOLO (You Only Look Once) series, Ultralytics has
continuously pushed the boundaries of deep learning-based vision applications. With a

25 Naval Construction Wing, IIT Delhi


Training, Testing and Results Use of Computer Vision for Corrosion Detection

strong focus on efficiency, accuracy, and user accessibility, the company has established
itself as a key player in the AI industry, catering to both researchers and businesses

seeking cutting-edge solutions for object detection, segmentation, and classification.[16]

Fig 5.1: Tasks performed by Ultrlytics[14]


Source: https://www.researchgate.net/figure/Yolo-8-Ultralytics-Method-Source-https-pypiorg-project-
ultralytics

COCO Dataset.

5.5 The COCO (Common Objects in Context) dataset is one of the most widely
used and influential datasets in computer vision research. Developed by Microsoft, COCO
serves as a large-scale benchmark for various vision-related tasks, including object
detection, instance segmentation, keypoint detection, and image captioning. It provides
a diverse and challenging set of images with rich annotations, making it a crucial resource
for training and evaluating deep learning models.

5.6 COCO consists of over 330,000 images, with more than 200,000 labeled
images containing around 1.5 million object instances. The dataset includes 80 object
categories, 91 stuff categories (such as sky, grass, and road), and five captions per
image, making it highly versatile. The annotations provided in COCO are extensive,
covering not only bounding boxes but also pixel-wise instance segmentation masks,
object keypoints for human pose estimation, and detailed descriptions for captioning
tasks. This diversity allows researchers to develop and test models across multiple
domains of computer vision.

5.7 One of COCO’s most significant contributions to the field is its emphasis on
object detection and segmentation in complex, real-world scenarios. Unlike earlier
datasets that often featured isolated objects on simple backgrounds, COCO images
contain multiple objects in cluttered environments, simulating real-life conditions more

26 Naval Construction Wing, IIT Delhi


Training, Testing and Results Use of Computer Vision for Corrosion Detection

effectively. This design makes it an excellent benchmark for evaluating the robustness of
deep learning models, ensuring that they perform well in practical applications.[16]

Training Parameters.

Number of Epoch : 500


Batch : 64
Images : 1000
Initial Learning Rate : 0.001
Learning Rate Final : 0.1
Momentum : 0.937
Weight Decay : 0.0005
Stability Epoch : 396

Results – YoloV8.

Fig 5.2: Precision and Recall-YoloV8 model

27 Naval Construction Wing, IIT Delhi


Training, Testing and Results Use of Computer Vision for Corrosion Detection

Fig 5.3: Map Scores-YoloV8 model

Fig 5.4: Losses-YoloV8 model

28 Naval Construction Wing, IIT Delhi


Training, Testing and Results Use of Computer Vision for Corrosion Detection

YOLO V11.

5.8 YOLOv11 (You Only Look Once version 11) represents the latest
advancement in real-time object detection, building upon the successes of previous
YOLO versions. Developed as part of the continuous evolution of deep learning-based
vision models, YOLOv11 integrates cutting-edge improvements in accuracy, efficiency,
and adaptability. Designed to enhance detection, segmentation, and classification tasks,
YOLOv11 is poised to redefine the state-of-the-art in computer vision applications. One
of the most significant advancements in YOLOv11 is its refined neural network
architecture. The model employs a hybrid approach combining convolutional neural
networks (CNNs) with vision transformers (ViTs) to improve feature extraction and
contextual understanding. This hybrid structure enables YOLOv11 to detect objects with
higher precision while maintaining real-time inference speeds. Additionally, it incorporates
an enhanced feature pyramid network (FPN) and spatial attention mechanisms to
improve object localization, particularly in complex and cluttered scenes.

5.9 Another key feature of YOLOv11 is its improved training methodology. The
model leverages self-supervised learning techniques to reduce the need for large labeled
datasets, making it more accessible for a wider range of applications. Advanced
augmentation strategies, such as mixup, CutMix, and RandAugment, enhance model
robustness, while adaptive learning rate scheduling ensures optimal convergence.
Furthermore, the use of a novel loss function, designed to balance localization and
classification errors, contributes to increased detection accuracy. Performance
benchmarking of YOLOv11 demonstrates significant improvements over its
predecessors. The model achieves higher mean Average Precision (mAP) across
standard datasets, such as COCO and Pascal VOC, while reducing computational
complexity. Its optimized architecture allows for deployment on a variety of hardware,
from high-performance GPUs to edge devices, making it a versatile solution for industries
requiring real-time object detection, such as autonomous vehicles, robotics, security
surveillance, and medical imaging.[17]

Training Parameters.

Number of Epoch : 500


Batch : 64
Images : 1000
Initial Learning Rate : 0.001
Learning Rate Final : 0.1
Momentum : 0.937
Weight Decay : 0.0005
Stability Epoch : 300

29 Naval Construction Wing, IIT Delhi


Training, Testing and Results Use of Computer Vision for Corrosion Detection

Results-YoloV11.

Fig 5.5: Precision and Recall-YoloV11 model

Fig 5.6: mAP Scores -YoloV11 model

30 Naval Construction Wing, IIT Delhi


Training, Testing and Results Use of Computer Vision for Corrosion Detection

Fig 5.7: Losses - YoloV11 model

Inferences.

5.10 The results obtained from training the YOLOv8 model for corrosion detection
provide insights into the model’s performance in terms of precision, recall, mean Average
Precision (mAP), and loss convergence over the training epochs. The precision value of
0.6417 indicates that when the model predicts corrosion, it is correct 64.17% of the time.
The [email protected] score of 0.5544 represents the model’s average precision when using a
high Intersection over Union (IoU) threshold of 50%, which is commonly used for
evaluating object detection models. This value indicates that the model has moderate
detection performance but still has room for improvement. The graphs provide additional
insights into the model’s training behavior. The Precision and Recall graph shows a
steady increase in precision and recall over the epochs, with some fluctuations that
indicate possible variations in learning stability. The mAP Scores graph follows a similar
trend, where both [email protected] and [email protected]:0.95 improve as training progresses but
begin to plateau after approximately 200 epochs, indicating a saturation point where
additional training may not yield significant gains. The Losses graph shows a consistent
decline in box loss, class loss, and DFL loss over the epochs, suggesting that the model
is learning effectively. Overall, while the YOLOv8 model demonstrates a reasonable
ability to detect corrosion, improvements can be made by enhancing the dataset, applying
additional augmentation techniques, or fine-tuning hyperparameters.

5.11 The corrosion detection results obtained using the YOLOv11 model show
notable improvements in precision, recall, and mean Average Precision (mAP) compared

31 Naval Construction Wing, IIT Delhi


Training, Testing and Results Use of Computer Vision for Corrosion Detection

to the V8 model. The precision value of 0.7480 indicates that the model correctly identifies
corrosion in 74.80% of its predictions, an improvement over the earlier results. The recall
score of 0.6065 signifies that the model detects 60.65% of the actual corrosion instances,
suggesting a better balance between identifying true positives while minimizing false
negatives. The [email protected] score of 0.7083 is a significant enhancement, demonstrating
that the model achieves a 70.83% average precision when using an IoU threshold of 50%.
This improvement suggests that the model has become more effective at distinguishing
corrosion from non-corrosion areas. Furthermore, the [email protected]:0.95 score of 0.5612,
which accounts for multiple IoU thresholds, is considerably higher than the previous
score, indicating better localization accuracy and generalization across different object
sizes and shapes.

5.12 Comparing the results obtained using both the models, we obtain significant
improvement in the accuracy and precision when compared to open source models like
Rob flow. The results obtained using the YoloV11 model are marginally better than the
V8 model. Hence, we would be using the V11 model for all further calculations and
validations.

Fig 5.8: Validation images for corrosion detection – YoloV11 model

32 Naval Construction Wing, IIT Delhi


Training, Testing and Results Use of Computer Vision for Corrosion Detection

Fig 5.9: Confusion Matrix(Training Data) – YoloV11 model

Fig 5.10: Confusion Matrix(Testing Data) – YoloV11 model

33 Naval Construction Wing, IIT Delhi


Training, Testing and Results Use of Computer Vision for Corrosion Detection

Inferences from Confusion Matrix.

5.13 The confusion matrix for the corrosion detection model provides insights into
its classification performance. The matrix consists of four key values: 743 true positives,
102 false positives, 155 false negatives, and a background class. These numbers
indicate how well the model distinguishes between corrosion (rust) and non-corrosion
(background). The true positives (743) represent cases where the model correctly
identified corrosion when it was actually present. This high number suggests that the
model has a strong ability to detect rust in most scenarios. The false positives (102)
indicate instances where the model incorrectly classified background regions as rust.
While this number is relatively low, it implies that some non-corroded areas are being
mistakenly flagged, which could lead to unnecessary inspections or maintenance
actions in real-world applications. The false negatives (155) highlight cases where actual
corrosion was present but not detected by the model. This is a critical area for
improvement, as failing to detect rust can have significant consequences, especially in
industries where corrosion monitoring is crucial for safety and maintenance. Reducing
false negatives would enhance the model’s reliability by ensuring that fewer corrosion
cases go unnoticed. Overall, the confusion matrix suggests that the model performs well
in detecting corrosion but still has some misclassifications. Possible improvements
include fine-tuning the decision threshold, increasing the dataset size with more diverse
corrosion samples, and applying additional data augmentation techniques. Enhancing
these aspects could help minimize false negatives while maintaining or further reducing
false positives, leading to a more robust corrosion detection system.

5.14 The confusion matrix for the testing data provides valuable insights into the
performance of the corrosion detection model when applied to unseen data. In this case,
the model correctly identified 144 instances of corrosion, meaning that it successfully
detected rust when it was actually present. This high count of true positives indicates
that the model has a strong ability to recognize corrosion in real-world scenarios. The
model produced 35 false positives, meaning that it incorrectly classified background
regions as corrosion. While this number is relatively low, it suggests that the model
occasionally misidentifies non-corroded areas as rust, which could lead to unnecessary
maintenance checks or false alarms in practical applications. On the other hand, there
are 21 false negatives, where the model failed to detect corrosion that was actually
present.

5.15 The overall distribution of values in the confusion matrix suggests that the
model has achieved a good balance between precision and recall. The relatively low
number of false positives indicates that it is precise in identifying corrosion, while the
reduced count of false negatives demonstrates a strong recall capability. However, slight
improvements can still be made to further refine its accuracy. Techniques such as fine-
tuning the detection threshold, improving dataset diversity, and applying additional
augmentation strategies could help enhance the model’s generalization to different

34 Naval Construction Wing, IIT Delhi


Training, Testing and Results Use of Computer Vision for Corrosion Detection

corrosion patterns. In conclusion, the model performs well on the testing data, effectively
detecting corrosion while maintaining a reasonable level of precision. With some minor
refinements, particularly in minimizing false negatives, it can be made even more
reliable for real-world corrosion detection applications.

35 Naval Construction Wing, IIT Delhi


Validation of Results Use of Computer Vision for Corrosion Detection

CHAPTER-6

VALIDATION OF RESULTS

6.1 Validating the detection results on domain-specific imagery is crucial


because it bridges the gap between controlled, mixed-context training data and the
complex visual realities of ship maintenance. Underwater hull plates, with colour-shifted
scenes, turbidity and marine growth, and above-water freeboard zones, with glare, paint
weathering and variable lighting, each present noise patterns the model never “saw”
during training. A rigorous validation phase therefore serves three purposes: it quantifies
the model’s true generalisation capacity, it reveals systematic failure modes (e.g.,
rust-like bio-fouling false positives or missed pits in low-contrast footage), and it builds
operational confidence for naval decision-makers who will rely on automated alerts to
schedule costly dry-dock interventions. Without such evidence, reported mAP or
precision figures remain academic; with it, the detector’s performance is grounded in the
very environments where structural integrity and crew safety are at stake.

Validation on Specific Datasets

6.2 Above Water dataset. For the topside (above-water) validation trial we
isolate a pure, single-domain dataset containing only corrosion examples
photographed on the freeboard, weather deck fittings, and splash-zone strakes of
operational vessels. All frames were captured between 1 m and 7 m standoff under
natural daylight, then manually filtered to exclude any images that show submerged
plating, bilge algae, or dry-dock scaffolding so that every positive instance
represents true atmospheric rust the reddish-brown streaks and pitted blisters that
propagate where paint films crack, sun-fade, and salt spray accumulatesWe
deliberately retain challenging artefacts like glare from glossy coatings, shadow
gradients cast by mooring lines, and faded boot-top colour bands, because they
mimic real inspection noise and stress-test the detector’s robustness. Only these
region-specific frames are fed to the model during inference, yielding domain-
specific precision-recall curves and mAP scores that reflect performance solely on
atmospheric corrosion cues, uncontaminated by the distinctive colour spectrum or
texture of submerged bio-fouling. Comparing these metrics with the underwater
trials reveals how well the network disentangles rust features from ambient lighting
variations and paint ageing effects, providing actionable guidance on whether
additional topside-focused augmentation or threshold tuning is required.

36 Naval Construction Wing, IIT Delhi


Validation of Results Use of Computer Vision for Corrosion Detection

Fig 6.1: Corrosion Detection Instances – Above Water Dataset

Fig 6.2: Distribution of Confidence Scores – Above Water Dataset


37 Naval Construction Wing, IIT Delhi
Validation of Results Use of Computer Vision for Corrosion Detection

6.3 The topside-validation run yields two complementary views of model behaviour:
a quantitative confidence-score distribution and a qualitative gallery of detections. The
histogram shows a bimodal shape, one peak between 0.25 and 0.40 and a second,
higher cluster between 0.90 and 1.00—suggesting the detector is largely decisive,
assigning either low probability to non-rust patches or very high probability to true
corrosion. The mean confidence is ≈ 0.66 while the median skews slightly higher (≈ 0.68),
indicating a mild right-tail trace confirms this: it rises sharply again past 0.85, then
plateaus, which is typical of a model that has learned strong class-specific cues
(colour/texture mixtures of oxidised steel and blister patterns). However, the smaller hump
around 0.3 hints at a subset of ambiguous regions—often thin oxide films or partially
sand-blasted surfaces—where the network battles between “rust” and
“background.” Those borderline cases are especially visible in the montage: faint, mottled
streaks adjacent to intact paint frequently receive blue bounding boxes with confidence
tags of ~0.32–0.45, whereas thick flaking plaques and under-cut blisters score ≥ 0.95.

6.4 The collage also reveals how context and lighting drive error modes. Shots taken
under dock-shed skylights (soft diffused light) exhibit crisp detections with tight boxes;
conversely, frames shot at glancing angles show specular highlights that sometimes
confuse the model into extending boxes beyond the actual rust patch, visible in panels
where blue frames spill over onto clean orange hull. Notably, the detector rarely misses
contiguous rust fields larger than 10 cm, every widespread bloom is tagged yet it
struggles on tiny isolated pimples or primer-through scratches; these seldom appear as
boxes, confirming the recall drop at small object scales reported by the metrics. Another
key insight is colour-shift robustness: several images contain areas recently stripped to
greenish primer or coated with whitish filler, but the network still hones in on the
reddish-brown pits, suggesting it is not relying solely on hue but also on texture cues such
as roughness and edge irregularity.

6.5 Operationally, the bimodal confidence profile is advantageous: we can set a


pragmatic alert threshold around 0.6 (the mean-median window) that captures the
high-certainty detections while suppressing most borderline false positives, thereby
keeping manual-review load manageable for inspection crews. At the same time,
attention should focus on those mid-confidence cases; many correspond to early-stage
rust bloom where proactive spot-treatment is cheapest. In summary, the above-water trial
demonstrates that the model delivers highly confident, reliably localised detections for
mature corrosion, exhibits predictable uncertainty for incipient or visually ambiguous
areas, and maintains robustness under variable daylight conditions—an encouraging
foundation for topside deployment after threshold tuning and small-object augmentation.

38 Naval Construction Wing, IIT Delhi


Validation of Results Use of Computer Vision for Corrosion Detection

6.6 Underwater Dataset. For the underwater validation we build a


single-domain test set that contains nothing but genuine submerged-hull corrosion,
ensuring every frame challenges the model with the optical quirks found below the
boot-top. All images were screened so that every positive box shows oxidised steel
beneath the waterline no topside stains, no splash-zone streaks, no bio-fouling
alone. We kept shots with green-blue colour cast, suspended silt, and beam-light
glare because these factors best mimic real survey conditions. During the trial only
these underwater frames were fed to the network; their precision-recall curves and
mAP values therefore reflect performance solely on submerged corrosion cues,
uncontaminated by easier topside textures. Because underwater images come with
green-blue colour shifts, floating sediment, and bio-fouling, the model’s confidence
scores spread out more evenly across the 0.3 to 0.9 range instead of forming the
sharp twin peaks we saw topside. Even so, a solid cluster still appears above 0.75,
capturing most of the heavy, flaking corrosion on shell plating, bilge keels, and
sea-chest grills. The network also shows good restraint: smooth steel covered by
algae mats or soft slime rarely triggers high scores, which keeps false alarms
manageable. Where it struggles is on thin early-stage rust that hides under light
growth; these areas often receive middling scores (around 0.45-0.55) or are missed
entirely when turbidity is high.

Fig 6.3: Distribution of Confidence Scores – Underwater Dataset

39 Naval Construction Wing, IIT Delhi


Validation of Results Use of Computer Vision for Corrosion Detection

Fig 6.4: Corrosion Detection Instances – Underwater Dataset

6.7 The underwater run produced a very different confidence landscape from the
topside case, and the mosaic of detections explains why. On the histogram, scores are
concentrated in the mid-range roughly 0.30 to 0.60 with a long taper toward 1.0. That
pattern fits what we see in the images: the network almost always finds something
rust-like on submerged components, but turbidity, beam-light glare, and bio-fouling make
it less certain than in clear daylight. Take the sea-chest grating in the upper-left tile: the
slotted bar face is heavily pitted, and the box sits neatly on the corroded area, yet the
label reads only about 0.58. The slightly muted score comes from competing green
bio-film and low contrast around the slots. A similar story appears on the third tile, top row
an insert plate with a ragged rust edge. The box hugs the orange-brown spall accurately,
but the surrounding primer and sediment cloud drag the confidence down to the
0.6 range. In several shots of shell-plating weld seams, the detector brackets the weld
toes plus adjacent rust streaks (e.g., centre of the second row). Even when heavy silt
reduces visibility to a couple of metres, the model still outlines the damage corridor, yet
confidence hovers near 0.45, showing it “sees” the shape but is cautious because colour
cues are suppressed.

6.8 The algorithm briefly interprets the warm reflection as corrosion and issues a thin
box with a low score (0.38). Another example is the propeller-hub image (third row, far

40 Naval Construction Wing, IIT Delhi


Validation of Results Use of Computer Vision for Corrosion Detection

right). The bronze surface throws back golden highlights that fool the hue-based filters;
the network draws a box, but the score sits below 0.40, meaning it can be ignored once
we set a sensible threshold. Conversely, when corrosion is severe flaking steel at a
bilge-keel weld confidence climbs past 0.75 despite turbidity, because both texture and
colour cues align with the learned pattern.

6.9 Overall, the detector shows that it is locating the right regions almost every time,
even in murky water, but expresses its uncertainty through mid-level scores a healthy
behaviour for an automated aid rather than a hard-coded alarm. By tightening the
threshold to 0.55 and feeding the model more examples of algae-covered rust and
bright-metal false positives, we can turn these mid-confidence boxes into either firm
detections or suppressed noise, further improving submerged-hull inspection reliability.

Validation using Video Input.

6.10 To extend validation from still images to continuous footage, the detection
pipeline is wrapped in a simple video-reader loop. A Python snippet built on OpenCV
opens the inspection clip, grabs each frame and stamps it with the original time-code so
any alert can be traced back to a second on the tape. Every frame is then resized and
colour-corrected using the same preprocessing functions we apply to photographs,
passed through the YOLOv11 network, and the resulting bounding boxes with their
confidence scores are written to a results list and optionally drawn on a copy of the frame
for visual review. Because the video often runs at 25–30 fps, we insert a stride parameter
so that, say, only every third frame is analysed when bandwidth or GPU headroom is
tight; this still gives one inference per 120 mm of travel at a typical 0.3 m/s survey
speed. After the clip finishes, the script aggregates detections across frames: it counts
unique corrosion sites by tracking box centroids with a simple IoU-based tracker,
computes per-frame precision/recall, and then averages them to produce sequence-level
mAP and a heat-map that shows where rust is most frequently flagged. This
frame-by-frame approach turns any standard MP4 or live camera feed into a rich
validation set, letting us test the model under realistic motion blur, changing lighting, and
variable standoff distances without rewriting the core detector.

6.11 Video Ingestion and Buffering. The routine begins by opening the
inspection clip typically an MP4 or .AVI stream captured by an ROV or topside
camera using a multimedia library such as OpenCV. The code exposes three key
properties: frames-per-second (FPS), total frame count, and the four-character
codec, allowing the script to check that the video is playable and to pre-allocate
buffers of the correct size. Every call to returns a frame image and a Boolean flag;
if the flag is false the loop exits gracefully. To avoid overloading the GPU, a sampling
stride is introduced: analysing, say, every third frame keeps the effective inference
rate aligned with the motion of the camera.

41 Naval Construction Wing, IIT Delhi


Validation of Results Use of Computer Vision for Corrosion Detection

6.12 Pre-Processing each Frame. Each grabbed frame is first time-stamped


so that any future alert can be traced to a precise second on the tape. Resolution is
then resized to the detector’s native input shape. If the clip is underwater, two
enhancements are chained in, a white-balance correction to shift excess green-blue
tones toward neutral grey, and a Contrast-Limited Adaptive Histogram Equalisation
(CLAHE) pass that brightens shadow regions without blowing out highlights. For
topside clips, a glare-reduction step—implemented through a simple dark-channel
de-hazing filter—may be applied instead. These adjustments are deterministic and
fast and ensure that the CNN receives images that resemble those used in training.

6.13 Inference and Post-Processing. The pre-processed frame is converted


to a PyTorch tensor, normalised to [0, 1], and forwarded through the YOLOv11
network. The raw output is a list of bounding boxes, each with (x, y, w, h) and a
class-specific confidence. Non-Maximum Suppression (NMS) with an IoU threshold
of 0.5 removes overlapping duplicates, leaving the highest-confidence box for each
region. Boxes scoring below a user-defined confidence floor are discarded to reduce
noise. The remaining boxes are drawn onto a copy of the frame for visual inspection,
colour-coded by confidence. Optionally, a text overlay logs the running count of
detections and the frame number.

6.14 Temporal Aggregation and Tracking. Per-frame detections alone do


not reveal whether a specific rust patch persists across successive frames. An
inexpensive tracker—either SORT (Simple Online and Realtime Tracking) or a
centroid IoU matcher—links boxes that appear in adjacent frames and assigns them
a track ID. This lets the script merge short-lived flickers caused by turbidity and
count each physical defect only once, even if it drifts in and out of view. The tracker’s
output is written to a CSV forming a machine-readable inspection log.

6.15 Interpreting Run-Level Results. After processing the entire clip, the
script computes sequence-level metrics. Per-frame precision is averaged to yield a
global precision; per-frame recall is estimated if ground-truth video annotations
exist, or approximated by manual spot-checks. A histogram of confidence scores,
like those shown earlier, indicates whether the detector is decisive (peaks at high
and low ends) or uncertain (scores clustered mid-range). Track length statistics
reveal inspection coverage: a defect appearing in only one frame may be noise,
while one persisting over ten seconds is likely real corrosion. Finally, aggregated
bounding-box centres are plotted as a heat-map over the vessel’s hull schematic,
visually highlighting corrosion-prone zones. Together, these summaries let survey
engineers decide whether the detector’s performance meets operational thresholds
or needs further tuning before live deployment.

42 Naval Construction Wing, IIT Delhi


Validation of Results Use of Computer Vision for Corrosion Detection

(a)

(b)
Fig 6.5: Corrosion Detection using video input- General Corrosion Detection. (a) – Input
Video(provided by the user), (b) – Output Video (generated by the program)

43 Naval Construction Wing, IIT Delhi


Validation of Results Use of Computer Vision for Corrosion Detection

(a) (b)
Fig 6.6: Corrosion Detection using video input- Underwater Input (a) – Input
Video(provided by the user), (b) – Output Video (generated by the program)

(a) (b)
Fig 6.7: Corrosion Detection using video input- Above Water(Interior) Input (a) – Input
Video(provided by the user), (b) – Output Video (generated by the program)

44 Naval Construction Wing, IIT Delhi


Validation of Results Use of Computer Vision for Corrosion Detection

6.16 The script opens your input video with cv2.VideoCapture, then steps through
it frame by frame in a while loop. Each time the loop grabs a frame, that single image is
passed to the YOLOv11 model, which has been trained to spot corrosion. The model
returns bounding-box results whose confidence scores indicate how certain it is that each
box really shows corrosion. Those scores are stored in a list for that frame, so the code
can print an average confidence for the current frame before moving on. As the loop
continues, every annotated frame is written to a new video file, and all confidence scores
are collected in a master list. When the video ends, the script reports how many frames
were processed, how many total corrosion detections were made, and the overall
average, maximum and minimum confidence values giving you a quick measure of how
confidently the model identified corrosion across the entire video.

Fig 6.7: Overall Video Processing Statistics (Underwater Video Input)

45 Naval Construction Wing, IIT Delhi


Inferences and Conclusion Use of Computer Vision for Corrosion Detection

CHAPTER-7

INFERENCES AND CONCLUSION

Overview of the Study

7.1 The primary objective of this project was to develop an automated, robust, and real-
time corrosion detection system using computer vision and deep learning techniques. By
integrating the strengths of traditional corrosion detection methods with advanced machine
learning models such as YOLOv8 and YOLOv11, the project sought to address the
limitations of manual inspection methods, including subjectivity, inefficiency, and restricted
accessibility in harsh marine environments.

A comprehensive pipeline was designed, starting from data acquisition and annotation to
model training, evaluation, validation, and deployment on video data. Each phase provided
critical insights that contributed to refining the corrosion detection methodology for maritime
applications.

Model Development and Performance Analysis

7.2 YOLOv8 Training and Evaluation

The training of YOLOv8 demonstrated that while the model was capable of learning
significant corrosion features from a limited dataset, it exhibited moderate overall
performance.

• Precision: 64.17%

• Recall: 55.20%

[email protected]: 55.44%

The loss curves indicated stable convergence after 200 epochs, but the plateauing of
performance metrics revealed limitations in generalization, especially for subtle
corrosion forms or low-contrast regions. Although the model reliably detected larger
corrosion patches, it sometimes missed early-stage pitting or misclassified background
noise as corrosion due to insufficient feature differentiation.
7.2.2 YOLOv11 Training and Superiority

Transitioning to YOLOv11 introduced several critical improvements. Leveraging


a hybrid CNN-ViT architecture significantly boosted feature extraction quality,
especially in cluttered or low-visibility environments.

46 Naval Construction Wing, IIT Delhi


Inferences and Conclusion Use of Computer Vision for Corrosion Detection

• Precision: 74.80%

• Recall: 60.65%

[email protected]: 70.83%

[email protected]:0.95: 56.12%
YOLOv11 demonstrated higher robustness against background variability and
lighting conditions, delivering better localization and classification of corrosion
features. Compared to YOLOv8, the performance improved by ~10–15% across
critical metrics, establishing YOLOv11 as the superior model for further deployment.

7.3 Inferences from Static Image Validation

7.3.1 Above-Water Dataset Insights

The topside corrosion validation provided a critical domain-specific test.


• Confidence Distribution: Bimodal, indicating decisive predictions.

• Detection Characteristics: High confidence (~0.90–1.00) for mature


corrosion; medium confidence (~0.30–0.50) for incipient or ambiguous
defects.
• Operational Implication: A detection threshold at 0.6 balances capturing
true corrosion while minimizing false alarms.

The model exhibited strong resilience to challenges like glare, surface fading, and
color shifts. False positives were minimal, and most mature corrosion fields were
accurately detected.

7.3.2 Underwater Dataset Insights

The underwater validation phase presented an entirely different set of challenges,


including color distortion, silt, and bio-fouling.

• Confidence Spread: Broader, between 0.3 and 0.9.

• Error Modes: Slight confusion with biological growths and glare effects.
• Operational Implication: A slightly higher threshold (~0.55) recommended for
underwater deployments.

Despite the optical complexities, the model maintained a high detection success
rate for major corrosion patches. Areas for improvement include enhancing
detection sensitivity for early-stage rust obscured by marine growth.

47 Naval Construction Wing, IIT Delhi


Inferences and Conclusion Use of Computer Vision for Corrosion Detection

7.4 Inferences from Video Validation

The extension of the detection framework from still images to continuous video streams
marked a major operational step toward practical deployment.

• Frame-by-Frame Detection: Enabled temporal aggregation and defect tracking.

• Heatmaps and Sequence-Level Metrics: Helped identify corrosion-prone zones.

• Robustness: Maintained detection accuracy despite motion blur, frame stride


sampling, and dynamic lighting.

This approach ensured real-time applicability and scalable integration with inspection
processes, providing consistent detections even under moving platforms like ROVs or
shipboard cameras.

7.5 Detailed Performance Comparison

Aspect YOLOv8 YOLOv11

Precision 64.17% 74.80%

Recall 55.20% 60.65%

[email protected] 55.44% 70.83%

[email protected]:0.95 42.5% 56.12%

Detection Speed Fast Fast

Small Object Detection Moderate Good

Resistance to Noise Moderate High

Applicability (Real-world) Limited Ready

The comparative analysis confirmed that YOLOv11 not only achieved better
numerical performance but also exhibited more stable and reliable detection
characteristics across complex conditions.

7.6 Key Challenges Encountered

Despite successful model development and deployment, several challenges were


identified during the study:

48 Naval Construction Wing, IIT Delhi


Inferences and Conclusion Use of Computer Vision for Corrosion Detection

• Class Imbalance: The scarcity of small or early-stage corrosion samples affected


model sensitivity to minor defects.

• Environmental Variability: Underwater lighting, silt, and algae presented


substantial challenges not fully addressed by the dataset.

• Data Annotation: Manual annotation required significant human effort and


introduced potential subjectivity.

• Computational Resources: Training deep learning models, especially YOLOv11


with large datasets and augmentation, required powerful GPUs and extended
training times.
• False Positive Control: Differentiating corrosion from other color anomalies like
bio-fouling or primer patches was sometimes difficult.

7.7 Recommendations for Future Work


Based on the results and identified limitations, the following recommendations are
proposed:

1. Enhanced Dataset Collection


Expand the dataset with more diverse corrosion scenarios, particularly early-stage
and bio-fouling-affected corrosion.

2. Advanced Augmentation Techniques


Apply domain-specific augmentations such as synthetic silt, simulated lighting
shifts, and bio-fouling overlays to improve underwater detection reliability.

3. Multi-Sensor Fusion
Integrate visual data with other sensor modalities (e.g., sonar, thermal imaging) to
strengthen corrosion detection under adverse conditions.

4. Model Optimization
Explore lightweight model pruning and quantization to enable real-time
deployment on low-power inspection devices (e.g., ROVs, drones).

5. Real-Time Alert System Development


Build an integrated dashboard that can display live detection outputs, track
corrosion site progression, and automatically flag high-risk zones for maintenance
teams.

6. Explainable AI Integration
Develop explainable AI frameworks that allow operators to understand why the
model makes a particular detection, increasing trust and usability in operational
environments.

49 Naval Construction Wing, IIT Delhi


Inferences and Conclusion Use of Computer Vision for Corrosion Detection

7.8 Final Conclusion

This project successfully demonstrated the applicability and advantages of


computer vision and deep learning methods for corrosion detection in maritime
environments. The YOLOv11 model, validated across static datasets and live video
streams, exhibited high precision, recall, and robustness, marking a substantial
improvement over traditional inspection practice.

The developed framework offers a promising foundation for real-time, automated


corrosion monitoring onboard ships and maritime structures, ultimately contributing
to enhanced safety, reduced maintenance costs, and prolonged asset lifespan.
Further enhancements as recommended could make this solution industry-ready,
revolutionizing inspection workflows in the marine sector.

The journey undertaken in this project reflects the immense potential of deep
learning in solving complex, real-world problems, providing a pathway for future
research and practical innovation in structural health monitoring.

50 Naval Construction Wing, IIT Delhi


References Use of Computer Vision for Corrosion Detection

REFERENCES

[1]. Bonnin-Pascual, Frank., & Ortiz, (2013). A novel approach for defect detection on vessel
structures using saliency-related features. Department of Mathematics and Computer Science,
University of the Balearic Islands.
[2]. Chliveros, Kontomaris, & Letsios, (2015). Automatic identification of corrosion in marine
vessels using decision-tree imaging.
[3]. Naladala, Raju, Aishwarya, & Koolagudi. (2021). Corrosion damage identification and
lifetime estimation of ship parts using image processing.
[4]. Petricca, Moss, Figueroa, & Broen, (2020). Corrosion detection using AI: A comparison of
standard computer vision techniques and deep learning models.
[5]. Civiconcepts. (2018). Types of corrosion. Retrieved from
https://civiconcepts.com/blog/types-of-corrosion
[6]. Ali, Jamaludin, et al. (2016). Computer vision and image processing approaches for
corrosion detection.
[7]. Imran, Jamaludin, Ayob et al (2023). Application of artificial intelligence in marine
corrosion prediction and detection.
[8]. Waszak, M., Cardaillac, A., Elvesæter, B., Rødølen, F., & Ludvigsen, M. (2019). Semantic
segmentation in underwater ship inspections: Benchmark and dataset.
[9]. Ortiz, A., Bonnin-Pascual, F., Garcia-Fidalgo, E., & Company-Corcoles, J. P. (n.d.). Vision-
based corrosion detection assisted by a micro-aerial vehicle in a vessel inspection application.
[10]. Guo Z., Wang, Yang, Huang, & Li (2021). MSFT-YOLO: Improved YOLOv5 based on
transformer for detecting defects of steel surface.
[11]. Wingert, D. (2009). Sane Victory. Retrieved from www.sanevictory.org
[12]. American Society of Civil Engineers. (2022). Retrieved from https://www.asce.org/
[13]. Nature. (2022). Corrosion study. Retrieved from https://www.nature.com/articles/s41529-
022-00232-6
[14]. Le Dinh, D., Tung Son, N., et al. (2015). Deep learning in segmentation of rust in images.
9th International Conference on Software and Computer Applications.
[15]. Vinokurov, I. V. (2019). Using a convolutional neural network to recognize text elements in
poor-quality scanned images. Program Systems: Theory and Applications.
[16]. Thorne, B. (2017). Introduction to computer vision in Python.
[17]. Nabizadeh, E., & Parghi, A. (2022). Automated corrosion detection using deep learning and
computer vision. Asian Journal of Civil Engineering.
[18]. Kim, H., Ahn, E., et al. (2018). Crack and non-crack classification from concrete surface
images using machine learning. Structural Health Monitoring, 17(2), 345-360.
[19]. Hui, J. (2018, December 7). mAP (mean average precision) for object detection. Medium.
Retrieved from https://jonathan-hui.medium.com/map-mean-average-precision-for-object-
detection-45c121a31173

51 Naval Construction Wing, IIT Delhi

You might also like