# Detection of Welding Defects Using the YOLOv8-ELA Algorithm
## 1 Introduction  
Aluminum alloys are crucial in modern manufacturing due to their light weight, high strength, and corrosion resistance. However, welding defects like pores and slag inclusions frequently occur during processing, compromising the structural integrity even with advanced laser welding. Digital radiography (DR) enables defect visualization through X-ray absorption differences, but manual inspection poses radiation risks and requires specialized expertise. To address these limitations, researchers are developing deep learning-based automated detection systems to achieve rapid, high-precision defect identification in X-ray images [1]. Given the critical importance of aluminum alloy welds in industrial applications, achieving near-perfect defect detection accuracy is of paramount significance. Enhancing the precision of deep learning models for detecting defects in aluminum alloy welds has become a primary focus in terms of model optimization [2]. Early deep learning models in the field of object detection are exemplified by the region-based convolutional neural network (R-CNN) series. The R-CNN model, proposed by [PERSON] et al. in 2014, marked the first integration of convolutional neural networks (CNNs) with region proposal algorithms (e.g., selective search). This approach enabled object localization and classification by generating candidate regions and extracting CNN features, significantly enhancing the detection accuracy of object detection models and establishing the foundation for the two-stage detection framework [3]. Subsequent improvements, such as Faster R-CNN, further advanced the detection accuracy [4, 5]. These two-stage models frequently demonstrate reduced detection velocities, rendering them less amenable to industrial applications. In 2016, [PERSON] and his team introduced the single-stage detection model You Only Look Once (YOLOv1) [6], and in the same year, the Single Shot MultiBox Detector (SSD) algorithm was proposed [7]. Although these single-stage algorithms do not match the accuracy of two-stage models like the RCNN, their detection speed has met the requirements for real-time detection. Nowadays, scholars continue to enhance deep learning algorithms, with the widespread adoption of object detection models such as YOLOv5 [8; 9; 10; 11; 12; 13; 14; 15], YOLOv6 [16], YOLOv7 [17], YOLOv8, and DETR [18; 19]. Thanks to research on these models, deep learning algorithms have continually improved in terms of the speed, accuracy, and parameter efficiency. [PERSON] and colleagues enhanced the object detection accuracy by incorporating convolutional block attention mechanism (CBAM) modules [20] into the convolutional layers of the YOLOv5 backbone network. They further applied the K-means clustering algorithm to reduce the sensitivity to initial clustering centers, thereby improving the localization accuracy and reducing the network loss [21]. [PERSON] designed a deep separable convolutional module (SPD Conv) and integrated it into YOLOv5 and Residual Network (ResNet), constructing new CNN architectures that achieved significant improvements in accuracy [22]. In this experiment, ResNet, a landmark deep learning model introduced by [PERSON] et al. in 2015, addresses the issue of the \"accuracy decreasing rather than increasing when the number of network layers grows\" caused by the gradient explosion and vanishing gradients in deep neural networks [23]. In order to further enhance the detection performance of current mainstream target detection algorithms and assist the target detection model in identifying defects in aluminum alloy welds via DR images in the future, this study focuses on optimizing the model parameters and improving the detection accuracy. Moreover, to tackle the issue of the low recall rates during the detection process, particularly for small defects such as pores and inclusions with pixel sizes below a certain threshold that are especially difficult to detect, an enhanced YOLOv8 network is proposed.