Keywords— AI-based corrosion detection; custom YOLOv8 dataset; early detection; mobile-based platform;
Corrosion poses immense risks to structures. Current visual inspection methods are time-consuming and subjective. Introducing AI-based corrosion detection using YOLOv8 promises precise, real-time identification on mobile platforms, ensuring safer infrastructure with reduced manual inspections and improved maintenance across industries reliant on metal structures.
This AI-driven corrosion detection system, utilizing a custom YOLOv8 dataset, operates via a mobile interface. Its architecture boasts a web front-end enabling video upload or real-time webcam detection. Powered by Flask, it manages HTTP interactions, file handling, and delivers seamless result viewing for enhanced user experience.
For this project, the use of instance segmentation for corrosion detection was proposed. Unlike object detection, instance segmentation not only detects the presence of objects in an image, but also identifies the boundaries of each object instance. This approach can be particularly useful for detecting and analyzing individual instances of corrosion within an image.
- Object Detection: Firstly, it runs object detection to find all bounding boxes for every object in an image
- Semantic Segmentation: After finding all the rectangles (bounding boxes), it uses a semantic segmentation model inside every rectangle
- Instance Segmentation: Masking identifying the boundaries of objects
Collected 705 corroded surface images, annotated via Roboflow for instance segmentation. Augmentation doubled dataset to 1398 images through flips and resizing. Split into training (1200), validation (141), and testing (57) sets. Crucial steps: collection, annotation, augmentation, and division for robust ML model development in corrosion detection.
In simple terms, IoU measures the degree of overlap between the predicted bounding box and the ground truth bounding box, expressed as a percentage. A diagrammatic representation of IoU is shown in the accompanying figure[6],
Flask is a Python web framework that enables developers to create web applications by integrating various web technologies, such as HTML, CSS, and Python files[9].
The provided table showcases the performance metrics of different models (YoloV8x, YoloV8n, YoloV5x, and YoloV5n) in terms of precision and recall at a confidence level of 0.5. Additionally, it presents the video rendering duration for each model, measured using both the Command Line Interface (CLI) and Python. YoloV8x achieves a precision of 0.71 and a recall of 0.62, with a video rendering duration of 100 seconds (14.5 average FPS) using CLI and 1205 seconds (1.12 average FPS) using Python. YoloV8n demonstrates a precision of 0.72 and a recall of 0.59, with a video rendering duration of 64 seconds (21.0 average FPS) using CLI and 144 seconds (9.35 average FPS) using Python. YoloV5x exhibits a precision of 0.69 and a recall of 0.64, with a video rendering duration of 1082 seconds (1.24 average FPS). Finally, YoloV5n showcases a precision of 0.69 and a recall of 0.66, with a video rendering duration of 160 seconds (8.43 average FPS).
In conclusion, a mobile-based AI-driven corrosion detection system was successfully developed using YOLOv8. This system provides users with the capability to upload videos, access webcams, and store video detections on a local server. Comparative analysis between YOLOv8 and YOLOv5 revealed that YOLOv8 outperformed YOLOv5 in terms of precision, exhibiting improvements of 2.90% for the extra-large size and 4.35% for the nano size. Moreover, YOLOv8 demonstrated significant speed enhancements, achieving an impressive 89.16% improvement for the extra-large size and 94.09% improvement for the nano size. This AI-based corrosion detection system makes valuable contributions to the field by offering an effective solution for early detection on mobile platforms and IoT devices.