Next Article in Journal
AI-Driven Cybersecurity in IoT: Adaptive Malware Detection and Lightweight Encryption via TRIM-SEC Framework
Previous Article in Journal
Acousto-Electronic Sensor Based on Langmuir-Blodgett Films of Tetra-Tert-Butylphthalocyaninate Zinc for Chemical Vapor Detection
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
This is an early access version, the complete PDF, HTML, and XML versions will be available soon.
Article

Explainable Deep Learning Framework for Binary Corrosion Image Classification Using Grad-CAM

by
Muhammad Amir Imran Aminudin
1,
Mohd Na’im Abdullah
1,*,
Faizal Mustapha
1,
Kee Kok Eng
2,
Mazli Mustapha
2,* and
Aliyu Mustapha
3
1
Department of Aerospace Engineering, Faculty of Engineering, Universiti Putra Malaysia, Serdang 43400, Malaysia
2
Department of Mechanical Engineering, Universiti Teknologi PETRONAS, Seri Iskandar 32610, Malaysia
3
Industrial and Technology Education Department, Federal University of Technology, Minna P.M.B 65, Nigeria
*
Authors to whom correspondence should be addressed.
Sensors 2025, 25(22), 7070; https://doi.org/10.3390/s25227070 (registering DOI)
Submission received: 6 October 2025 / Revised: 16 November 2025 / Accepted: 18 November 2025 / Published: 19 November 2025
(This article belongs to the Section Sensing and Imaging)

Abstract

Corrosion in metallic materials is a critical challenge in maintenance and safety, and traditional visual inspection methods are often time-consuming, labor-intensive, and dependent on human expertise, highlighting the need for more efficient and reliable solutions. Deep learning, particularly convolutional neural networks (CNNs), provides a promising approach by enabling automated and accurate image-based classification. This study investigates binary image classification of corrosion using four pre-trained CNN architectures, namely ResNet50, MobileNetV2, NASNetMobile, and EfficientNetV2B0, and integrates explainable artificial intelligence (XAI) techniques to provide interpretability and insight into each model’s decision-making process. A curated dataset of 4012 images, divided between corroded and non-corroded surfaces, was pre-processed, and augmented images resulted in a total of 9636 images used to train and evaluate the models. Performance was assessed through accuracy, confusion matrices, computational timing, receiver operating characteristic curves, precision–recall curves, and Cohen’s Kappa. In this paper, Gradient-weighted Class Activation Mapping (Grad-CAM) visualizations are incorporated as an XAI technique to provide interpretable insight into the model’s reasoning process, enabling clear identification of corrosion regions and offering justification for each prediction produced by the system. A key contribution of this work is the integration of Grad-CAM to enhance explainability. The results showed that EfficientNetV2B0 demonstrates stable training with minimal sign overfitting compared to other models. MobileNetV2 achieved the lowest time to train with the datasets given, and ResNet50 achieved the highest classification performance in terms of confusion matrix, with an accuracy of 96.58%. Through Grad-CAM reasoning, EfficientNetV2B0 shows a specific high activation towards corroded regions compared to the other three models that were evaluated.
Keywords: deep learning; convolutional neural networks (CNN); binary classification; corrosion detection; non-destructive testing deep learning; convolutional neural networks (CNN); binary classification; corrosion detection; non-destructive testing

Share and Cite

MDPI and ACS Style

Aminudin, M.A.I.; Abdullah, M.N.; Mustapha, F.; Eng, K.K.; Mustapha, M.; Mustapha, A. Explainable Deep Learning Framework for Binary Corrosion Image Classification Using Grad-CAM. Sensors 2025, 25, 7070. https://doi.org/10.3390/s25227070

AMA Style

Aminudin MAI, Abdullah MN, Mustapha F, Eng KK, Mustapha M, Mustapha A. Explainable Deep Learning Framework for Binary Corrosion Image Classification Using Grad-CAM. Sensors. 2025; 25(22):7070. https://doi.org/10.3390/s25227070

Chicago/Turabian Style

Aminudin, Muhammad Amir Imran, Mohd Na’im Abdullah, Faizal Mustapha, Kee Kok Eng, Mazli Mustapha, and Aliyu Mustapha. 2025. "Explainable Deep Learning Framework for Binary Corrosion Image Classification Using Grad-CAM" Sensors 25, no. 22: 7070. https://doi.org/10.3390/s25227070

APA Style

Aminudin, M. A. I., Abdullah, M. N., Mustapha, F., Eng, K. K., Mustapha, M., & Mustapha, A. (2025). Explainable Deep Learning Framework for Binary Corrosion Image Classification Using Grad-CAM. Sensors, 25(22), 7070. https://doi.org/10.3390/s25227070

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop