# Intelligent Detection of Underwater Defects in Concrete Dams Based on YOLOv8s-UEC
## 3 Experiments and Results
### Network Ablation Study  
To ensure that the proposed underwater defect detection network YOLOv8s-UEC had the best performance, an ablation study was carried out using multiple networks containing different improvements and comparing their results to further explore the contribution of each improvement module to the network, and the way of combining the modules is shown in Table 1.  
The study was conducted on a workstation equipped with an Intel Core i7-12700F processor manufactured by Intel Corporation (Silicon Valley, Santa Clara, CA, USA), and an NVIDIA 3080 graphics card manufactured by NVIDIA Corporation (Silicon Valley, Santa Clara, CA, USA), with 42 GB of GPU memory. The algorithm ran under training conditions of CUDA 12.2, Python 3.9, and PyTorch 1.12. To ensure the objectivity of the experimental results, all training parameters for the networks were kept consistent. The batch size was set to 4 based on the GPU memory size. Various training epochs were tested, and when set to 300, the model converged without overfitting. Additionally, mosaic augmentation was disabled in the final 10 epochs, and the initial learning rate was set to 0.01. The training results for five networks are shown in Figure 13, which shows that the training loss tended to converge after slowly decreasing, and after turning off Mosaic enhancement, the loss further decreased to stabilize, before the accuracy gradually increased and finally reached the peak value. The statistical evaluation results of different networks on the test set are summarized in Table 2. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Network Name** & **Network Structure** & **Adopted Module** & **Loss Function** & **Head Number** \\ \hline YOLOv8s & Origin & C2f & CloU & 3 \\ YOLOv8s-ER & E-RepGFPN & C2f & CloU & 3 \\ YOLOv8s-EC & E-RepGFPN & C2f & CloU & 3 \\ YOLOv8s-IEC & E-RepGFPN + P2 & C2f-CN & CloU & 4 \\ YOLOv8s-UEC & E-RepGFPN + P2 & C2f-CN & Focal-EloU & 4 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Network settings for different improvement methods. Figure 13: Loss and _mAP_ curves of different networks in training process: (**a**) loss curve, (**b**) _mAP_ curve. According to Table 2, it can be seen that the detection performance rose with the continuous improvement of the network. By introducing the Efficient-RepGFPN structure, \(mAP_{0.5}\) was improved by 0.3%, while \(mAP_{0.50.95}\) was improved by 1.9%; by introducing the ConvNeXt Block module, \(mAP_{0.5}\) was improved by 0.5% while \(mAP_{0.50.95}\) was improved by 5.0%; by fusing the P2 detection layer, \(mAP_{0.5}\) was improved by 1.3% while \(mAP_{0.50.95}\) was improved by 5.4%, and a certain loss of detection speed was compensated for by using the Focal-EIoU loss while ensuring accuracy. Finally, the proposed YOLOv8s-UEC achieved the highest \(F_{1}\), \(mAP_{0.5}\), and \(mAP_{0.50.95}\) values, improving by 2.15%, 1.4%, and 5.8%, respectively, compared to the original network. The network detection speed reached 107 FPS, supporting the need for online detection after model export for deployment on mobile devices. Moreover, the detection performance of different networks for different categories of defects was improved, and the \(mAP_{0.5}\) indexes of each category test are collated in Table 3. According to the data results, the proposed YOLOv8s-UEC network effectively improved the detection accuracy of various types of defects compared with the original network. Adopting the Efficient-RepGFPN structure that integrates the P2 detection layer effectively improved the feature extraction capability of the network, and it had a better capability to deal with the problem of the huge difference in the proportion of pixels occupied by the underwater defects in the image, as well as the blurring of the boundaries between the defects and the background, which proves that the proposed YOLOv8s-UEC network can deal with the task of detecting the underwater defects and has a good performance.