# Research on Improved Lightweight YOLOv5s for Multi-Scale Ship Target Detection
## 4 Experimental Results and Discussion
### Ablation Experiment and Functional Verification  
To verify the detection performance of the proposed model, five sets of ablation experiments were used in this study, as shown in Table 4. The first set of experiments uses the original yolov5s model for training as the baseline model for ablation experiments. The second set of experiments used MBConv and Fused-MBConv modules to improve the backbone part of the yolov5s model. Compared with the baseline model, the improved model adopts a compound scaling strategy and stage-wise architecture in the feature extraction network and optimizes the width, depth, and resolution of the model. At the same time, depthwise separable convolution is integrated into the MBConv module, which greatly reduces the amount of calculation and parameters of the model while ensuring the detection performance. The GFLOPs and parameter count of the model decreased by 64.56% and 22.90%, respectively. The detection performance of the model is comparable to that of the baseline model, with mAP0.5 increasing by 0.1% and detection accuracy decreasing by 0.9%. In order to further improve the detection performance of the model, the third set of experiments added a lightweight attention mechanism based on the second set of experiments. Among them, the addition of the Shuffle Attention mechanism has made the overall performance of the model the most obvious improvement. The detection accuracy and mAP0.5 have increased by 0.4% and 0.2%, respectively, and the number of GFLOPs and parameters has hardly increased. This is mainly because the Shuffle Attention mechanism can better capture the correlation between channels, improve the model's ability to express important features, and suppress unimportant feature information, thereby enhancing the detection performance of the model. To further compress the GFLOPs and parameters of the model, the fourth group of experiments, based on the third group of experiments, improved the model head layer by using the idea of generating redundant feature information through a cheap linear transformation in the Ghost network, thereby reducing the computational cost of the model. Compared with previous improvements, the GFLOPs and parameters of the model dropped by 10.71% and 25.83%, respectively, but the detection accuracy and mAP0.5 dropped by 0.3% and 1.4%, respectively. Based on the fourth set of experiments, the fifth set of experiments uses the Wise-IOU loss function to improve the model and more accurately evaluate the degree of overlap between the predicted bounding box and the true bounding box. Compared with the fourth group, the detection accuracy of the model increased by 1.6%, and the mAP0.5 value increased by 0.1%. The results of five ablation experiments show that the improvement measures  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Environment** & **Version** \\ \hline OS & Linux \\ CPU & Intel(R) Core(TM) i7-12700H 2.30 GHz \\ GPU & RTX 3090(24 GB) \\ RAM & 16 G \\ CUDA & Cuda 11.3 \\ Python & Python 3.8 \\ Pytorch & PyTorch 1.10.0 \\ \hline \hline \end{tabular}
\end{table}
Table 3: Experimental environment configuration.  
proposed in this study can significantly reduce the complexity of the model while ensuring that the detection accuracy of the model remains basically unchanged.  
To further verify the detection efficiency of the improved model, this study compared the detection speed of different models on CPU (model: Intel(R) Core(TM) i7-12700H). As shown in Table 5, the baseline model requires 85.2 ms for each image detection. With the improvement of model lightweighting, the method proposed in the fifth set of ablation experiments has the fastest detection speed on the CPU, at 60.0 ms. Compared with the baseline model, the inference time is reduced by 29.58%, and the mAP0.5 value is increased by 0.001. Overall, this study has a significant effect on improving multi-scale ship target detection methods.