# Detection of Welding Defects Using the YOLOv8-ELA Algorithm
## 4 Conclusions  
Through comparative experiments, the improved YOLOv8-ELA model significantly enhanced the precision of detecting aluminum alloy weld seam DR defects, with its overall performance being markedly superior to that of the other models. Specifically, compared to the original YOLOv8 models, the proposed YOLOv8-ELA architecture establishes a new state-of-the-art approach in terms of weld defect detection, outperforming existing methods by 1.3% [EMAIL_ADDRESS] on the benchmark dataset. The detection accuracy for pores, slag inclusions, and incomplete penetration was notably improved.  
The core reason for the YOLOv8-ELA model achieving improved accuracy while reducing the parameters by 34.1% lies in its efficient co-design of structural optimization and attention mechanisms: depthwise separable convolutions were introduced via the HS-FPN module to reconstruct the feature pyramid network. The standard convolution is decomposed into two steps--channel-wise spatial filtering and cross-channel fusion--significantly reducing the computational complexity. Specifically, the parameters of 3 \(\times\) 3 convolutions are reduced by 89% (e.g., a 256-channel convolution is reduced from 589,824 to 65,792), and redundant calculations in multi-scale branches are avoided through a cross-layer parameter sharing strategy. Meanwhile, the ELA attention mechanism replaces traditional CA's global compression with 1 \(\times\) 7 and 7 \(\times\) 1 axial strip pooling, accurately capturing the anisotropic characteristics of elongated defects in aluminum welding seam DR images with only a 3.5K parameter increase. The SimAM module dynamically enhances the small target feature responses using a parameter-free energy function. These three components work synergistically to achieve a balance between reducing the model parameters and improving the detection accuracy. Although there is a slight increase in the detection speed, it remains within an acceptable range. Compared with most commercial detection models, the YOLOv8-ELA model demonstrates superior overall detection performance and is better suited for industrial applications.  
Although the overall performance of the model has been enhanced through structural optimization and the integration of attention mechanisms, detecting small targets such as tiny pores and small slag inclusions remains a significant challenge. For example, the recall and precision for identifying pores are still relatively low. Nonetheless, this limitation provides a clear direction for future optimization efforts. Future work will focus on introducing dynamic receptive field modules or implementing targeted data augmentation strategies to address these challenges.  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Group** & **HS-FPN** & **ELA** & **SIMAM** & **[EMAIL_ADDRESS]** & **\#Params** & **FLOPs** \\ \hline
0 & & & & 94.1\% & 3,011,417 & 8.1 G \\
1 & \(\surd\) & & & 94.7\%(\{\uparrow 0.6\%\}\) & 1,933,913 & 6.8 G \\
2 & \(\surd\) & \(\surd\) & & 95.1\%(\(\uparrow\)1.0\%) & 1,982,745 & 6.9 G \\
3 & \(\surd\) & \(\surd\) & \(\surd\) & 95.4\%(\(\uparrow\)1.3\%) & 1,982,745 & 8.1 G \\ \hline \hline \end{tabular}
\end{table}
Table 5: Comparison of the ablation experiments.  
**Author Contributions:** Conceptualization, validation, writing--original draft preparation, Y.C., L.W. and Y.H.; writing--review and editing, Y.C. All authors have read and agreed to the published version of the manuscript.  
**Funding:** This research was funded by the National Natural Science Foundation of China (no.51809161).  
**Institutional Review Board Statement:** Not applicable.  
**Informed Consent Statement:** Not applicable.  
**Data Availability Statement:** The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding author.  
**Conflicts of Interest:** The authors declare that they have no conflicts of competing financial interests in this paper.