Open Access iconOpen Access

ARTICLE

An Improved Aluminum Surface Defect Detection Algorithm Based on YOLOv8n

Hao Qiu, Shoudong Ni*

School of Mechanical and Power Engineering, Nanjing Tech University, Nanjing, 211800, China

* Corresponding Author: Shoudong Ni. Email: email

Computers, Materials & Continua 2025, 84(2), 2677-2697. https://doi.org/10.32604/cmc.2025.064629

Abstract

In response to the missed and false detections that are easily caused by the large variety of and significant differences among aluminum surface defects, a detection algorithm based on an improved You Only Look Once (YOLO)v8n network is proposed. First, a C2f_DWR_DRB module is constructed by introducing a dilation-wise residual (DWR) module and a dilated reparameterization block (DRB) to replace the C2f module at the high level of the backbone network, enriching the gradient flow information and increasing the effective receptive field (ERF). Second, an efficient local attention (ELA) mechanism is fused with the high-level screening-feature pyramid networks (HS-FPN) module, and an ELA_HSFPN is designed to replace the original feature fusion module, enhancing the ability of the network to cope with multiscale detection tasks. Moreover, a lightweight shared convolutional detection head (SCDH) is introduced to reduce the number of parameters and the computational complexity of the module while enhancing the performance and generalizability of the model. Finally, the soft intersection over union (SIoU) replaces the original loss function to improve the convergence speed and prediction accuracy of the model. Experimental results show that compared with that of the original YOLOv8n model, the mAP@0.5 of the improved algorithm is increased by 5.1%, the number of parameters and computational complexity are reduced by 33.3% and 32.1%, respectively, and the FPS is increased by 4.9%. Compared with other mainstream object detection algorithms, the improved algorithm still leads in terms of core indicators and has good generalizability for surface defects encountered in other industrial scenarios.

Keywords

Aluminum surface defects; YOLOv8n; object detection; attention mechanism

Cite This Article

APA Style
Qiu, H., Ni, S. (2025). An Improved Aluminum Surface Defect Detection Algorithm Based on YOLOv8n. Computers, Materials & Continua, 84(2), 2677–2697. https://doi.org/10.32604/cmc.2025.064629
Vancouver Style
Qiu H, Ni S. An Improved Aluminum Surface Defect Detection Algorithm Based on YOLOv8n. Comput Mater Contin. 2025;84(2):2677–2697. https://doi.org/10.32604/cmc.2025.064629
IEEE Style
H. Qiu and S. Ni, “An Improved Aluminum Surface Defect Detection Algorithm Based on YOLOv8n,” Comput. Mater. Contin., vol. 84, no. 2, pp. 2677–2697, 2025. https://doi.org/10.32604/cmc.2025.064629



cc Copyright © 2025 The Author(s). Published by Tech Science Press.
This work is licensed under a Creative Commons Attribution 4.0 International License , which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
  • 412

    View

  • 147

    Download

  • 0

    Like

Share Link