| There is a long coastline and many ports in China,and most of the domestic navigable inland rivers across the east and west to the estuary,with superior shipping conditions.With the implementation of strategies such as "One Belt and One Road" and "Yangtze River Economic Zone",it is increasingly important to improve the ship’s intelligent navigation capability and the efficiency of ship monitoring.Ship target detection is one of the contents of ship intelligent navigation and monitoring.As a supplement to navigation and supervision equipment such as radar and automatic identification system(AIS),target detection algorithm based on computer vision and deep learning has become a new important navigation and reliable monitoring methods.In recent years,in order to improve the generality and accuracy of convolution neural network,the model has been gradually developed to have larger parameters and deeper network layers.However,this detection algorithm with high computational complexity and huge model structure has some drawbacks,such as low detection efficiency,difficult training,high requirements on hardware configuration,and disadvantage of universal application.For the detection of a single class of objects such as ships,such models also have problems such as increased risk of fitting and poor real-time performance.For ship detection,in addition to requiring high detection accuracy of the model,it is also important to improve the detection speed and reduce the size of the model to reduce the requirements for hardware configuration.Due to the balanced performance of YOLOv3 detection algorithm in detection accuracy and speed,this paper improves the YOLOv3 detection algorithm based on convolution neural network,and puts forward a lightweight realtime detection model LSDM-LAPN on the premise of ensuring the detection accuracy.The main contents of this paper are as follows:First,the advantages and disadvantages of two-stage and one-stage detection algorithms are analyzed,and the one-stage detection algorithms YOLOv3 and YOLOv3-tiny are analyzed in detail to provide theoretical basis for subsequent research;the development environment of PyTorch and OpenCV is built using Anaconda.Secondly,image enhancement methods such as image flipping,motion blurring,HSV transformation are used to expand the self-built ship dataset,and a ship image stitching method is designed and implemented to improve the detection difficulty of the dataset.K-means++clustering algorithm is used to cluster the ship border,and the initial parameters of the anchor are obtained.Then,the border regression loss function and non-maximum suppression are studied.Analyses the aspect ratio of the target to be measured in large open datasets and self-built datasets,improves the Io U according to the aspect ratio of ships,increases the width regression penalty in the aspect ratio consistency evaluation function,improves the accuracy of border regression,improves the non-maximum suppression,uses DIoU as distance measure to distinguish the border groups,and uses confidence as weight to the border groups.The target border position is calculated by weighted averaging to improve the target positioning accuracy.Finally,the backbone and attention mechanism of YOLOv3 are studied.A lightweight backbone network LSDM based on dense connection structure is proposed.The parameters of the improved backbone network are much lower than those of the original network.The improved feature pyramid network(FPN)is combined with ECA attention mechanism and spatial separation convolution to improve the feature pyramid network.The improved feature pyramid LAPN improves the efficiency of feature utilization and reduces the amount of parameters.The YOLOv3,YOLOv3-tiny and the improved algorithms LSDM-LAPN and LSDM-tiny are experimented on the built dataset.The results show that the improved loss function and nonmaximum suppression method improve the detection accuracy and positioning accuracy.LSDM-LAPN,an improved YOLOv3 algorithm based on lightweight backbone network and attention pyramid,greatly reduces the model volume and improves the detection speed while guaranteeing the detection accuracy.It can meet the requirements of accurate,lightweight and real-time for assisted navigation and ship monitoring and has application value. |