A Study of Corrosion-Grade Recognition on Metal Surfaces Based on Improved YOLOv8 Model
Abstract
:Highlights
- An improved YOLOv8 model is proposed.
- The improved YOLOv8 model achieves significant performance improvements.
- The model provides an automated, efficient, and accurate solution for detecting metal equipment corrosion.
- The optimization strategies can serve as valuable references for other computer vision tasks, promoting advancements in related fields.
Abstract
1. Introduction
2. Materials and Methods
2.1. YOLOv8 Model Overview
2.2. Model Improvement Methods
2.2.1. Attention Mechanism
2.2.2. Data Augmentation
2.2.3. Learning Rate Adjustment
2.3. Dataset Production
2.4. Experimental Environment and Evaluation Indicators
3. Results
3.1. YOLOv8 Model Ablation Experiment
3.2. Comparison Experiment of Different Detection Models
4. Discussion
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
Abbreviations
YOLO | You Only Look Once |
FPN | Feature Pyramid Network |
PAN | Path Aggregation Network |
CSPDarknet | Cross-Stage Partial Darknet |
C2f | Faster Implementation of CSP Bottleneck with two convolutions |
Conv | Convolution |
SPPF | Spatial Pyramid Pooling Fast |
mAP | Mean average precision |
GELU | Gaussian Error Linear Units |
SiLU | Sigmoid Linear Unit |
RoI | Region of interest |
References
- Fang, W.; Chen, H.; Liu, X. Research on Corrosion Causes of Common Metal Material in Power Grid; IOP Conference Series: Earth and Environmental Science; IOP Publishing: Bristol, UK, 2020; Volume 512, p. 012107. [Google Scholar]
- Landolfo, R.; Cascini, L.; Portioli, F. Modeling of metal structure corrosion damage: A state of the art report. Sustainability 2010, 2, 2163–2175. [Google Scholar] [CrossRef]
- He, Y.; Song, K.; Meng, Q.; Yan, Y. An end-to-end steel surface defect detection approach via fusing multiple hierarchical features. IEEE Trans. Instrum. Meas. 2019, 69, 1493–1504. [Google Scholar] [CrossRef]
- Xu, J.; Gui, C.; Han, Q. Recognition of rust grade and rust ratio of steel structures based on ensembled convolutional neural network. Comput. Aided Civ. Infrastruct. Eng. 2020, 35, 1160–1174. [Google Scholar] [CrossRef]
- Nelson, B.N.; Slebodnick, P.F.; Lemieux, E.J.; Singleton, W.; Krupa, M.S.; Lucas, K.; Thomas, E.D.; Seelinger, A. Wavelet processing for image denoising and edge detection in automatic corrosion detection algorithms used in shipboard ballast tank video inspection systems. In Proceedings of the Wavelet Applications VIII, Orlando, FL, USA, 18–20 April 2001; SPIE: Belling ham, WA, USA, 2001; Volume 4391, pp. 134–145. [Google Scholar]
- Liao, K.W.; Lee, Y.T. Detection of rust defects on steel bridge coatings via digital image recognition. Autom. Constr. 2016, 71, 294–306. [Google Scholar] [CrossRef]
- Tian, Z.; Zhang, G.; Liao, Y.; Li, R.; Huang, F. Corrosion identification of fittings based on computer vision. In Proceedings of the 2019 International Conference on Artificial Intelligence and Advanced Manufacturing (AIAM), Dublin, Ireland, 16–18 October 2019; IEEE: Piscataway, NJ, USA, 2019; pp. 592–597. [Google Scholar]
- Guo, Z.; Tian, Y.; Mao, W. A robust faster R-CNN model with feature enhancement for rust detection of transmission line fitting. Sensors 2022, 22, 7961. [Google Scholar] [CrossRef]
- Katsamenis, I.; Doulamis, N.; Doulamis, A.; Protopapadakis, E.; Voulodimos, A. Simultaneous Precise Localization and Classification of metal rust defects for robotic-driven maintenance and prefabrication using residual attention U-Net. Autom. Constr. 2022, 137, 104182. [Google Scholar] [CrossRef]
- Zhao, Z.; Guo, G.; Zhang, L.; Li, Y. A new anti-vibration hammer rust detection algorithm based on improved YOLOv7. Energy Rep. 2023, 9, 345–351. [Google Scholar] [CrossRef]
- Wang, Q.; Wu, B.; Zhu, P.; Li, P.; Zuo, W.; Hu, Q. ECA-Net: Efficient channel attention for deep convolutional neural networks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Seattle, WA, USA, 13–19 June 2020; pp. 11534–11542. [Google Scholar]
- Woo, S.; Park, J.; Lee, J.Y.; Kweon, I.S. Cbam: Convolutional block attention module. In Proceedings of the European Conference on Computer Vision (ECCV), Munich, Germany, 8–14 September 2018; pp. 3–19. [Google Scholar]
- Yu, Q.; Han, Y.; Lin, W.; Gao, X. Detection and analysis of corrosion on coated metal surfaces using enhanced YOLO v5 algo rithm for anti-corrosion performance evaluation. J. Mar. Sci. Eng. 2024, 12, 1090. [Google Scholar] [CrossRef]
- Hussain, M. YOLO-v1 to YOLO-v8, the rise of YOLO and its complementary nature toward digital manufacturing and industrial defect detection. Machines 2023, 11, 677. [Google Scholar] [CrossRef]
- Li, C.; Yan, H.; Qian, X.; Zhu, S.; Zhu, P.; Liao, C.; Tian, H.; Li, X.; Wang, X.; Li, X. A domain adaptation YOLOv5 model for industrial defect inspection. Measurement 2023, 213, 112725. [Google Scholar] [CrossRef]
- Wang, Y.; Wang, H.; Xin, Z. Efficient detection model of steel strip surface defects based on YOLO-V7. IEEE Access 2022, 10, 133936–133944. [Google Scholar] [CrossRef]
- Zhao, L.; Li, S. Object detection algorithm based on improved YOLOv3. Electronics 2020, 9, 537. [Google Scholar] [CrossRef]
- Sohan, M.; Sai, R.T.; Reddy, R. A review on yolov8 and its advancements. In Proceedings of the International Conference on Data Intelligence and Cognitive Informatics, Tirunelveli, India, 18–20 November 2024; Springer: Singapore, 2024; pp. 529–545. [Google Scholar]
- Terven, J.; Córdova-Esparza, D.M.; Romero-González, J.A. A comprehensive review of yolo architectures in computer vision: From yolov1 to yolov8 and yolo-nas. Mach. Learn. Knowl. Extr. 2023, 5, 1680–1716. [Google Scholar] [CrossRef]
- Zhang, X. Improved Multi-Detection Head Target Detection Algorithm For YOLOv8. In Proceedings of the 2024 IEEE 2nd In ternational Conference on Image Processing and Computer Applications (ICIPCA), Shenyang, China, 28–30 June 2024; IEEE: Piscataway, NJ, USA, 2024; pp. 1500–1503. [Google Scholar]
- Zhang, Y.; Zhang, H.; Huang, Q.; Han, Y.; Zhao, M. DsP-YOLO: An anchor-free network with DsPAN for small object detection of multiscale defects. Expert Syst. Appl. 2024, 241, 122669. [Google Scholar] [CrossRef]
- Xie, Y.; Shen, J.; Wu, C. Affine geometrical region CNN for object tracking. IEEE Access 2020, 8, 68638–68648. [Google Scholar] [CrossRef]
- Nicheporuk, A.; Savenko, O.; Nicheporuk, A.; Nicheporuk, Y. An Android Malware Detection Method Based on CNN Mixed Data Model. In Proceedings of the ICTERI Workshops, Kharkiv, Ukraine, 6–10 October 2020; pp. 198–213. [Google Scholar]
- Ding, N.; Möller, K. The Image flip effect on a CNN model classification. Proc. Autom. Med. Eng. 2023, 2, 755. [Google Scholar]
- Zhang, X.; Chen, Q.; Ng, R.; Koltun, V. Zoom to learn, learn to zoom. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Long Beach, CA, USA, 15–20 June 2019; pp. 3762–3770. [Google Scholar]
- Gao, L.; Wei, X.; Li, C.; Zhang, X.; Sun, Y.; Lin, W. Threat target image detection method based on two-stage R-CNN network. In Proceedings of the International Conference on Mechatronics and Intelligent Control (ICMIC 2024), Nanchang, China, 27–29 December 2024; SPIE: Bellingham, WA, USA, 2025; Volume 13447, pp. 96–100. [Google Scholar]
- Liu, H.; Qiao, J.; Li, L.; Wang, L.; Chu, H.; Wang, Q. Parallel CNN Network Learning-Based Video Object Recognition for UAV Ground Detection. Wirel. Commun. Mob. Comput. 2022, 2022, 2701217. [Google Scholar] [CrossRef]
- Kim, C.; Shin, D.; Kim, B.; Park, J. Mosaic-CNN: A combined two-step zero prediction approach to trade off accuracy and computation energy in convolutional neural networks. IEEE J. Emerg. Sel. Top. Circuits Syst. 2018, 8, 770–781. [Google Scholar] [CrossRef]
- Wu, Y.; Liu, L.; Bae, J.; Chow, K.-H.; Iyengar, A.; Pu, C.; Wei, W.; Yu, L.; Zhang, Q. Demystifying learning rate policies for high accuracy training of deep neural networks. In Proceedings of the 2019 IEEE International Conference on Big Data (Big Data), Los Angeles, CA, USA, 9–12 December 2019; IEEE: Piscataway, NJ, USA, 2019; pp. 1971–1980. [Google Scholar]
- Zhang, C.; Shao, Y.; Sun, H.; Xing, L.; Zhao, Q.; Zhang, L. The WuC-Adam algorithm based on joint improvement of Warmup and cosine annealing algorithms. Math. Biosci. Eng 2024, 21, 1270–1285. [Google Scholar] [CrossRef]
- Altmayer, F. Critical aspects of the salt spray test. Plat. Surf. Fin. 1985, 72, 36–40. [Google Scholar]
- Yakovlev, A.; Lisovychenko, O. An approach for image annotation automatization for artificial intelligence models learning. Адаптивні системи автoматичнoгo управління 2020, 1, 32–40. [Google Scholar] [CrossRef]
- Vakili, M.; Ghamsari, M.; Rezaei, M. Performance analysis and comparison of machine and deep learning algorithms for IoT data classification. arXiv 2020, arXiv:2001.09636. [Google Scholar]
- Ren, S.; He, K.; Girshick, R.; Sun, J. Faster R-CNN: Towards real-time object detection with region proposal networks. IEEE Trans. Pattern Anal. Mach. Intell. 2016, 39, 1137–1149. [Google Scholar] [CrossRef] [PubMed]
- Zhai, S.; Shang, D.; Wang, S.; Dong, S. DF-SSD: An improved SSD object detection algorithm based on DenseNet and feature fusion. IEEE Access 2020, 8, 24344–24357. [Google Scholar] [CrossRef]
- Zhu, M.; Kong, E. Multi-scale fusion uncrewed aerial vehicle detection based on RT-DETR. Electronics 2024, 13, 1489. [Google Scholar] [CrossRef]
- Olorunshola, O.E.; Irhebhude, M.E.; Evwiekpaefe, A.E. A comparative study of YOLOv5 and YOLOv7 object detection algorithms. J. Comput. Soc. Inform. 2023, 2, 1–12. [Google Scholar] [CrossRef]
Chemical Composition (%) | C | Si | Mn | P | S |
---|---|---|---|---|---|
10# | 0.07–0.13 | 0.17–0.37 | 0.35–0.65 | ≤0.035 | ≤0.030 |
20# | 0.17–0.23 | 0.17–0.37 | 0.35–0.65 | ≤0.035 | ≤0.030 |
25# | 0.22–0.29 | 0.17–0.37 | 0.50–0.80 | ≤0.035 | ≤0.035 |
30# | 0.27–0.35 | 0.17–0.37 | 0.50–0.80 | ≤0.035 | ≤0.035 |
35# | 0.32–0.39 | 0.17–0.37 | 0.50–0.80 | ≤0.035 | ≤0.030 |
45# | 0.42–0.50 | 0.17–0.37 | 0.50–0.80 | ≤0.035 | ≤0.035 |
Q195 | 0.06–0.12 | ≤0.30 | 0.25–0.50 | ≤0.050 | ≤0.045 |
Q235 | 0.12–0.22 | ≤0.30 | 0.30–0.80 | 0.035–0.045 | 0.035–0.045 |
Q345 | ≤0.20 | ≤0.55 | ≤1.70 | 0.025–0.045 | 0.025–0.045 |
Chemical Composition (%) | Cr | Ni | Cu | V | Al |
---|---|---|---|---|---|
10# | ≤0.15 | ≤0.30 | ≤0.25 | \ | \ |
20# | ≤0.20 | ≤0.30 | ≤0.25 | \ | \ |
25# | ≤0.20 | ≤0.30 | ≤0.25 | \ | \ |
30# | ≤0.25 | ≤0.25 | ≤0.25 | \ | \ |
35# | ≤0.20 | ≤0.30 | ≤0.25 | \ | \ |
45# | ≤0.20 | ≤0.30 | ≤0.25 | \ | \ |
Q195 | ≤0.03 | ≤0.03 | ≤0.03 | \ | \ |
Q235 | \ | \ | \ | \ | \ |
Q345 | \ | \ | \ | 0.02–0.15 | 0/≥ 0.015 |
Hyperparameter | Value |
---|---|
Optimizer | SGD |
Initial learning rate | 0.01 |
Weight decay factor | 0.0005 |
Momentum fixed value | 0.937 |
Batch size | 64 |
Training wheels | 50 |
Input size | 640 × 640 |
Model | Corrosion Class | Precision | Recall | F1 Score | mAP |
---|---|---|---|---|---|
YOLOv8 | all | 80.3% | 83.8% | 82% | 90.3% |
Level 1 | 83.6% | 92.1% | 87.6% | 93.6% | |
Level 2 | 88.5% | 84.3% | 86.5% | 95.0% | |
Level 3 | 86.3% | 70.2% | 77.4% | 88.9% | |
Level 4 | 65.4% | 88.9% | 75.4% | 84.2% | |
Level 5 | 77.7% | 83.5% | 80.4% | 89.7% | |
YOLOv8-1 | all | 88.6% | 91.1% | 89.9% | 92.9% |
Level 1 | 91.4% | 93.8% | 92.6% | 95.1% | |
Level 2 | 96.7% | 97.3% | 97% | 97.2% | |
Level 3 | 92.2% | 85.6% | 88.8% | 93.4% | |
Level 4 | 77.5% | 92.2% | 84.2% | 86.3% | |
Level 5 | 85.1% | 86.7% | 86% | 92.3% | |
YOLOv8-2 | all | 91.4% | 93.9% | 92.6% | 95.4% |
Level 1 | 94.8% | 95.2% | 95% | 97.6% | |
Level 2 | 96.9% | 99.3% | 98.3% | 97.8% | |
Level 3 | 93.6% | 90.5% | 92.1% | 95.2% | |
Level 4 | 82.4% | 96% | 88.7% | 91.8% | |
Level 5 | 89.3% | 88.6% | 89% | 94.4% | |
YOLOv8-3 | all | 92% | 95% | 93.6% | 96.3% |
Level 1 | 96.1% | 95.3% | 95.6% | 98.2% | |
Level 2 | 97.2% | 99.8% | 98.5% | 98.3% | |
Level 3 | 94.1% | 93.4% | 93.7% | 96.5% | |
Level 4 | 83.3% | 96.8% | 89.5% | 92.7% | |
Level 5 | 89.5% | 89.5% | 89.5% | 95.6% |
Model | Precision | Recall | mAP | F1 Score | FPS |
---|---|---|---|---|---|
Faster R-CNN | 82.9% | 76.8% | 87.2% | 79.7% | 42.24 |
SSD | 62.3% | 78.1% | 74% | 69.2% | 51.73 |
RT-DETR | 79.6% | 81.5% | 88.4% | 80.1% | 48.86 |
YOLOv5 | 71.3% | 89.3% | 86.7% | 79.3% | 53.62 |
YOLOv7 | 75.5% | 87.8% | 90.7% | 81.3% | 56.08 |
Improved YOLOv8 | 92% | 95% | 96.3% | 93.6% | 51.12 |
Model | Corrosion Class | Level 1 Confidence Score | Level 2 Confidence Score | Level 3 Confidence Score | Level 4 Confidence Score | Level 5 Confidence Score |
---|---|---|---|---|---|---|
Faster R-CNN | Level 1 | 0.96 | 0.86 | 0.63 | 0.56 | 0.52 |
Level 2 | 0.89 | 0.93 | 0.76 | 0.62 | 0.57 | |
Level 3 | 0.57 | 0.65 | 0.79 | 0.81 | 0.71 | |
Level 4 | 0.52 | 0.57 | 0.78 | 0.7 | 0.62 | |
Level 5 | 0.43 | 0.42 | 0.51 | 0.65 | 0.59 | |
SSD | Level 1 | 0.98 | 0.89 | 0.81 | 0.65 | 0.61 |
Level 2 | 0.91 | 0.86 | 0.82 | 0.71 | 0.56 | |
Level 3 | 0.61 | 0.68 | 0.78 | 0.7 | 0.63 | |
Level 4 | 0.42 | 0.39 | 0.65 | 0.72 | 0.83 | |
Level 5 | 0.36 | 0.45 | 0.63 | 0.84 | 0.88 | |
RT-DETR | Level 1 | 0.99 | 0.89 | 0.78 | 0.49 | 0.51 |
Level 2 | 0.88 | 0.96 | 0.88 | 0.6 | 0.51 | |
Level 3 | 0.48 | 0.79 | 0.89 | 0.81 | 0.6 | |
Level 4 | 0.4 | 0.4 | 0.56 | 0.62 | 0.6 | |
Level 5 | 0.49 | 0.46 | 0.7 | 0.75 | 0.78 | |
YOLOv5 | Level 1 | 0.92 | 0.75 | 0.5 | 0.49 | 0.45 |
Level 2 | 0.85 | 0.88 | 0.84 | 0.7 | 0.51 | |
Level 3 | 0.52 | 0.72 | 0.87 | 0.73 | 0.61 | |
Level 4 | 0.4 | 0.42 | 0.61 | 0.66 | 0.59 | |
Level 5 | 0.3 | 0.54 | 0.65 | 0.7 | 0.72 | |
YOLOv7 | Level 1 | 0.98 | 0.9 | 0.85 | 0.72 | 0.71 |
Level 2 | 0.83 | 0.93 | 0.79 | 0.69 | 0.61 | |
Level 3 | 0.4 | 0.72 | 0.95 | 0.75 | 0.74 | |
Level 4 | 0.41 | 0.52 | 0.69 | 0.87 | 0.84 | |
Level 5 | 0.42 | 0.52 | 0.55 | 0.74 | 0.9 | |
Improved YOLOv8 | Level 1 | 0.99 | 0.74 | 0.52 | 0.43 | 0.24 |
Level 2 | 0.64 | 0.97 | 0.75 | 0.52 | 0.35 | |
Level 3 | 0.49 | 0.65 | 0.95 | 0.75 | 0.56 | |
Level 4 | 0.42 | 0.46 | 0.69 | 0.85 | 0.76 | |
Level 5 | 0.39 | 0.42 | 0.52 | 0.79 | 0.93 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Chen, H.; Cao, Y.; Cao, S.; Piao, H. A Study of Corrosion-Grade Recognition on Metal Surfaces Based on Improved YOLOv8 Model. Sensors 2025, 25, 2630. https://doi.org/10.3390/s25082630
Chen H, Cao Y, Cao S, Piao H. A Study of Corrosion-Grade Recognition on Metal Surfaces Based on Improved YOLOv8 Model. Sensors. 2025; 25(8):2630. https://doi.org/10.3390/s25082630
Chicago/Turabian StyleChen, Hao, Ying Cao, Shengxian Cao, and Heng Piao. 2025. "A Study of Corrosion-Grade Recognition on Metal Surfaces Based on Improved YOLOv8 Model" Sensors 25, no. 8: 2630. https://doi.org/10.3390/s25082630
APA StyleChen, H., Cao, Y., Cao, S., & Piao, H. (2025). A Study of Corrosion-Grade Recognition on Metal Surfaces Based on Improved YOLOv8 Model. Sensors, 25(8), 2630. https://doi.org/10.3390/s25082630