With the continuous development of China ’s shipping industry,the flow of ships in the sea area is growing rapidly,and the corresponding problems are also emerging in an endless stream,such as illegal fishing,piracy,drug trafficking,illegal cargo transportation and untimely rescue of maritime accidents.Therefore,it is necessary to monitor some sea areas to realize the management of sea areas.At present,ship detection in sea area management must rely on ship cruise,which not only consumes manpower,material and financial resources,but also has very low efficiency.The traditional ship detection method is mainly based on the target detection of conventional ships.This method is difficult to meet the requirements of complex scenes at sea,and it is difficult to detect long-distance ship targets,thus increasing the difficulty of sea area management.Moreover,the realtime performance of traditional ship detection algorithms needs to be improved.In this thesis,a lightweight ship detection algorithm combining attention mechanism and data enhancement is proposed to form a real-time monitoring system,which will effectively improve the accuracy and real-time performance of ship small target detection algorithm,and has important theoretical significance and application value for China’s ocean management.The main work of this thesis is as follows :(1)The scale of the data set was expanded through network crawling,image synthesis and other technologies,and the ship small target data set was established,including sunny,foggy and multiple scenes of the target being blocked,and the ship target was marked according to the detection requirements.(2)Aiming at the problem that long-distance ship feature information is weak and difficult to identify.This paper proposes ship target recognition based on CA attention mechanism.The attention module is inserted into the Backbone to strengthen the extraction of top-level feature information and ensure that the feature information of small targets is paid more attention.This attention mechanism can be perfectly combined with the original Yolov5 s structure to obtain the model CA-Yolov5.Experiments show that the accuracy of the optimized model is improved by 2.2 %.Then,the online data enhancement of CA-Yolov5 is improved by adding Mix Up and Copy-Paste data enhancement to obtain CA+-Yolov5,which meets the requirements of rich data set quality,and the accuracy of the enhanced algorithm is improved by 0.4 %.(3)Learning from the idea of Ghost Net,the improved C3 Ghost module and Ghost Conv convolution are used for lightweight network processing,and the volume of the model is optimized so that it can better meet the deployment requirements of edge devices.Based on the CA+-Yolov5 network model obtained above,C3 Ghost module is used to replace the original C3 module,and new Ghost Conv is used to replace the original convolution in Backbone structure,forming the CG-Yolov5 network model.Experiments show that the CG-Yolov5 lightweight detection model can greatly reduce the number of parameters while sacrificing less precision.Compared with the traditional Yolov5 s model,the accuracy of the CG-Yolov5 model reaches 95.9%.(4)Combined with the demand of efficient and reliable ship management,a ship target detection platform is designed based on pyqt5,which can realize picture,video and real-time detection,and obtains good results,laying a solid foundation for later development of relevant applications. |