# Research on Improved Lightweight YOLOv5s for Multi-Scale Ship Target Detection
## 4 Experimental Results and Discussion
### Experimental Results and Analysis  
To further verify the detection performance of the proposed model, this study trained and tested Yolov5s and the improved lightweight Yolov5s_ESGW model on MSD. Figure 7 shows the changes in mAP0.5 values of the two models during the training process. Figure 8 compares the detection speed and complexity of the two models. Figure 9 shows the detection results of ship visible light targets by the two models in scenarios such as heavy fog, semi-obstruction, and targets of different scales. Figure 10 shows the ability of the two models to extract regions of interest during the training process. Figure 7 shows the change process of mAP0.5 during the training process. In the first 50 epochs, the mAP0.5 values of the two models increased rapidly. From the 50 th epoch to the 125 th epoch training, the mAP0.5 value gradually increased slowly, reaching about 0.8. At this stage, the original Yolov5s model mAP0.5 value is higher than the method proposed in this study. However, the mAP0.5 value of the original Yolov5s model fluctuates greatly. From the 125 th epoch to the end of training, the mAP0.5 values of both models tend to be stable. At this time, the mAP0.5 value of the method proposed in this study generally shows an upward trend and is significantly higher than the original Yolov5s model. This shows that the detection model proposed in this study has excellent detection performance. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Algorithms** & **Precision** & **mAP0.5** & **GFLOPs** & **Parameters** \\ \hline Yolov5s(baseline) & 0.836 & 0.824 & 15.8 & 7.03 \\ yolov5s + EfficientNetv2 & 0.827 & 0.825 & 5.6 & 5.42 \\ yolov5s + EfficientNetv2 + Shuffle Attention [24] & 0.831 & 0.827 & 5.6 & 5.42 \\ yolov5s + EfficientNetv2 + SimAM [26] & 0.837 & 0.817 & 5.6 & 5.42 \\ yolov5s + EfficientNetv2 + EMA [27] & 0.809 & 0.821 & 5.8 & 5.47 \\ yolov5s + EfficientNetv2 + CA [28] & 0.815 & 0.822 & 5.6 & 5.45 \\ yolov5s + EfficientNetv2 + NAM [29] & 0.818 & 0.822 & 5.6 & 5.42 \\ yolov5s + EfficientNetv2 + Shuffle Attention + Ghost & 0.817 & 0.824 & 5.0 & 4.02 \\ yolov5s + EfficientNetv2 + Shuffle Attention + Ghost + Wise-IOU & 0.833 & 0.825 & 5.0 & 4.02 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Ablation experiment results. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Algorithms** & **mAP0.5** & **Intel(R) Core(TM) i7-12700H (ms/Image)** \\ \hline Yolov5s(baseline) & 0.824 & 85.2 \\ yolov5s + EfficientNetv2 & 0.825 & 78.6 \\ yolov5s + EfficientNetv2 + Shuffle Attention & 0.827 & 77.4 \\ yolov5s + EfficientNetv2 + Shuffle Attention + Ghost & 0.824 & 69.2 \\ yolov5s + EfficientNetv2 + Shuffle Attention + Ghost + Wise-IOU & 0.825 & 60.0 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Model detection efficiency comparison. Figure 8 shows a comparative analysis of the parameters, detection time for each picture, mAP0.5 value, GFLOPs, and file size of the original Yolov5s model and the improved Yolov5s_ESGW model. The parameter volume of the improved Yolov5s_ESGW model is 4.02M, GFLOPs is 5, each picture detection takes 60 ms, mAP0.5 is 82.5%, and the file size is 8.02 MB. Compared with the Yolov5s baseline model, the number of parameters decreased by 42.82%, the detection time of each picture decreased by 29.58%, the mAP0.5 value increased by 0.1%, GFLOPs decreased by 68.35%, and the file size was reduced by 41.46%. Taken together, the algorithm proposed in this study requires fewer calculations and parameters and has excellent detection performance. At the same time, the demand for hardware computing resources during the ship target detection process is low, and they are more suitable for deployment in edge terminals or embedded devices. Figure 8: Comparison of complexity and detection time consumption of two models. Figure 7: Changes in mAP0.5 during the training process of the two algorithms.