## 5 Conclusions  
In this study, to address the problems of insufficient precision and low recall arising from ship detection, an improved YOLOv5 algorithm for ship target detection was proposed by improving the backbone part, neck part, and loss function, using YOLOv5s as the baseline model. The experimental results show that the algorithm, with no large increase in the number of parameters and detection speeds that meet real-time requirements, is effective in improving the performance of the algorithm by improving the sensing field, using lightweight convolution, and improving the loss function; thus, the performance of the algorithm is effectively improved.  
Restrictions in the current model exist in the recognition of targets from complex backgrounds. Currently, due to limitations in the public dataset used, this study was limited to ship detection in mostly good weather. Although the sample is more than adequate, the background is mostly simple, with the sea and harbor as the main focus. Future research will further enrich the maritime traffic elements in the ship dataset to ensure that ships can be accurately identified, even in more complex maritime traffic environments. In practical applications, such as facing rain, snow, haze, and other bad weather, image enhancement methods such as panning, flipping, contrast enhancement, and other image enhancement methods can be additionally added, or algorithmic fusion such as dark channel de-fogging algorithm can be used as a means of enhancing the robustness and  
Figure 8: Comparison of partially detected images; (**a**) confidence improvement; (**b**) false identification improvement; (**c**) missed identification improvement; (**d**) multi-target overlapping.  
generalization of the model; these measures will provide a technical basis for the next step in carrying out complex tasks such as ship tracking under complicated conditions. At the same time, while ensuring that the algorithm has high detection accuracy, strong robustness, and good model performance, efforts will be made to improve the detection speed of the model, appropriately delete the redundant structure of the algorithm, lighten the model, and enhance the portability of the algorithm.  
Additionally, the next step will be to try to apply the improved algorithm to other goals. We designed the algorithm for ships because there is a practical need for it. We believe that the algorithm can also be effective in detecting other targets, especially objects that are similar in shape to ships (e.g., cars), because the receptive field enhancement module and lightweight module are beneficial for target detection. In the future, we will continue to try to explore the generalizability of the algorithm.  
Conceptualization, L.W. and Y.Z.; methodology, L.W.; software, L.W.; validation, Y.L. and Y.X.; investigation, L.W. and Y.Z.; resources, Y.Z. and B.S.; data curation, L.W. and S.Y.; writing--original draft preparation, L.W.; writing--review and editing, Y.Z. and B.S.; supervision, Y.Z.; project administration, Y.Z. and B.S.; funding acquisition, Y.Z. All authors have read and agreed to the published version of the manuscript.  
This research was funded by the Shanghai Science and Technology Plan Project, grant number 20040501200.  
Not applicable.  
No new data were created in this study. The data analyzed in this study are from dataset SeaShips (accessed on 1 June 2023), which could be downloaded from the website, [[https://github.com/jimaging-wang/SeaShips](https://github.com/jimaging-wang/SeaShips)]([https://github.com/jimaging-wang/SeaShips](https://github.com/jimaging-wang/SeaShips)).  
The authors thank the staff from the Experimental Auxiliary System and the Information Center of Shanghai Synchrotron Radiation Facility (SSRF) for on-site assistance with the GPU computing system.  
The authors declare no conflict of interest.