# An Improved YOLOv5 Model for Detecting Laser Welding Defects of Lithium Battery Pole
## 3 Experiments and Analysis
### Experimental Results and Discussion
#### 3.2.2 Experiments on the MS COCO and PASCAL VOC Datasets  
To verify the effectiveness of our improvement of the YOLOv5 algorithm, we conducted ablation experiments on the MS COCO and PASCAL VOC datasets. We set the training period to 300 epochs, and kept the other experimental settings the same as Table 2. The experimental results are shown in Table 6. \begin{table}
\begin{tabular}{c c c c c c c c c c} \hline \hline
**Dataset** & **SPPSE** & **6 \(\times\) 6** & **RepVGG** & **SloU** & \begin{tabular}{c} **Params** \\ **(M)** \\ \end{tabular} & \begin{tabular}{c} **[EMAIL_ADDRESS]** \\ **(\%)** \\ \end{tabular} & \
\begin{tabular}{c} **[EMAIL_ADDRESS]** \\ **(\%)** \\ \end{tabular} &
\begin{tabular}{c} **mAP@small** \\ **(\%)** \\ \end{tabular} \\ \hline \multirow{4}{*}{MS COCO} & \(\surd\) & & & & 7.2 & 357 & 56.8 & 37.0 & 20.4 \\  & \(\surd\) & & & 13.6 & 323 & 58.7 & 38.6 & 21.0 \\  & \(\surd\) & \(\surd\) & & 18.4 & 313 & 59.1 & 39.3 & 21.6 \\  & \(\surd\) & \(\surd\) & \(\surd\) & & 21.5 & 303 & 59.6 & 40.1 & 22.2 \\  & \(\surd\) & \(\surd\) & \(\surd\) & \(\surd\) & 21.5 & 303 & 59.8 & 40.3 & 22.8 \\ \hline \multirow{4}{*}{PASCAL VOC} & \(\surd\) & & & & 7.1 & 370 & 78.9 & 54.3 & - \\  & \(\surd\) & \(\surd\) & & & 13.5 & 333 & 80.0 & 56.1 & - \\ \cline{1-1}  & \(\surd\) & \(\surd\) & & & 18.2 & 323 & 80.9 & 57.9 & - \\ \cline{1-1}  & \(\surd\) & \(\surd\) & \(\surd\) & & 21.3 & 286 & 81.1 & 58.1 & - \\ \cline{1-1}  & \(\surd\) & \(\surd\) & \(\surd\) & \(\surd\) & 21.3 & 294 & 81.3 & 58.3 & - \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Ablation experiments on the MS COCO and PASCAL VOC datasets. Figure 8: Comparison of the detection results of different models. (a) YOLOv5 model. (b) YOLOv5-ours model. The ablation experiments were conducted with the YOLOv5 model as the baseline, and the marked tick represents the addition of this improvement item. From the experiments on MS COCO, it can be found that when the network model was replaced with the SPPSE module, [EMAIL_ADDRESS] increased by 1.9%, [EMAIL_ADDRESS]:0.95 rose by 1.6%, and the average detection accuracy for small targets rose by 0.6%, indicating that SPPSE had the effect of focusing on small targets, and could thus increase the detection accuracy; in addition, the number of model parameters increased by 6.4 million (M) and the fps decreased from 357 to 323. After replacing the convolutional kernel of the backbone network to 6 \(\times\) 6, [EMAIL_ADDRESS] increased by 0.4% and [EMAIL_ADDRESS]:0.95 increased by 0.9%, the detection accuracy of small targets increased by 0.6%, the number of parameters increased by 4.8 M to 18.4 M, and the fps became 313, indicating that after expanding the convolutional kernel of the backbone network, its feature extraction ability was enhanced and the average detection accuracy was also improved; meanwhile, the complexity of the model did not increase significantly, and it could still achieve real-time detection. When the RepVGG module was added to the network model, [EMAIL_ADDRESS] and mAP0.5:0.95 increased by 0.5% and 0.8%, respectively, and the small target detection accuracy improved by 0.4%, the number of parameters reached 21.5 M, and the fps decreased by 10 to 303, indicating that the RepVGG module can increase the feature extraction ability of the detection head and then increase the average detection accuracy while improving the model's inference speed. Finally, after replacing the loss function with SloU, [EMAIL_ADDRESS] and [EMAIL_ADDRESS]:0.95 both improved by 0.2%. Although the average accuracy increase was not as good as other improvements, the small target detection accuracy was improved by 0.6%, the number of parameters and fps of the model remained unchanged, which indicates that SloU can improve the detection accuracy without increasing the complexity of the model. The ablation experiments on the PASCAL VOC dataset can also demonstrate that each improvement to the original YOLOv5 model can improve the detection accuracy of the algorithm.