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

**Authors:** Yunxia Chen, Yangkai He, Yukun Chu

PMC · DOI: 10.3390/ma18122834 · Materials · 2025-06-16

## TL;DR

This paper investigates how different activation functions affect the performance of detecting defects in cast steel parts using YOLOv8, finding that Mish performs best.

## Contribution

The study systematically evaluates five activation functions in the context of casting defect detection, revealing the superior performance of Mish.

## Key findings

- Mish activation function achieves the highest mAP@0.5 of 90.1% for defect detection.
- Softplus performs the worst with an mAP@0.5 of 86.7%.
- Mish improves model focus on grayscale-changing regions in images via Grad-CAM visualization.

## 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.

## Full-text entities

- **Diseases:** brain tumors (MESH:D001932), injury to (MESH:D014947), DR (MESH:C000721267), neuronal (MESH:D009410)
- **Chemicals:** aluminum alloy (-), aluminum (MESH:D000535)
- **Species:** Homo sapiens (human, species) [taxon 9606]

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/PMC12195153/full.md

## Figures

11 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12195153/full.md

## References

30 references — full list in the complete paper: https://tomesphere.com/paper/PMC12195153/full.md

---
Source: https://tomesphere.com/paper/PMC12195153