## 4 Ship Detection  
The effect of the deraining model for promoting the performance of ship detection in visual perception system is verified in this section. Because rain streaks can degrade the visibility of ships under complex weather conditions, the incorporation of effective image enhancement would be helpful in several vision models. Therefore, an improved YOLO V5 network was selected to perform ship detection task jointly with our deraining model. Besides, the ship detection dataset used for network training was constructed using a UAV to photograph an independently designed surface unmanned vessel \"Lan Xin\", as shown in Figure 8a. In particular, the rainy image was obtained by synthesizing rain streaks, as shown in Figure 8b. To test the effectiveness of the image enhancement method in this paper for ship detection, the ships detection network was trained with the noisy dataset and the corresponding clear images processed by the image rain removal network. Specifically, the performance of DTDNet and the proposed network were furtherly compared. The training results are shown in Figure 9. From Figure 9, the accuracy of the detection network trained with the clear images dataset which processed by the rain removal network steadily increased. The accuracy fluctuation was lighter than the network trained with the blurred images dataset. Besides, the recall rate reached the highest value earlier and stabilized. It is proved that the deraining network can provide better stability in the training of a ship detection network. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Attention Mechanism and** & **Phase 1 Dual** & **Phase 2 Dual** & **Improved Loss** & **PSNR/SSIM** \\
**Pyramid Pooling Layer** & **Channel Module** & **Channel Module** & **Function** & **PSNR/SSIM** \\ \hline \(\surd\) & \(\surd\) & \(\surd\) & \(\surd\) & **31.43/0.9126** \\ \(\surd\) & \(\surd\) & \(\times\) & \(\times\) & 29.934/0.891 \\ \(\times\) & \(\times\) & \(\surd\) & \(\times\) & 29.413/0.877 \\ \(\times\) & \(\times\) & \(\times\) & \(\surd\) & 28.739/0.843 \\ \(\surd\) & \(\surd\) & \(\surd\) & \(\times\) & 30.47/0.906 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Results of ablation experiment on Rain14000. Figure 8: Example of “Lan Xin” dataset. (**a**) Original image of “Lan Xin”. (**b**) Synthesized rainy image. Quantitative results for the improvement of the ship detection accuracy in addition to the deraining performance are reported in Figure 10. Among them, (a) and (c) are the detection results of the rain image, (b) and (d) are the corresponding detection results of the deraining image processed by the designed rain removal network, (e) and (f) are the detection results of rainy images before and after rain removal processing with DTDNet. Figure 10: Detection results of ship images based on rain removal network. (**a**) detection result of rainy image 1. (**b**) detection result of deraining image of (**a**) based proposed method. (**c**) detection result of rainy image 2. (**d**) detection result of deraining image of (**c**) based proposed method. (**e**) detection result of rainy image 1. (**f**) detection result of deraining image of (**e**) based DTDNet. Figure 9: Comparison of the training results of the rainy image and the processed image in the ship detection network. (**a**) Training result for rainy image. (**b**) Training result for deraining image. The detection results show that although the ships in (a), (c), and (f) are correctly detected, the confidence is significantly lower than the detection confidence of the detection network for the clear image. Meanwhile, the confidence in comparison (b) is significantly higher than that in comparison (f), indicating that the rain removal network in this paper is more suitable for ship target detection tasks on rainy days than DTDNet.