# Detection of Welding Defects Using the YOLOv8-ELA Algorithm
## 3 Experiments and Results
### Comparative Experiments
This discrepancy arises due to an increased number of false detections during stomata detection, likely caused by misclassification of certain background textures as positive samples. Such misclassification may stem from the weight allocation shifts induced by the attention mechanism during the feature extraction of tiny stomata. This phenomenon provides a clear direction for subsequent optimization efforts. Overall, the comprehensive performance of the improved model remains superior to that of current mainstream object detection models. \begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline
**Model** & **Pore** & **Slaginclusion** &
\begin{tabular}{c} **Incomplete** \\ **Penetration** \\ \end{tabular} & **[EMAIL_ADDRESS]** & **FPS** & **TPI(ms)** & **\#Params** & **FLOPS** \\ \hline Ours & 93.3\% & 96.4\% & 96.5\% & 95.4\% & 93.5 & 10.7 & 2,180,582 & 4.6 \\ YOLOv8 & 91.9\% & 94.1\% & 96.4\% & 94.1\% & 87.7 & 11.4 & 3,011,417 & 6.3 \\ RT-DETR & 87.4\% & 95.5\% & 85.9\% & 89.6\% & 92.59 & 10.8 & 15,535,296 & 6.4 \\ YOLOv7 & 81.7\% & 90.5\% & 94.1\% & 88.7\% & 77.51 & 12.9 & 6,218,596 & 8.2 \\ YOLOv6 & 87.5\% & 95.0\% & 95.5\% & 92.7\% & 90.9 & 11 & 4,238,425 & 16.6 \\ YOLOv5s & 90.1\% & 93.7\% & 96.2\% & 93\% & 86.20 & 11.6 & 2,503,529 & 5.1 \\ YOLOv3 & 63.9\% & 77.6\% & 45.6\% & 62.3\% & 102.04 & 9.8 & 103,666,553 & 198.1 \\ SSD & 83\% & 91\% & 49\% & 74.11\% & 78.12 & 12.8 & 8,447,859 & 67.4 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Comparison of the results of the different models. Figure 11 presents a comparative analysis of the detection performance between the baseline model and the enhanced model. In the figure, the green regions indicate pore defects; the orange regions represent tungsten slag inclusion defects; and the pink regions correspond to incomplete penetration defects. The results clearly indicate that the improved model is capable of detecting slag inclusion defects and stomatal defects that were overlooked by the original model. By comparing the heat maps (The darker the color, the higher the level of interest the model has in that particular region.) in Figure 12, it is clear that the improved model exhibits a greater focus on small defects. However, certain misdetection phenomena remain, such as the misclassification of air holes as unpenetrated defects. Despite this, the overall detection performance of the improved model surpasses that of the original model. \begin{table}
\begin{tabular}{c c c c c} \hline \hline \multirow{2}{*}{**Model**} & \multicolumn{2}{c}{**Precision**} & \multicolumn{2}{c}{**Recall**} \\ \cline{2-5}  & **Pore** & **Slag Inclusion** & **Incomplete Penetration** & **Pore** & **Slag Inclusion** & **Incomplete Penetration** \\ \hline Ours & 90.3 & 91.9 & 95.5 & 85.7 & 94.3 & 93.8 \\ YOLOv8 & 93.1 & 91.5 & 95.8 & 80.1 & 92.3 & 93.3 \\ RT-DETR & 87.4 & 90.5 & 93.9 & 79.6 & 85.4 & 75.5 \\ YOLOv7 & 65.9 & 66.9 & 73.6 & 72.8 & 65.9 & 56.9 \\ YOLOv6 & 86.5 & 73.6 & 93.4 & 77.1 & 88.2 & 73.8 \\ YOLOv58 & 87.8 & 86.6 & 95.0 & 79.2 & 93.7 & 91.2 \\ YOLOv3 & 86.8 & 72.2 & 95.4 & 67.4 & 82.4 & 66.6 \\ SSD & 86.5 & 73.6 & 93.4 & 67.1 & 88.2 & 73.8 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Comparison of the precision and recall across the different models. Figure 11: Comparison of the model detection effects. \begin{table}
\begin{tabular}{c c c c} \hline \hline \multirow{2}{*}{**Model**} & \multicolumn{2}{c}{**F1**} \\ \cline{2-4}  & **Pore** & **Slag Inclusion** & **Incomplete Penetration** \\ \hline Ours & 87.9 & 93.1 & 94.9 \\ YOLOv8 & 86.2 & 91.9 & 94.5 \\ RT-DETR & 83.3 & 87.8 & 83.7 \\ YOLOv7 & 69.3 & 66.5 & 64.3 \\ YOLOv6 & 81.5 & 80.3 & 82.4 \\ YOLOv5s & 83.2 & 90.1 & 93.1 \\ YOLOv3 & 75.9 & 76.9 & 78.5 \\ SSD & 75.6 & 80.3 & 82.4 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: F1 scores of the different models.