Ship detection method based on YOLOv8-LSCSBD

By introducing lightweight shared convolutional layers and independent batch normalization layers into the ship detection model, the problems of difficulty in real-time operation and low detection accuracy in existing technologies under resource-constrained environments are solved, achieving model lightweighting and improved accuracy, and making it suitable for fields such as maritime monitoring and remote sensing image analysis.

CN119314051APending Publication Date: 2025-01-14NORTH CHINA UNIVERSITY OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411449173.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-17
Publication Date
2025-01-14

AI Technical Summary

Technical Problem

Existing ship detection models are difficult to run in real time under resource-constrained environments, and their detection accuracy is not ideal, especially for small targets or complex backgrounds, and they cannot meet the requirements for high-precision detection.

Method used

By combining the YOLOv8 model and the Lightweight Shared Convolutional Detection Head (LSCSBD), a lightweight rotation detection network is constructed. By introducing lightweight shared convolutional layers and independent batch normalization layers, the number of model parameters and computational complexity are reduced, while the detection accuracy is improved.

Benefits of technology

The model achieves lightweight design and improved accuracy, making it suitable for real-time ship detection in resource-constrained environments. This enhances detection efficiency and accuracy, particularly for both small and large ship targets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119314051A_ABST
    Figure CN119314051A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of ship detection, and discloses a ship detection method based on YOLOv8-LSCSBD, and the method comprises the steps: constructing a training set and a test set based on a ship detection reference data set; on the basis of the YOLOv8 model, combining a lightweight shared convolution detection head to construct a lightweight rotation detection network; training the lightweight rotation detection network by using the training set to obtain a YOLOv8-LSCSBD detection model, and evaluating the performance of the model by using the test set; and inputting a ship image to be detected into the trained YOLOv8-LSCSBD detection model, and outputting a ship detection result by the YOLOv8-LSCSBD detection model. According to the invention, the YOLOv8 model and the lightweight shared convolution detection head LSCSBD are combined to form a lightweight rotation detection network for ship type detection, and the detection efficiency and precision are improved while the lightweight of the model is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of ship detection, and more specifically to a ship detection method based on YOLOv8-LSCSBD. Background Art

[0002] With the continuous increase in the number of ships at sea and the frequent occurrence of maritime accidents, the maritime department has put forward higher requirements for the management of ships at sea, and strengthening ship detection has become an important task. At present, the existing technologies mainly use the standard YOLOv8 model and its traditional detection head for ship detection. In these existing technologies, the models usually use full-size convolutional neural networks and standard detection heads to process high-resolution remote sensing images to achieve detection and classification of ship targets. However, these models have some significant shortcomings and deficiencies: first, the traditional detection head has a high number of parameters and computational complexity. Specifically, the number of parameters is as high as 3,077,804, and the computational complexity is 8.3GFLOPs, which makes it difficult for the model to run in real time in resource-constrained environments (such as drones and embedded devices), limiting its deployment in practical applications; second, due to the large scale of the model, it is easy to overfit, and the detection accuracy of small targets or complex backgrounds is not ideal. Especially in tasks that require high-precision positioning and classification, the detection accuracy (mAP) of the traditional model is only 0.66, which cannot meet the requirements of accurate detection and classification. Therefore, the existing technology needs to be improved in terms of model lightweight, computational efficiency and detection accuracy. An innovative method is urgently needed to reduce model complexity while improving detection performance. Summary of the invention

[0003] The purpose of the present invention is to provide a ship detection method based on YOLOv8-LSCSBD, which combines the YOLOv8 model with the lightweight shared convolutional detection head LSCSBD to form a lightweight rotation detection network for ship type detection, thereby achieving model lightweight while improving detection efficiency and accuracy.

[0004] To achieve the above object, the present invention provides the following solutions:

[0005] The present invention provides a ship detection method based on YOLOv8-LSCSBD, comprising the following steps:

[0006] S1, construct training set and test set based on the ship detection benchmark dataset;

[0007] S2, based on the YOLOv8 model, combines the lightweight shared convolution detection head to build a lightweight rotation detection network;

[0008] S3, use the training set to train the lightweight rotation detection network to obtain the YOLOv8-LSCSBD detection model, and use the test set to evaluate the performance of the YOLOv8-LSCSBD detection model;

[0009] S4, input the ship image to be detected into the trained YOLOv8-LSCSBD detection model, and the YOLOv8-LSCSBD detection model outputs the ship detection result, which includes the bounding box and category information of the ship.

[0010] Furthermore, in S1, the ship detection benchmark dataset adopts the ShipRSImageNet dataset, which includes 3435 images from multiple sensors, multiple satellite platforms, different geographical locations and seasons. The resolution of each image is approximately 930×930 pixels, covering ship targets of different scales, directions and aspect ratios.

[0011] Furthermore, the ShipRSImageNet dataset has a total of 17,573 ship instances annotated, and the annotations are divided into horizontal bounding boxes HBB and oriented bounding boxes OBB.

[0012] Furthermore, in S2, based on the YOLOv8 model, a lightweight shared convolution detection head is combined to construct a lightweight rotation detection network, which specifically includes:

[0013] The YOLOv8 model includes a feature extraction module based on the darknet53 network and a multi-scale feature fusion module based on pafpn;

[0014] The lightweight shared convolution detection head includes a lightweight shared convolution layer and an independent batch normalization layer;

[0015] The feature extraction module, the multi-scale feature fusion module, the lightweight shared convolutional layer, and the batch normalization layer are connected in sequence.

[0016] Furthermore, after the multi-scale feature fusion module, each feature layer first adjusts the number of channels to the number of hidden channels through a 1×1 convolution layer, and then inputs the feature fusion result into a lightweight shared convolution layer. After each lightweight shared convolution layer, the batch normalization layer applies the corresponding independent batch normalization and activation function to perform bounding box regression and classification prediction.

[0017] Furthermore, in S3, the lightweight rotation detection network is trained using the training set to obtain a YOLOv8-LSCSBD detection model, which specifically includes:

[0018] Based on the level 2 labels and OBB annotations of the ShipRSImageNet dataset, the lightweight rotation detection network was trained on the ShipRSImageNet dataset. During the training process, the ubuntu20.04 operating system, pytorch1.11, cuda101 acceleration environment, and RTX2089Ti graphics card were selected as the training environment.

[0019] Furthermore, S3 uses the test set to evaluate the performance of the YOLOv8-LSCSBD detection model, specifically including:

[0020] Three key indicators, namely parameter quantity, computational complexity and accuracy, are selected to evaluate the performance of the YOLOv8-LSCSBD detection model.

[0021] Furthermore, the category information includes three types of ships: warships, merchant ships and other ships.

[0022] It can be seen from the above technical solution that, compared with the prior art, the beneficial effects of the present invention are:

[0023] The ship detection method based on YOLOv8-LSCSBD provided by the present invention is based on the YOLOv8 model and combined with a lightweight shared convolution detection head to construct a lightweight rotation detection network. First, the lightweight shared convolution layer in the lightweight shared convolution detection head greatly reduces the number of parameters and the amount of calculation of the model, making the model more efficient when processing high-resolution images, which is conducive to processing large-scale data sets. The reduction of parameters not only reduces the storage and memory requirements, but also improves the reasoning speed of the model, which is of great significance for applications that require real-time detection, such as maritime monitoring and navigation; secondly, the independent batch normalization layer ensures that the model can maintain high-precision detection performance when processing ship targets of different scales and directions. The independent batch normalization layer allows each detection layer to be adjusted according to its feature distribution, avoiding feature confusion that may be caused by the shared convolution layer, thereby improving the detection accuracy of small and large ship targets. In addition, the lightweight and high efficiency of the model make it more suitable for deployment in resource-constrained environments, such as satellites and drones that need to run on edge devices. These platforms usually have limited computing and storage capabilities, but need to process and analyze data in real time. The improved model can meet the needs of these applications without significantly sacrificing performance.

[0024] The present invention achieves the dual goals of model lightweighting and improved accuracy, and economically reduces the cost of model deployment and operation. In terms of social benefits, the model can be applied to fields such as maritime monitoring and remote sensing image analysis, improving the efficiency and accuracy of ship detection, helping to ensure maritime safety and improve resource utilization efficiency, thus having significant social and economic value. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0026] Figure 1 Schematic diagram of the structure of the lightweight shared convolution detection head of the present invention;

[0027] Figure 2 These are three image examples from the ShipRSImageNet dataset of the present invention;

[0028] Figure 3 It is a schematic diagram of the detection results during the testing process of the model of the present invention. DETAILED DESCRIPTION

[0029] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0030] The purpose of the present invention is to provide a ship detection method based on YOLOv8-LSCSBD, which combines YOLOv8 and a lightweight shared convolutional detection head (LSCSBD) to form a lightweight rotation detection network for ship type detection.

[0031] The method uses the ShipRSImageNet dataset dedicated to ship detection in high-resolution optical remote sensing images. By introducing lightweight shared convolutional layers and independent batch normalization layers in the detection model, the number of model parameters is reduced from 3,077,804 to 2,377,193, a decrease of about 22.8%; the computational complexity (GFLOPs) is reduced from 8.3 to 6.6, a decrease of about 20.5%; at the same time, the detection accuracy (mAP) is increased from 0.66 to 0.69, an increase of about 4.5%. The present invention can accurately detect the types of three types of ships, namely warships, merchant ships and other ships, from the perspective of remote sensing platforms such as drones, and accurately locate the position of the ship by rotating the detection frame. The detection accuracy of merchant ships is as high as 93.5%, and the overall detection accuracy reaches 69%.

[0032] The technical improvements proposed in the present invention not only achieve the dual goals of model lightweighting and accuracy improvement, reducing the cost of model deployment and operation, but also have significant social and economic value in the fields of maritime monitoring, remote sensing image analysis, etc., which helps to improve the efficiency and accuracy of ship detection, ensure maritime safety, and improve resource utilization efficiency.

[0033] In order to better understand the purpose, structure and function of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings.

[0034] The embodiment of the present invention discloses a ship detection method based on YOLOv8-LSCSBD, comprising:

[0035] S1, constructing a training set and a test set based on a ship detection benchmark dataset; preferably, the ship detection benchmark dataset adopts the ShipRSImageNet dataset;

[0036] S2, based on the YOLOv8 model, combines the lightweight shared convolution detection head to build a lightweight rotation detection network;

[0037] S3, use the training set to train the lightweight rotation detection network to obtain the YOLOv8-LSCSBD detection model, and use the test set to evaluate the performance of the YOLOv8-LSCSBD detection model; among them, based on the level labels and OBB annotations of the ShipRSImageNet dataset, the lightweight rotation detection network is trained on the ShipRSImageNet dataset. During the training process, the ubuntu20.04 operating system, pytorch1.11, cuda101 acceleration environment, and RTX2089Ti graphics card are used as the training environment; the three key indicators of parameter quantity, computational complexity and accuracy are used to evaluate the performance of the YOLOv8-LSCSBD detection model;

[0038] S4, input the ship image to be detected into the trained YOLOv8-LSCSBD detection model, and the YOLOv8-LSCSBD detection model outputs the ship detection result, which includes the ship's bounding box and category information (three types of ships: warships, merchant ships, and other ships).

[0039] Among them, in S1, the ShipRSImageNet dataset is a large-scale remote sensing image ship detection dataset, which is specially designed for ship detection tasks in high-resolution optical images. The ShipRSImageNet dataset includes 3435 images from multiple sensors, multiple satellite platforms, different geographical locations and seasons. The resolution of each image is about 930×930 pixels, covering ship targets of different scales, directions and aspect ratios. The ShipRSImageNet dataset has a total of 17,573 ship instances annotated. The data annotations of ShipRSImageNet are divided into horizontal bounding boxes (HBBs) and oriented bounding boxes (OBBs), which can be used for a variety of detection tasks. The images of this dataset are derived from multiple public datasets, such as xView, HRSC2016, etc. There are various types of ships, which are suitable for ship detection, classification and fine-grained segmentation tasks. Because it covers a variety of scenes and climatic conditions, the ShipRSImageNet dataset is considered to be an important benchmark dataset for ship detection tasks in remote sensing images.

[0040] The present invention uses the level 2 labels and OBB annotations of the ShipRSImageNet dataset. The images in the ShipRSImageNet dataset are as follows: Figure 2 As shown, category 0 is military ships, category 1 is commercial ships, and category 2 is other ships.

[0041] Specifically, in S2, based on the YOLOv8 model, a lightweight shared convolution detection head is combined to construct a lightweight rotation detection network, which specifically includes:

[0042] The YOLOv8 model includes a feature extraction module based on the darknet53 network and a multi-scale feature fusion module based on pafpn;

[0043] The structural diagram of the lightweight shared convolution detection head is shown in Figure 1, and the lightweight shared convolution detection head includes a lightweight shared convolution layer and an independent batch normalization layer.

[0044] like Figure 1 As described in , there are 3 batch normalization layers corresponding to the feature layers. P3, P4, and P5 are feature maps with different downsampling multiples, where P3 is a feature map downsampled 8 times, P4 is a feature map downsampled 16 times, and P5 is a feature map downsampled 32 times. Conv_reg represents the convolution used to identify the bounding box, Scale is the scaling of the bounding box, Conv_cls represents the convolution used to identify the ship type, and Conv_OBB is the convolution used to rotate the bounding box.

[0045] The feature extraction module, the multi-scale feature fusion module, the lightweight shared convolution layer, and the batch normalization layer are connected in sequence; after using darknet53 for feature extraction and pafpn for feature fusion, the data is passed to the lightweight shared convolution detection head.

[0046] Inspired by NASFPN, the convolution is shared in the detection head, while the normalization layer is calculated independently, ensuring that the feature statistical distribution of each detection layer is independent and avoiding feature confusion. In the feature processing flow, for each feature layer, the number of channels is first adjusted to the number of hidden channels through a 1×1 convolution layer, and then the result is input into the shared convolution layer. After each shared convolution layer, the corresponding independent batch normalization and activation function are applied, and finally bounding box regression and classification prediction are performed. The bounding box and category are shared, but the rotation angle is not shared. This sharing method greatly reduces the amount of calculation and parameters while improving accuracy.

[0047] Example 1

[0048] Example 1 of the present invention is trained on the ShipRSImageNet dataset, using the ubuntu20.04 operating system, pytorch1.11, cuda101 acceleration environment, and RTX2089Ti graphics card as the training environment. In the experiment, three key indicators were used to evaluate the performance of the model: parameter quantity, computational complexity, and accuracy. Among them, the parameter quantity represents the number of trainable weights in the model, reflecting the scale and storage requirements of the model. The smaller the value, the better, indicating that the model is more lightweight. Computational complexity (GFLOPS) is measured in billions of floating-point operations per second, which measures the amount of calculation required by the model during the reasoning process. The smaller the value, the better, indicating that the model is more computationally efficient. Accuracy represents the model's ability to correctly detect and classify targets on the test set. The larger the value, the better, indicating that the model performance is better. The test results are as follows: Figure 3 , the specific values ​​are shown in Table 1.

[0049] Table 1 Experimental results

[0050]

[0051] The results show that the Detect_LSCSBD model has significantly reduced the number of parameters and computational complexity while improving detection accuracy. Specifically, the number of parameters of the model was reduced from 3,077,804 to 2,377,193, a decrease of about 22.8%; the computational complexity (GFLOPs) was reduced from 8.3 to 6.6, a decrease of about 20.5%. In terms of detection accuracy, the overall mAP50 increased from 0.668 to 0.690. Among them, the detection performance of the "warship" category has improved most significantly, with mAP50 increased by about 21.4%; mAP50-95 increased from 0.266. These improvements are mainly attributed to the lightweight shared convolutional layers and independent batch normalization layers introduced in the Detect_LSCSBD model. The shared convolutional layer significantly reduces the number of parameters and computational burden of the model by sharing weights between different detection layers, making it more suitable for processing high-resolution and diverse remote sensing image datasets such as ShipRSImageNet. The independent batch normalization layer ensures the statistical independence of each detection layer, and enhances the model's ability to detect targets of different scales and directions, especially small targets such as "warships". This design effectively balances the efficiency and detection accuracy of the model, which is of great significance for practical applications that require real-time detection and have limited computing resources. This improved method improves detection performance while reducing resource consumption, and has significant value in promoting ship detection tasks in remote sensing images.

[0052] The present invention significantly improves the performance and efficiency of the model by introducing lightweight shared convolutional layers and independent batch normalization layers in the detection model. Specific data show that the number of model parameters is reduced from 3,077,804 to 2,377,193, a decrease of about 22.8%; the computational complexity (GFLOPS) is reduced from 8.3 to 6.6, a decrease of about 20.5%. More importantly, the detection accuracy (mAP) of the model is improved from 0.66 to 0.69, an increase of about 4.5%. This technical improvement not only technically achieves the dual goals of model lightweighting and accuracy improvement, but also economically reduces the cost of model deployment and operation. In terms of social benefits, the model can be applied to maritime monitoring, remote sensing image analysis and other fields, improves the efficiency and accuracy of ship detection, helps to ensure maritime safety and improve resource utilization efficiency, and thus has significant social and economic value.

[0053] The present invention also provides an electronic device, comprising one or more processors; a memory; and one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the ship detection method based on YOLOv8-LSCSBD as described above.

[0054] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A ship detection method based on YOLOv8-LSCSBD, characterized in that: The following steps are involved: S1, construct training set and test set based on the ship detection benchmark dataset; S2, based on the YOLOv8 model, combines the lightweight shared convolution detection head to build a lightweight rotation detection network; S3, use the training set to train the lightweight rotation detection network to obtain the YOLOv8-LSCSBD detection model, and use the test set to evaluate the performance of the YOLOv8-LSCSBD detection model; S4, input the ship image to be detected into the trained YOLOv8-LSCSBD detection model, and the YOLOv8-LSCSBD detection model outputs the ship detection result, which includes the bounding box and category information of the ship.

2. The ship detection method based on YOLOv8-LSCSBD according to claim 1, characterized in that: In S1, the ship detection benchmark dataset adopts the ShipRSImageNet dataset, which includes 3435 images from multiple sensors, multiple satellite platforms, different geographical locations and seasons. The resolution of each image is about 930×930 pixels, covering ship targets of different scales, directions and aspect ratios.

3. The ship detection method based on YOLOv8-LSCSBD according to claim 2, characterized in that: The ShipRSImageNet dataset has a total of 17,573 ship instances annotated, and the annotations are divided into horizontal bounding boxes HBB and oriented bounding boxes OBB.

4. The ship detection method based on YOLOv8-LSCSBD according to claim 1, characterized in that: In S2, based on the YOLOv8 model, a lightweight shared convolution detection head is combined to build a lightweight rotation detection network, which specifically includes: The YOLOv8 model includes a feature extraction module based on the darknet53 network and a multi-scale feature fusion module based on pafpn; The lightweight shared convolution detection head includes a lightweight shared convolution layer and an independent batch normalization layer; The feature extraction module, the multi-scale feature fusion module, the lightweight shared convolutional layer, and the batch normalization layer are connected in sequence.

5. The ship detection method based on YOLOv8-LSCSBD according to claim 4, characterized in that: After the multi-scale feature fusion module, each feature layer first adjusts the number of channels to the number of hidden channels through a 1×1 convolution layer, and then inputs the feature fusion result into the lightweight shared convolution layer. After each lightweight shared convolution layer, the batch normalization layer applies the corresponding independent batch normalization and activation function to perform bounding box regression and classification prediction.

6. The ship detection method based on YOLOv8-LSCSBD according to claim 2, characterized in that: In S3, the lightweight rotation detection network is trained using the training set to obtain a YOLOv8-LSCSBD detection model, which specifically includes: Based on the level 2 labels and OBB annotations of the ShipRSImageNet dataset, the lightweight rotation detection network was trained on the ShipRSImageNet dataset. During the training process, the ubuntu20.04 operating system, pytorch1.11, cuda101 acceleration environment, and RTX2089Ti graphics card were selected as the training environment.

7. The ship detection method based on YOLOv8-LSCSBD according to claim 2, characterized in that: S3 uses the test set to evaluate the performance of the YOLOv8-LSCSBD detection model, specifically including: Three key indicators, namely parameter quantity, computational complexity and accuracy, are selected to evaluate the performance of the YOLOv8-LSCSBD detection model.

8. The ship detection method based on YOLOv8-LSCSBD according to claim 1, characterized in that: The category information includes three types of ships: warships, merchant ships and other vessels.