Ship identification positioning and ship type classification method
By constructing high-quality ship data sets and using the YOLOv11 model for training, the problem of low ship recognition and classification accuracy is solved, and efficient and accurate ship recognition and classification is achieved, which is suitable for ship management and monitoring in practical applications.
Patent Information
- Application Number
- CN202411690737.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-03-14
AI Technical Summary
In the prior art, ship identification and classification accuracy is low, data labeling is cumbersome, and computing resources are consumed, making it difficult to accurately identify and classify various ship types.
By building high-quality ship data sets, including open source data set SeaShips, pictures downloaded by Ship.com and video captured by high-definition cameras, using a combination of automatic annotation and manual annotation, the latest version of YOLOv11 model is selected for training, setting appropriate hyperparameters and improving the generalization ability of the model through data augmentation and preprocessing.
It realizes efficient and accurate identification and classification of ships, improves identification accuracy and real-timeness, reduces the consumption of computing resources, and is suitable for ship management and monitoring in practical applications.
Smart Images

Figure CN119625656A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of water transportation and ship management, and in particular relates to a method for identifying and locating ships and classifying ship types. Background Art
[0002] With the development of economic globalization and the exploitation of marine resources, the scale of shipping on the sea and inland rivers is constantly increasing. The development of shipping level has led to the continuous increase and refinement of the number and types of ship operations. For ships of different purposes, accurately grasping their status and type is a prerequisite for better ship management. At present, the technical means of sensing and obtaining the status of ships are becoming more and more abundant. For example, a series of sensors and systems such as cameras, Automatic Identification System (AIS), shore-based radars, laser devices, etc. are widely used in ship traffic management.
[0003] Different technologies use different methods to obtain different types of data to classify ships, such as: constructing a point cloud image data set for classification, but digital point cloud images are more suitable for classifying data collected from individuals or a small number of ships. It is difficult to obtain point cloud data for multiple ships in a larger range and a longer distance; using the ship trajectory data obtained by AIS to classify them, but different ship types have similar trajectories and it is difficult to distinguish their categories; using the ship target radiation noise to obtain its spectral characteristics for classification, this method is also only suitable for small targets at close range; although remote sensing images can achieve large-scale and multi-target classification, the real-time performance is poor, and the data cannot clearly see the specific behavior of the ship.
[0004] Among all methods of obtaining ship status, cameras have some advantages over other methods, such as providing high-resolution video image data in real time, which helps to accurately identify the type of ship; at the same time, it can also capture the specific behavior and dynamics of the ship, which helps to analyze and understand the ship's activities later; in addition, cameras can also work effectively in complex and multi-interference environments, such as ports and narrow waterways. High-definition video images obtained by cameras near the waterway can better achieve real-time large-scale, multi-target ship classification.
[0005] The dataset plays a crucial role in the final classification results. Although there are many publicly available ship datasets at home and abroad, there are large differences in the shooting environment, sample quantity, size distribution and types of ships. They are not suitable for the test environment and application scenarios of the present invention and cannot be used directly. For example, the SeaShips dataset is constructed based on images captured by 156 cameras deployed in the Zhuhai Hengqin New District Island Surrounding Video Surveillance System. It consists of 7,000 images and includes the following categories: ore carriers, general cargo ships, container ships, bulk carriers, fishing boats and passenger ships. It only includes the six common types, with incomplete categories and uneven distribution of sample quantities. The MS COCO dataset contains 3,013 ship images, but the category labels are unified.
[0006] On the basis of the classification label being determined and the data set being constructed, a suitable algorithm is used for training to realize the positioning and type recognition of the ship. In the current ship classification task, the target detection algorithm has significant advantages over the simple classification algorithm and is therefore more suitable. The target detection algorithm can not only identify and classify ships, but also provide accurate location information (bounding box) of each ship, which is essential for application scenarios that require simultaneous ship positioning and classification. For example, in port monitoring and maritime traffic management, it is necessary not only to know what types of ships are in the image, but also to know their specific locations for effective management and scheduling. In addition, the target detection algorithm performs better in the case of dealing with complex backgrounds and multiple targets, and can cope with ships of different sizes and postures, ensuring accurate identification and positioning in various environments. Popular target detection algorithms can be mainly divided into two directions, the first is a target detector based on Transformer, such as Swin Transformer, DETR, etc., and the other is the YOLO series, which has become the most popular framework for real-time target detection due to its reasonable trade-off between speed and accuracy, and is also more suitable for the task scenario of the present invention.
[0007] In summary, it is necessary to enrich and construct a suitable data set and select a suitable target detection algorithm to achieve more detailed ship category detection. Summary of the invention
[0008] The purpose of the present invention is to provide a ship identification and positioning and ship type classification method to solve the problems of low accuracy, cumbersome data annotation and high consumption of computing resources in the prior art, so as to realize the identification and positioning of ships and the classification of various ship types. The method is mainly divided into three aspects: data set construction, model selection and training, model testing and parameter determination.
[0009] The technical solution of the present invention is as follows:
[0010] A method for ship identification, positioning and ship type classification, characterized by comprising the following steps:
[0011] Step 1: Observe the types of ships that often appear in the test scenarios and identify ten target ship types to be tested, namely: bulk carrier, container ship, fishing boat, ore carrier, passenger ship, sailboat, boat, buoy, tanker, and barge;
[0012] Step 2: Select appropriate datasets according to the implementation scenario, including three parts: open source dataset SeaShips, about 5,000 images downloaded from Ship Information Network, and videos or ship images captured by cameras. Different annotation methods are used for these three parts, specifically:
[0013] SeaShips dataset: modify its label categories in batches and delete unnecessary categories. In addition, the original annotation format of SeaShips is VOC format, which is changed to YOLO format;
[0014] Downloaded images from Ship News Network: These images are clear and have large objects. The names of the downloaded images already contain the ship type. Automatic labeling is used. First, the YOLOv8 pre-trained model is used to detect and generate prediction boxes. Subsequently, the pre-trained model provided by SAM2.0 is added to refine the bounding box to obtain a more accurate bounding box.
[0015] Videos and images captured by the camera: This part mainly requires manual confirmation and adjustment of categories;
[0016] At this point, the preparation of the data set is completed;
[0017] Step 3: Model selection and training: Based on the dataset, use the labeled dataset to train the YOLOv11 model, set appropriate hyperparameters, including learning rate and batch size, and improve the generalization ability of the model through data enhancement and preprocessing methods during training to ensure the robustness of the model in different scenarios.
[0018] Step 4: Model testing and parameter adjustment: After the model training is completed, a rigorous testing and parameter adjustment process is performed to ensure the performance of the model in actual applications. The specific methods are as follows:
[0019] First, the performance of the model is comprehensively evaluated through a variety of evaluation indicators. Second, based on the test results, the model's hyperparameters, including learning rate and weight decay coefficient, are continuously adjusted to optimize the model's performance. Through repeated iterations, the model parameters with the best test results are finally determined to ensure the efficiency and accuracy of the model in practical applications.
[0020] The present invention firstly determines 10 common ship types in rivers and seas through extensive research, and constructs a high-quality training data set, which covers the open source data set SeaShips, ship pictures downloaded in batches from the ship information website, and ship images and videos captured by high-definition cameras. For different types of data, a combination of automatic labeling and manual labeling is adopted to ensure the accuracy and diversity of the data; secondly, the latest version of the YOLOv11 model is selected, which has a faster reasoning speed while maintaining high detection accuracy and is suitable for real-time applications. The generalization ability of the model is improved through data enhancement and preprocessing methods, and the model parameters with the best test effect are determined through continuous parameter adjustment and training; finally, an efficient and accurate ship identification and classification method is provided, which provides strong support for ship management and monitoring in practical applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 It is a flow chart of the method of the present invention. DETAILED DESCRIPTION
[0022] Figure 1 It is a flow chart of the method of the present invention, which mainly comprises the following steps:
[0023] Step 1: Observe the types of ships that frequently appear in the test scenarios and identify ten target ship types to be tested, namely: bulk carriers, container ships, fishing boats, ore carriers, passenger ships, sailboats, boats, buoys, tankers, and barges.
[0024] Step 2, data set construction: In order to build a high-quality training data set, multiple data sources were used. First, the open source data set SeaShips was used, which is a widely used ship image data set that contains a large number of ship images. Secondly, a large number of ship images were downloaded in batches from the ship information website according to the ship name and type. These images already contain category information in the image name when they are downloaded, which is convenient for subsequent labeling. Finally, the images of passing ships captured by high-definition cameras installed on rivers and seas and the recorded ship movement videos are used. These data can better reflect the ship conditions in actual application scenarios.
[0025] For these three parts of data, different labeling processes are required respectively, which generally combine automatic labeling with manual labeling. For the SeaShips data set, the labels are modified in batches according to the label categories determined in the present invention. For example, delete the label "general cargo ship" to ensure that all labels meet the requirements of the present invention. For the ship pictures downloaded in batches from the Ship Information Network, since the category information is already included in the picture name when downloading, a fully automatic labeling method is adopted. First, the YOLOv8 pre-trained model is used to generate a preliminary prediction frame, and then the prediction frame is refined using SAM2.0. The category label is directly determined and generated based on the picture name. For the data captured by the high-definition camera, a preliminary prediction frame is first generated through the YOLOv8+SAM2.0 pre-trained model in a similar way to the pictures on the Ship Information Network, and then the category is manually corrected to ensure the accuracy of the data. Through these methods, a high-quality and diverse ship image data set is finally constructed.
[0026] Step 3: Model selection and training: Although some Transformer-based object detectors are better than the YOLO series in terms of accuracy, they are slow and not suitable for actual engineering practice. The latest version of YOLOv11 has been open sourced, and compared with YOLOv8, it has the following major improvements: First, the C3k2 mechanism is equivalent to C2f in YOLOv8, and is mainly used in the deep layer of the network. Second, the C2PSA mechanism is proposed, which is a C2 (predecessor of C2) mechanism with a multi-head attention mechanism embedded inside. C2PSA can be understood as a PSA mechanism embedded in C2. Third, two deep convolutions are added to the classification and detection head in the original decoupled head, which greatly reduces the number of parameters and calculations. Based on the construction of the dataset, the YOLOv11 model is trained using the labeled dataset, and appropriate hyperparameters such as learning rate and batch size are set. During the training process, the generalization ability of the model is improved through data enhancement and preprocessing methods to ensure the robustness of the model in different scenarios.
[0027] Step 4: Model testing and parameter adjustment: After the model training is completed, a rigorous testing and parameter adjustment process is performed to ensure the performance of the model in practical applications. First, the performance of the model is comprehensively evaluated through a variety of evaluation indicators (such as mAP, Precision, Recall, etc.). Secondly, based on the test results, the model's hyperparameters, such as learning rate, weight decay coefficient, etc., are continuously adjusted to optimize the performance of the model. Through repeated iterations, the model parameters with the best test results are finally determined to ensure the efficiency and accuracy of the model in practical applications.
Claims
1. A method for ship identification, positioning and ship type classification, characterized in that: The steps include: Step 1: Observe the types of ships that often appear in the test scenarios and identify ten target ship types to be tested, namely: bulk carrier, container ship, fishing boat, ore carrier, passenger ship, sailboat, boat, buoy, tanker, and barge; Step 2: Select appropriate datasets according to the implementation scenario, including three parts: open source dataset SeaShips, about 5,000 images downloaded from Ship Information Network, and videos or ship images captured by cameras. Different annotation methods are used for these three parts, specifically: SeaShips dataset: modify its label categories in batches and delete unnecessary categories. In addition, the original annotation format of SeaShips is VOC format, which is changed to YOLO format; Downloaded images from Ship News Network: These images are clear and have large objects. The names of the downloaded images already contain the ship type. Automatic labeling is used. First, the YOLOv8 pre-trained model is used to detect and generate prediction boxes. Subsequently, the pre-trained model provided by SAM2.0 is added to refine the bounding box to obtain a more accurate bounding box. Videos and images captured by the camera: This part mainly requires manual confirmation and adjustment of categories; At this point, the preparation of the data set is completed; Step 3: Model selection and training: Based on the dataset, use the labeled dataset to train the YOLOv11 model, set appropriate hyperparameters, including learning rate and batch size, and improve the generalization ability of the model through data enhancement and preprocessing methods during training to ensure the robustness of the model in different scenarios. Step 4: Model testing and parameter adjustment: After the model training is completed, a rigorous testing and parameter adjustment process is performed to ensure the performance of the model in actual applications. The specific methods are as follows: First, the performance of the model is comprehensively evaluated through a variety of evaluation indicators. Second, based on the test results, the model's hyperparameters, including learning rate and weight decay coefficient, are continuously adjusted to optimize the model's performance. Through repeated iterations, the model parameters with the best test results are finally determined to ensure the efficiency and accuracy of the model in practical applications.