Next Article in Journal
Experimental Study on RAP with High Recycling Content Based on High-Modulus Asphalt Mixture
Previous Article in Journal
A Sintering–Resting Strategy of Microwave Heating for Lithium Hydride Ceramic Based on Numerical Analysis of Thermal Effects
 
 
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

Impact of Activation Functions on the Detection of Defects in Cast Steel Parts Using YOLOv8

1
School of Intelligent Manufacturing and Control Engineering, Shanghai Polytechnic University, Pudong District, Shanghai 201209, China
2
School of Materials Science and Engineering, Shanghai Jiao Tong University, Minhang District, Shanghai 200240, China
*
Author to whom correspondence should be addressed.
Materials 2025, 18(12), 2834; https://doi.org/10.3390/ma18122834
Submission received: 7 May 2025 / Revised: 10 June 2025 / Accepted: 12 June 2025 / Published: 16 June 2025

Abstract

In this paper, to address the issue of the unknown influence of activation functions on casting defect detection using convolutional neural networks (CNNs), we designed five sets of experiments to investigate how different activation functions affect the performance of casting defect detection. Specifically, the study employs five activation functions—Rectified Linear Unit (ReLU), Exponential Linear Units (ELU), Softplus, Sigmoid Linear Unit (SiLU), and Mish—each with distinct characteristics, based on the YOLOv8 algorithm. The results indicate that the Mish activation function yields the best performance in casting defect detection, achieving an mAP@0.5 value of 90.1%. In contrast, the Softplus activation function performs the worst, with an mAP@0.5 value of only 86.7%. The analysis of the feature maps shows that the Mish activation function enables the output of negative values, thereby enhancing the model’s ability to differentiate features and improving its overall expressive power, which enhances the model’s ability to identify various types of casting defects. Finally, gradient class activation maps (Grad-CAM) are used to visualize the important pixel regions in the casting digital radiography (DR) images processed by the neural network. The results demonstrate that the Mish activation function improves the model’s focus on grayscale-changing regions in the image, thereby enhancing detection accuracy.
Keywords: activation function; YOLOv8; gradient-weighted class activation mapping (Gradient-CAM); deep learning activation function; YOLOv8; gradient-weighted class activation mapping (Gradient-CAM); deep learning

Share and Cite

MDPI and ACS Style

Chen, Y.; He, Y.; Chu, Y. Impact of Activation Functions on the Detection of Defects in Cast Steel Parts Using YOLOv8. Materials 2025, 18, 2834. https://doi.org/10.3390/ma18122834

AMA Style

Chen Y, He Y, Chu Y. Impact of Activation Functions on the Detection of Defects in Cast Steel Parts Using YOLOv8. Materials. 2025; 18(12):2834. https://doi.org/10.3390/ma18122834

Chicago/Turabian Style

Chen, Yunxia, Yangkai He, and Yukun Chu. 2025. "Impact of Activation Functions on the Detection of Defects in Cast Steel Parts Using YOLOv8" Materials 18, no. 12: 2834. https://doi.org/10.3390/ma18122834

APA Style

Chen, Y., He, Y., & Chu, Y. (2025). Impact of Activation Functions on the Detection of Defects in Cast Steel Parts Using YOLOv8. Materials, 18(12), 2834. https://doi.org/10.3390/ma18122834

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