A ship target identification method, system, device and storage medium suitable for complex marine environment

CN122949463APending Publication Date: 2026-10-20THE 28TH RES INST OF CHINA ELECTRONICS TECH GROUP CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611142599.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-30
Publication Date
2026-10-20

AI Technical Summary

Technical Problem

[0004]然而,在船只图像识别领域,传统Mask R-CNN模型仍面临诸多挑战:首先,复杂的海洋环境(如天气变化、光照条件、海浪波动等)对模型的鲁棒性提出了更高要求;其次,传统CNN架构在提取全局上下文信息方面存在局限性,难以充分理解船只与周围环境的关系;此外,现有方法缺乏可解释性,难以为识别结果提供可靠的置信度评估

Benefits of technology

[0017]有益效果:与现有技术相比,本发明具有以下显著优点:本发明通过多源数据采集与预处理、双路特征提取架构、改进的区域建议网络和多重约束验证,能够高效且精确地进行船只识别;本发明充分利用了ViT全局建模能力和CNN的局部特征提取优势,通过特征自适应融合提升了模型在复杂多变海事环境下的识别性能,能够为航运安全、海事管理和环境监控提供强有力的技术支持。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

This invention discloses a method, system, device, and storage medium for ship target recognition in complex marine environments. The method includes acquiring multi-source raw images and preprocessing them to obtain a fused image; processing the fused image to generate multi-layer local feature maps, global feature maps, attention maps, and multi-scale hybrid feature maps; inputting the multi-layer local feature maps and global feature maps into a region proposal network to generate local spatial refinement features and global spatial refinement features; calculating target confidence scores and bounding box offsets to select a set of candidate regions and mapping them to a multi-scale hybrid feature space; generating region alignment features; inputting these features into a classification branch, a regression branch, and a mask branch respectively, and outputting the ship's classification result, bounding box coordinates, and pixel-level mask; validating the classification result, outputting the classification result if it passes the validation, and correcting the classification result if it fails the validation. This invention significantly improves the accuracy and reliability of the recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of technology, and in particular to a method, system, device, and storage medium for ship target identification suitable for complex marine environments. Background Technology

[0002] With increasingly busy maritime traffic, the demand for the supervision and identification of ships at sea is also growing. Traditional ship identification methods mainly rely on manual visual recognition or rule-based automated methods, which suffer from inefficiency and insufficient accuracy when processing large-scale data. In addition, these traditional methods are often difficult to adapt to the complex and ever-changing marine environment, such as weather changes, lighting conditions, and the diversity of ships.

[0003] In recent years, deep learning technology has made groundbreaking progress in the field of computer vision. From the early R-CNN series to the introduction of Mask R-CNN, object detection and instance segmentation techniques have continued to evolve. Mask R-CNN achieves accurate object localization and contour segmentation by combining the object detection framework of Faster R-CNN with a fully convolutional network (FCN) structure. Meanwhile, its introduction of the RoIAlign operation and Feature Pyramid Network (FPN) further improves pixel alignment accuracy and multi-scale object recognition capabilities.

[0004] However, in the field of ship image recognition, the traditional Mask R-CNN model still faces many challenges: First, the complex marine environment (such as weather changes, lighting conditions, wave fluctuations, etc.) places higher demands on the robustness of the model; second, the traditional CNN architecture has limitations in extracting global contextual information, making it difficult to fully understand the relationship between the ship and its surrounding environment; in addition, existing methods lack interpretability, making it difficult to provide a reliable confidence assessment for the recognition results.

[0005] Therefore, it is urgent to solve the above problems. Summary of the Invention

[0006] Purpose of the invention: The purpose of this invention is to provide a method, system, device, and storage medium for ship target identification suitable for complex marine environments, which significantly improves the accuracy and reliability of ship category identification.

[0007] Technical Solution: To achieve the above objectives, this invention discloses a ship target identification method suitable for complex marine environments, comprising the following steps: (1) Obtain multi-source original images of the study area, and obtain fused images after preprocessing the multi-source original images; (2) Input the fused image into the dual-path feature extraction network for feature extraction to generate multi-layer local feature maps, global feature maps and attention maps; after adaptive feature fusion of the multi-layer local feature maps and global feature maps, a fused feature map is obtained; after processing the fused feature map through the feature pyramid network, a multi-scale hybrid feature map is generated. (3) Input the multi-layer local feature map and global feature map into the improved region proposal network, and perform spatial refinement through convolution operation to generate local spatial refinement features and global spatial refinement features respectively; based on the local spatial refinement features and global spatial refinement features, calculate the target confidence score and bounding box offset of the anchor box on the feature map, and then select the candidate region set; perform spatial alignment operation on the candidate regions to map them to a multi-scale hybrid feature space; then generate region alignment features through interpolation sampling; input the region alignment features into the classification branch, regression branch and mask branch respectively, and output the classification result of the ship, the bounding box coordinates and the pixel-level mask. The classification result includes the category and its confidence score. (4) Use attention map to perform saliency analysis on the output of step (3) to generate the classification result of the ship with enhanced saliency, bounding box coordinates and pixel-level mask; verify the classification result based on the preset multiple constraints. If the verification is qualified, output the classification result; if the verification is unqualified, obtain multiple candidate categories of the ship, traverse all candidate category combinations, eliminate conflicting combinations that violate the multiple constraints, and reselect the category combination with the highest total confidence as the classification result based on the confidence of each candidate category; if the total confidence is equal, make a second decision based on the preset reliability decision rule, and take the decided category combination as the classification result.

[0008] Optionally, step (2) specifically includes the following steps: A dual-path feature extraction network is constructed, which includes two parallel CNN branches and a ViT branch; The dual-path feature extraction network inputs a fused image. In the CNN branch, a pre-trained ResNet module performs multi-layer convolution and pooling operations on the fused image to generate multi-layer local feature maps containing multi-scale information. In the ViT branch, the fused image is divided into fixed-size image patches, which are then input into the patch Embedding layer for feature embedding to obtain the image patch feature embedding results. Embedding image patch features into the results Input the Transformer encoder to extract global semantic features and generate a global feature map and attention map; Then, the multi-layer local feature maps are upsampled layer by layer and fused with the low-level features in the multi-layer local feature maps. At the same time, the global feature map is reshaped to match the spatial dimension of the multi-layer local feature maps. The local feature maps and global feature maps are then spatially aligned and integrated into a fused feature map. The fused feature map is then processed by a feature pyramid network to generate a multi-scale hybrid feature map.

[0009] Optionally, step (3) specifically includes the following steps: Multi-layer local feature maps and global feature maps are input into the improved region proposal network, and spatial refinement is performed through a convolutional layer, generating local spatial refinement features and global spatial refinement features respectively. The classification head processes local and global spatial refinement features to predict the target confidence score of each anchor box on the feature map; the regression head processes local spatial refinement features to output the bounding box offset of each anchor box. Threshold filtering is performed on the target confidence score. Anchor boxes with confidence scores higher than the first threshold are considered to contain the target. Boundary boxes are adjusted according to the bounding box offset. Then, the non-maximum suppression algorithm is applied to filter out candidate regions with intersection-union ratios greater than the second threshold, retaining the set of N independent candidate regions with target confidence scores higher than the first threshold and ranked by confidence scores after filtering by the non-maximum suppression algorithm. An enhanced alignment operation is performed on the candidate regions, mapping them to the main path space composed of multi-scale hybrid feature maps. By combining local and global feature maps, a fixed-size region alignment feature is generated through bilinear interpolation. Region alignment features are input to the classification branch, regression branch, and mask branch, respectively. The classification branch classifies each candidate region through a fully connected layer, predicting the target ship category and confidence scores for each category. The regression branch optimizes the bounding box coordinates of the candidate regions. The mask branch predicts the pixel-level mask for each candidate region through an enhanced fully convolutional network. Finally, the classification result, bounding box coordinates, and pixel-level mask of the ship are output. The classification result includes the category and its confidence score.

[0010] Optionally, step (4) specifically includes the following steps: The classification results, bounding box coordinates, and pixel-level binarized masks of the ships output in step 3 are summarized in real time. The significance analysis is performed in combination with the attention map output in step 2 to generate ship classification results, bounding box coordinates, and pixel-level masks with enhanced significance. The classification result with the highest confidence level is verified based on preset multiple constraints. These constraints include target size ratio constraints and target spacing temporal constraints. Specifically: if the size ratio of two ships is greater than a size threshold, they should not be classified as the same type of ship; if the distance between two ships during their voyage meets the target spacing temporal constraint, they should not be classified as different categories of ships. The target spacing temporal constraint is: within a sliding window of T frames, the center distance between the detection frames of the two ships... Less than the distance threshold And the proportion of frames that meet the target spacing timing constraints is ≥90%; If the verification is successful, the classification result, bounding box coordinates, and pixel-level mask will be output; if the verification fails, the classification result will be corrected a second time. Specifically, the top three categories with the highest confidence in ship classification are obtained, and all candidate combinations formed by the top three categories are iterated through to eliminate conflicting combinations that violate multiple constraints. For the remaining candidate combinations, calculate their sum of confidence scores. The category combination with the highest total confidence score is re-selected as the classification result; if the total confidence score is... If they are equal, a second decision is made according to the preset reliability decision rule, and the result of the decision is used as the classification result. The reliability decision rule means that the preferred category with greater margin is retained first. Margin refers to the difference in confidence between the preferred category and the second-best category. If the margins are the same, the preferred category with the larger detection box area is retained. If the detection box areas are the same, the preferred category is determined according to the smaller detection number.

[0011] Based on the same inventive concept, the present invention provides a ship target identification system suitable for complex marine environments, comprising: The multi-source image acquisition module is used to acquire multi-source raw images of the study area, and the multi-source raw images are preprocessed to obtain a fused image; The feature fusion processing module is used to input the fused image into a dual-path feature extraction network for feature extraction, generating multi-layer local feature maps, global feature maps, and attention maps; after adaptive feature fusion of the multi-layer local feature maps and global feature maps, a fused feature map is obtained; and after processing the fused feature map through a feature pyramid network, a multi-scale hybrid feature map is generated. The category prediction module inputs multi-layer local and global feature maps into an improved region proposal network. Spatial refinement is performed through convolutional operations, generating local and global spatial refinement features. Based on these features, the target confidence score and bounding box offset of the anchor boxes on the feature maps are calculated, and a candidate region set is selected. Spatial alignment is performed on the candidate regions, mapping them to a multi-scale hybrid feature space. Region alignment features are then generated through interpolation sampling. These features are input into the classification, regression, and mask branches, respectively, outputting the ship's classification result, bounding box coordinates, and pixel-level mask. The classification result includes the category and its confidence score. The category correction module uses an attention map to perform saliency analysis on the output of the category prediction module, generating a saliency-enhanced classification result for the ship, bounding box coordinates, and pixel-level mask. It verifies the classification result based on preset multiple constraints. If the verification is successful, the classification result is output. If the verification fails, multiple candidate categories for the ship are obtained, all candidate category combinations are iterated through, conflicting combinations that violate the multiple constraints are eliminated, and the category combination with the highest total confidence score is re-selected as the classification result based on the confidence scores of each candidate category. If the total confidence scores are equal, a second decision is made according to preset reliability decision rules, and the decided category combination is taken as the classification result.

[0012] Optionally, the feature fusion processing module constructs a dual-path feature extraction network, which includes two parallel CNN branches and a ViT branch; The dual-path feature extraction network inputs a fused image. In the CNN branch, a pre-trained ResNet module performs multi-layer convolution and pooling operations on the fused image to generate multi-layer local feature maps containing multi-scale information. In the ViT branch, the fused image is divided into fixed-size image patches, which are then input into the patch Embedding layer for feature embedding to obtain the image patch feature embedding results. Embedding image patch features into the results Input the Transformer encoder to extract global semantic features and generate a global feature map and attention map; Then, the multi-layer local feature maps are upsampled layer by layer and fused with the low-level features in the multi-layer local feature maps. At the same time, the global feature map is reshaped to match the spatial dimension of the multi-layer local feature maps. The local feature maps and global feature maps are then spatially aligned and integrated into a fused feature map. The fused feature map is then processed by a feature pyramid network to generate a multi-scale hybrid feature map.

[0013] Optionally, in the category prediction module, multi-layer local feature maps and global feature maps are input into the improved region proposal network, and spatial refinement is performed through a convolutional layer respectively, generating local spatial refinement features and global spatial refinement features accordingly. The classification head processes local and global spatial refinement features to predict the target confidence score of each anchor box on the feature map; the regression head processes local spatial refinement features to output the bounding box offset of each anchor box. Threshold filtering is performed on the target confidence score. Anchor boxes with confidence scores higher than the first threshold are considered to contain the target. Boundary boxes are adjusted according to the bounding box offset. Then, the non-maximum suppression algorithm is applied to filter out candidate regions with intersection-union ratios greater than the second threshold, retaining the set of N independent candidate regions with target confidence scores higher than the first threshold and ranked by confidence scores after filtering by the non-maximum suppression algorithm. An enhanced alignment operation is performed on the candidate regions, mapping them to the main path space composed of multi-scale hybrid feature maps. By combining local and global feature maps, a fixed-size region alignment feature is generated through bilinear interpolation. Region alignment features are input to the classification branch, regression branch, and mask branch, respectively. The classification branch classifies each candidate region through a fully connected layer, predicting the target ship category and confidence scores for each category. The regression branch optimizes the bounding box coordinates of the candidate regions. The mask branch predicts the pixel-level mask for each candidate region through an enhanced fully convolutional network. Finally, the classification result, bounding box coordinates, and pixel-level mask of the ship are output. The classification result includes the category and its confidence score.

[0014] Optionally, the category correction module summarizes the ship classification results, bounding box coordinates, and pixel-level binarized mask output by the category prediction module in real time, and performs saliency analysis by combining the attention map output by the feature fusion processing module to generate ship classification results, bounding box coordinates, and pixel-level mask with enhanced saliency. The classification result with the highest confidence level is verified based on preset multiple constraints. These constraints include target size ratio constraints and target spacing temporal constraints. Specifically: if the size ratio of two ships is greater than a size threshold, they should not be classified as the same type of ship; if the distance between two ships during their voyage meets the target spacing temporal constraint, they should not be classified as different categories of ships. The target spacing temporal constraint is: within a sliding window of T frames, the center distance between the detection frames of the two ships... Less than the distance threshold And the proportion of frames that meet the target spacing timing constraints is ≥90%; If the verification is successful, the classification result, bounding box coordinates, and pixel-level mask will be output; if the verification fails, the classification result will be corrected a second time. Specifically, the top three categories with the highest confidence in ship classification are obtained, and all candidate combinations formed by the top three categories are iterated through to eliminate conflicting combinations that violate multiple constraints. For the remaining candidate combinations, calculate their sum of confidence scores. The category combination with the highest total confidence score is re-selected as the classification result; if the total confidence score is... If they are equal, a second decision is made according to the preset reliability decision rule, and the result of the decision is used as the classification result. The reliability decision rule means that the preferred category with greater margin is retained first. Margin refers to the difference in confidence between the preferred category and the second-best category. If the margins are the same, the preferred category with the larger detection box area is retained. If the detection box areas are the same, the preferred category is determined according to the smaller detection number.

[0015] This invention discloses an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor executes the computer program to implement a ship target identification method applicable to complex marine environments as described above.

[0016] The present invention discloses a computer-readable storage medium having a computer program stored thereon, the computer program being executed by a processor to implement a ship target identification method applicable to complex marine environments as described above.

[0017] Beneficial effects: Compared with the prior art, the present invention has the following significant advantages: The present invention can perform ship identification efficiently and accurately through multi-source data acquisition and preprocessing, dual-path feature extraction architecture, improved regional proposal network and multiple constraint verification; The present invention makes full use of the global modeling capability of ViT and the local feature extraction advantage of CNN, and improves the recognition performance of the model in complex and ever-changing maritime environments through feature adaptive fusion, which can provide strong technical support for shipping safety, maritime management and environmental monitoring. Attached Figure Description

[0018] Figure 1 This is the overall flowchart of the present invention; Figure 2 This is a flowchart of the secondary constraint verification of the present invention; Figure 3 This is a flowchart of the data acquisition and preprocessing module of the present invention; Figure 4 This is a flowchart of the feature extraction and fusion process of the present invention; Figure 5 This is a diagram of the internal structure of the improved RPN network of the present invention; Figure 6 This is a flowchart of the predicted classification results of the present invention; Figure 7This is a flowchart illustrating the secondary constraint verification and real-time feedback of the classification results in this invention. Figure 8 This is a diagram of the overall network framework of the present invention. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0020] Example 1: As Figure 1 and Figure 8 As shown, a ship target identification method applicable to complex marine environments according to the present invention includes the following steps: (1) Obtain high-resolution satellite images of the study area, high-resolution images taken by UAVs, and video streams collected in real time by shore-based cameras to obtain multi-source original images; output a set of spatiotemporally aligned, denoised, enhanced and normalized fused images after preprocessing the multi-source original images.

[0021] like Figure 3 As shown, step (1) specifically includes the following steps: The system acquires high-resolution satellite images, high-resolution images from drone aerial photography, and real-time video streams from shore-based cameras to obtain multi-source raw images. Among these, the wide-coverage high-resolution satellite images enable large-scale sea area monitoring; the drone aerial photography captures high-resolution images, allowing for flexible capture of details in specific areas; and the fixed shore-based cameras collect real-time video streams, enabling continuous monitoring of fixed areas such as ports and docks.

[0022] The SIFT algorithm is used to extract feature points from multiple source images. Then, the KNN algorithm is used for feature matching to calculate the image transformation matrix and perform geometric alignment of images from different sources, ensuring spatial consistency among the multiple source images. Feature points are points in an image that are salient and identifiable, usually determined by the intensity changes of local regions. Feature points exhibit high stability across different images. Feature matching refers to comparing feature points in an image using the KNN algorithm to determine similar or corresponding feature points between different images. The image transformation matrix is ​​a mathematical model used to describe how one image is transformed into another, and it is used for geometric alignment of the images.

[0023] Gaussian filters or median filters can be used to eliminate random noise in images and improve image clarity. A Gaussian filter is an image smoothing technique that effectively removes noise and improves image quality by applying a Gaussian function to the image.

[0024] Enhance image quality and recognizability by using contrast enhancement, brightness adjustment, and edge enhancement, and perform targeted enhancement on key areas of the image.

[0025] By utilizing image frames from adjacent time points, bilateral filtering is used to smooth features in space and time, eliminating instantaneous disturbances and improving the spatiotemporal consistency of the image. Bilateral filtering is a smoothing method that combines spatial and intensity information to preserve image edges while denoising, thereby enhancing the spatiotemporal consistency of the image. Spatiotemporal consistency refers to the stability and continuity of image features across multiple time frames, in order to reduce visual inconsistencies caused by instantaneous disturbances.

[0026] Finally, the processed image is normalized and resized to obtain a fused image, which is then adapted to the input requirements of the subsequent feature extraction network.

[0027] (2) Input the fused image into the dual-path feature extraction network. In the dual-path feature extraction network, the fused image is subjected to feature extraction and fusion. One path generates multi-layer local feature maps C2~C5, and the other path generates global feature maps and ViT attention maps. After adaptive feature fusion of the multi-layer local feature maps and global feature maps, the fused feature maps are obtained. After the fused feature maps are processed by the feature pyramid network FPN, multi-scale hybrid feature maps P2~P5 are generated.

[0028] like Figure 4 As shown, step (2) specifically includes the following steps:

[0029] A dual-path feature extraction network is constructed, which includes two parallel CNN branches for local feature extraction and a ViT branch for global feature extraction.

[0030] The dual-path feature extraction network inputs a fused image. In the CNN branch, a pre-trained ResNet module performs multi-layer convolution and pooling operations on the fused image to generate multi-layer local feature maps C2~C5 containing multi-scale information.

[0031] In the ViT branch, the fused image is divided into 16×16 image patches, which are then input into the patch Embedding layer for feature embedding to obtain the image patch feature embedding results. The specific calculation formula is as follows: ,

[0032] in, These are learnable classification label vectors used to aggregate global image information to support subsequent classification tasks; The fused image represents the first Image blocks; This represents the total number of image patches; It is a linear projection matrix; Location encoding information; The result is the embedding of image patch features.

[0033] Embedding image patch features into the results Input the Transformer encoder to extract global semantic features and generate a global feature map and a ViT attention map.

[0034] The multi-layer local feature maps C2~C5 are upsampled layer by layer and fused with the low-level features in the multi-layer local feature maps. At the same time, the global feature map output by the Transformer is reshaped into a spatial dimension that matches the multi-layer local feature maps. Then, the local feature maps and global feature maps are spatially aligned and integrated into a unified fused feature map, which serves as the main path representation for spatial operations of the feature pyramid and RoIAlign.

[0035] Simultaneously, the two branches of multi-layer local feature maps C2~C5 and global feature maps are retained and passed downstream through lateral connections; the weighted fusion of the two is delayed until the classification head (anchor box per step) and the enhanced alignment (dual feature space) of the region proposal network to avoid premature collapse of the two information paths in the backbone stage.

[0036] The fused feature maps are processed by the Feature Pyramid Network (FPN) to generate multi-scale hybrid feature maps P2 to P5, which combine local details and global semantic information at different resolutions.

[0037] During feature map fusion, 1×1 convolutions are used to adjust the number of channels, ensuring dimensionality consistency among different feature maps during fusion. A feature map refers to a multidimensional data representation extracted by a convolutional neural network, containing feature information about the input image, and typically has different spatial resolutions and semantic levels. Upsampling refers to increasing the spatial resolution of the feature map through deconvolution or bilinear interpolation to fuse low-level features with high-level features.

[0038] (3) Construct a hybrid model. In the hybrid model, multi-layer local feature maps and global feature maps are input into the region proposal network X-RPN. Spatial refinement is performed through convolutional layers, generating corresponding local spatial refinement features and global spatial refinement features. The local spatial refinement features and global spatial refinement features are processed by the classification head to predict the target confidence score of each anchor box on the feature map. The local spatial refinement features are processed by the regression head to output the bounding box offset of each anchor box. The target confidence score ≥ 0.5 and the top N independent candidate regions ranked by confidence score after filtering by the non-maximum suppression (NMS) algorithm are retained. Then, the candidate regions are subjected to an enhanced alignment operation to map the candidate regions onto the multi-scale hybrid feature map P2~. The main path space is constructed using P5, and combined with the local and global feature map spaces. Fixed-size region alignment features are generated through bilinear interpolation. The classification branch uses the region alignment features to classify each candidate region through a fully connected layer, predicting the target ship category and the confidence score for each category. The regression branch optimizes the bounding box coordinates of the candidate regions. The masking branch predicts the pixel-level mask of the candidate regions based on the region alignment features through an enhanced fully convolutional network (FCN) and outputs a binarized mask image. Finally, the classification result of the ship, the bounding box coordinates, and the pixel-level mask are output. The classification result includes the target ship category and the confidence score for each category. The classification result refers to the ship category with the highest confidence score.

[0039] like Figure 5 and Figure 6 As shown, step (3) specifically includes the following steps:

[0040] First, the multi-layer local feature maps C2~C5, which are preserved in parallel through lateral connections in step (2), are input into the improved region proposal network X-RPN along with the global feature map to generate candidate regions at different scales. The internal structure of the region proposal network X-RPN is as follows: Figure 5 As shown.

[0041] Specifically, after the local feature maps C2~C5 and the global feature map are input into the region proposal network X-RPN, they are each spatially refined through a 3×3 convolutional layer, generating corresponding local spatial refinement features and global spatial refinement features. Subsequently, the classification head simultaneously incorporates both local and global spatial refinement features to predict the target confidence score for each anchor box on the feature map; while the regression head only incorporates local spatial refinement features and outputs the bounding box offset of each anchor box through a 1×1 convolutional layer. Then, the target confidence score is filtered by a threshold with a preset threshold of 0.5. For anchor boxes with a confidence score higher than the preset threshold, the anchor box is considered to contain the target and the bounding box is adjusted according to the bounding box offset; for anchor boxes with a low confidence score, they are discarded directly. Then, the non-maximum suppression (NMS) algorithm is applied to filter out candidate regions with an intersection-union ratio (IoU) ≥ 0.7. In the scenario of densely moored ships, this threshold can be configured to 0.5~0.6 to prevent missed detection. The target confidence score ≥ 0.5 and the top N independent candidate regions ranked by confidence score after being filtered by the NMS algorithm are retained, with N=300. Next, an enhanced alignment operation is performed on the candidate regions, mapping them to the main path space composed of multi-scale hybrid feature maps P2~P5. Combined with the local feature map space and the global feature map space passed in parallel through lateral connections, a fixed-size region alignment feature (such as 7×7 for the classification branch and 14×14 for the mask branch) is generated through bilinear interpolation, effectively avoiding spatial quantization errors.

[0042] The classification branch uses region alignment features to classify each candidate region through a fully connected layer, predicting the target ship category and confidence scores for each category; the regression branch optimizes the bounding box coordinates of the candidate regions; and the masking branch, based on region alignment features, uses an enhanced fully convolutional network (FCN) to predict the pixel-level mask of each candidate region by combining local and global feature maps, and outputs a binarized mask map to achieve high-quality instance segmentation.

[0043] The final output includes the ship classification results, bounding box coordinates, and pixel-level mask. The classification results include the category and the confidence score of the category.

[0044] The confidence score refers to the model's assessment of the probability that a target exists within the anchor box; a higher value indicates a greater probability of the target's presence. The formula is shown below: , in, yes function, It is a weight matrix. It is the feature vector of the candidate region. It is a bias term.

[0045] Non-maximum suppression (NMS) is an algorithm used to remove overlapping candidate boxes. It calculates the intersection-overall ratio (IoU) between candidate boxes, retains the box with the highest confidence, and deletes other boxes with high overlap with it.

[0046] During the candidate region generation stage, the multi-scale hybrid feature maps P2~P5, as the main feature maps, are not directly input into the internal convolutional layers of X-RPN, but are passed independently for subsequent region alignment. The multi-scale hybrid feature maps P2~P5 are the products processed by the Feature Pyramid Network (FPN), providing feature maps at different resolution levels. Mapping the candidate region RoI to the multi-scale hybrid feature maps P2~P5 ensures that large ships are mapped to coarse feature layers (such as P5), and small ships are mapped to fine feature layers (such as P2). However, although the multi-scale hybrid feature maps (P2~P5) obtain good multi-scale spatial information after passing through the Feature Pyramid Network (FPN), the local edge textures in the original image become blurred. At this time, the multi-layer local feature maps C2~C5 and the global feature map passed laterally retain the clearest image features such as ship edges, contours, and textures.

[0047] (4) After performing saliency analysis on the ship classification results, bounding box coordinates and pixel-level mask output in step 3 using the ViT attention map, the classification results, bounding box coordinates and pixel-level mask of the ships with enhanced saliency are generated; then, the classification results are subjected to secondary constraint verification according to the preset multiple constraint conditions. If the verification is qualified, the classification results are output; if the verification is unqualified, multiple candidate categories of ships are obtained, all candidate category combinations are traversed, conflicting combinations that violate the multiple constraint conditions are eliminated, and the category combination with the highest total confidence is re-selected as the classification result according to the confidence of each candidate category; if the total confidence is equal, a secondary decision is made according to the preset reliability decision rules, and the decision-made category combination is taken as the classification result.

[0048] like Figure 2 and Figure 7 As shown, step (4) specifically includes the following steps: First, the ship classification results, bounding box coordinates, and pixel-level masks output in step 3 are summarized and analyzed in real time. Then, the saliency analysis is performed by combining the ViT attention map output in step 2 to generate ship classification results, bounding box coordinates, and pixel-level masks that have been enhanced with saliency. Then, the classification results are subjected to secondary constraint verification based on preset multiple constraints to improve the accuracy of recognition; specifically: First, we define multiple constraints, including target size ratio constraints and target spacing temporal constraints. Specifically, if the size ratio of two ships is greater than a size threshold, they should not be classified as the same type of ship; that is, we take the characteristic dimensions of the two ships. and ,when When determining that they should not be classified as the same type of vessel, the size threshold is used. The default is 2.0, meaning the larger boat is more than twice the size of the smaller boat; If the distance between two ships during their voyage satisfies the target spacing temporal constraint, they should not be classified as different categories of ships. The target spacing temporal constraint is: within a sliding window of T frames (default T=10), the center distance between the detection boxes of the two ships... Less than the distance threshold Distance threshold By default, half the larger ship length is used, and the proportion of frames that meet the distance constraint is ≥90%.

[0049] If the verification is successful, the classification result, bounding box coordinates, and pixel-level mask are output; if the verification fails, the classification result is corrected a second time. Specifically, the top three categories with the highest confidence in ship classification are obtained first, and all candidate combinations formed by the top three categories are traversed to remove conflicting combinations that violate multiple constraints.

[0050] For the remaining candidate combinations, calculate their sum of confidence scores. The calculation formula is:

[0051] in Indicates ships The confidence score, Indicates ships The confidence score.

[0052] Reselect the category combination with the highest sum of confidence as the classification result. If a sum of confidence is found... In the case of a tie, a reliability decision rule is introduced to break the deadlock. This involves a secondary decision based on a pre-defined reliability decision rule, with the result used as the classification outcome. The reliability decision rule prioritizes the first-choice category with greater confidence margin, where confidence margin is the difference between the first-choice and second-choice categories. If the confidence margins are the same, the first-choice category with the larger detection frame area is retained. If the detection frame areas are still the same, the category with the smaller detection sequence number is selected. This mechanism ensures that in the event of a tie, the system naturally tends to retain the more certain and reliable ship classification. The detection sequence number is a unique number assigned to each detection frame based on its top-left corner coordinates, in a top-to-bottom, left-to-right order.

[0053] Scenario 1: Assume that ship A's classification confidence scores rank in the top three categories as category 1 (0.90), category 2 (0.80), and category 3 (0.70), with a margin of 0.10; ship B's ranking in the top three categories as category 1 (0.80), category 2 (0.70), and category 3 (0.60), with a margin of 0.10. The two ships differ in size by more than two times, violating the ship size constraint, yet both ship A and ship B are initially classified as category 1.

[0054] Iterate through all candidate combinations that satisfy both the ship size constraint and the ship distance constraint, i.e., the two ships are not of the same class: Combination 1: Ship A is classified as category 1, and ship B is classified as category 2. ; Combination 2: Ship A is classified as category 2, and ship B is classified as category 1. .

[0055] At this point, the total confidence level is... In the case of parallel, Both have a margin of 1.60, triggering the reliability decision rule. Since both ships have a margin of 0.10, the detection frame area is further compared. Assuming that the detection frame area of ​​ship A is larger than that of ship B, ship A is given priority in the initial decision. Ultimately, ship A is classified as category 1 and ship B as category 2.

[0056] Scenario 2: If vessel A is in an ambiguous state, such as category 1 (0.90) or category 2 (0.89), the margin is very small (0.01); while vessel B is determined to be extremely certain, belonging to category 1 (0.85) or category 2 (0.10), with a very large margin (0.75).

[0057] Combination 1: Ship A is classified as class 1, and ship B is classified as class 2. ; Combination 2: Ship A is classified as class 2, and ship B is classified as class 1. .

[0058] At this point, the total confidence level of combination 2 is significantly higher than that of combination 1. Ship A is reclassified as category 2, while ship B remains in category 1. This algorithm can accurately make concessions for more uncertain objects even without a fixed benchmark.

[0059] When there are multiple ships in the same image ( When constraints conflict simultaneously, among all possible top-3 combinations of multiple ship categories, eliminate all combinations containing mutual conflicts, and calculate the sum of the global confidence scores of the remaining legal combinations. ,Pick The classification result corresponding to the largest value; in the event of a tie, the above reliability adjudication rules are applied sequentially to determine the final classification result after secondary verification, as well as the ship's position and segmentation information.

[0060] (5) Real-time feedback loop: Adjust sample weights and retrain periodically based on human feedback results. Specifically, by establishing a user interface, maritime management personnel or system users can provide timely feedback on the accuracy of the recognition results; the system periodically integrates these user feedback data with the preprocessed recognition results and processes the integrated data; during the data integration process, the weights of the data are adjusted to improve the training effect of the hybrid model.

[0061] Example 2: A ship target identification system suitable for complex marine environments, comprising:

[0062] The multi-source image acquisition module is used to acquire multi-source raw images of the study area, and the multi-source raw images are preprocessed to obtain a fused image.

[0063] The feature fusion processing module is used to input the fused image into a dual-path feature extraction network for feature extraction, generating multi-layer local feature maps, global feature maps, and attention maps; after adaptive feature fusion of the multi-layer local feature maps and global feature maps, a fused feature map is obtained, and the fused feature map is processed by a feature pyramid network to generate a multi-scale hybrid feature map.

[0064] The feature fusion processing module constructs a dual-path feature extraction network, which includes two parallel CNN branches and a ViT branch; The dual-path feature extraction network inputs a fused image. In the CNN branch, a pre-trained ResNet module performs multi-layer convolution and pooling operations on the fused image to generate multi-layer local feature maps containing multi-scale information. In the ViT branch, the fused image is divided into fixed-size image patches, which are then input into the patch Embedding layer for feature embedding to obtain the image patch feature embedding results. Embedding image patch features into the results Input the Transformer encoder to extract global semantic features and generate a global feature map and attention map; Then, the multi-layer local feature maps are upsampled layer by layer and fused with the low-level features in the multi-layer local feature maps. At the same time, the global feature map is reshaped to match the spatial dimension of the multi-layer local feature maps. The local feature maps and global feature maps are then spatially aligned and integrated into a fused feature map. The fused feature map is then processed by a feature pyramid network to generate a multi-scale hybrid feature map.

[0065] The category prediction module inputs multi-layer local and global feature maps into an improved region proposal network. Spatial refinement is performed through convolutional operations, generating local and global spatial refinement features. Based on these features, the target confidence score and bounding box offset of the anchor boxes on the feature maps are calculated, and a candidate region set is selected. Spatial alignment is performed on the candidate regions, mapping them to a multi-scale hybrid feature space. Region alignment features are then generated through interpolation sampling. These features are input into the classification, regression, and mask branches, respectively, outputting the ship's classification result, bounding box coordinates, and pixel-level mask. The classification result includes the category and its confidence score.

[0066] In the category prediction module, multi-layer local feature maps and global feature maps are input into the improved region proposal network, and spatial refinement is performed through a convolutional layer, generating local spatial refinement features and global spatial refinement features respectively. The classification head processes local and global spatial refinement features to predict the target confidence score of each anchor box on the feature map; the regression head processes local spatial refinement features to output the bounding box offset of each anchor box. Threshold filtering is performed on the target confidence score. Anchor boxes with confidence scores higher than the first threshold are considered to contain the target. Boundary boxes are adjusted according to the bounding box offset. Then, the non-maximum suppression algorithm is applied to filter out candidate regions with intersection-union ratios greater than the second threshold, retaining the set of N independent candidate regions with target confidence scores higher than the first threshold and ranked by confidence scores after filtering by the non-maximum suppression algorithm. An enhanced alignment operation is performed on the candidate regions, mapping them to the main path space composed of multi-scale hybrid feature maps. By combining local and global feature maps, a fixed-size region alignment feature is generated through bilinear interpolation. Region alignment features are input to the classification branch, regression branch, and mask branch, respectively. The classification branch classifies each candidate region through a fully connected layer, predicting the target ship category and confidence scores for each category. The regression branch optimizes the bounding box coordinates of the candidate regions. The mask branch predicts the pixel-level mask for each candidate region through an enhanced fully convolutional network. Finally, the classification result, bounding box coordinates, and pixel-level mask of the ship are output. The classification result includes the category and its confidence score.

[0067] The category correction module uses an attention map to perform saliency analysis on the output of the category prediction module, generating a saliency-enhanced classification result for the ship, bounding box coordinates, and pixel-level mask. It verifies the classification result based on preset multiple constraints. If the verification is successful, the classification result is output. If the verification fails, multiple candidate categories for the ship are obtained, all candidate category combinations are iterated through, conflicting combinations that violate the multiple constraints are eliminated, and the category combination with the highest total confidence score is re-selected as the classification result based on the confidence scores of each candidate category. If the total confidence scores are equal, a second decision is made according to preset reliability decision rules, and the decided category combination is taken as the classification result.

[0068] The category correction module summarizes the ship classification results, bounding box coordinates, and pixel-level binarized masks output by the category prediction module in real time. It then combines the attention map output by the feature fusion processing module to perform saliency analysis and generate ship classification results, bounding box coordinates, and pixel-level masks that have been enhanced with saliency. The classification result with the highest confidence level is verified based on preset multiple constraints. These constraints include target size ratio constraints and target spacing temporal constraints. Specifically: if the size ratio of two ships is greater than a size threshold, they should not be classified as the same type of ship; if the distance between two ships during their voyage meets the target spacing temporal constraint, they should not be classified as different categories of ships. The target spacing temporal constraint is: within a sliding window of T frames, the center distance between the detection frames of the two ships... Less than the distance threshold And the proportion of frames that meet the target spacing timing constraints is ≥90%; If the verification is successful, the classification result, bounding box coordinates, and pixel-level mask will be output; if the verification fails, the classification result will be corrected a second time. Specifically, the top three categories with the highest confidence in ship classification are obtained, and all candidate combinations formed by the top three categories are iterated through to eliminate conflicting combinations that violate multiple constraints. For the remaining candidate combinations, calculate their sum of confidence scores. The category combination with the highest total confidence score is re-selected as the classification result; if the total confidence score is... If they are equal, a second decision is made according to the preset reliability decision rule, and the result of the decision is used as the classification result. The reliability decision rule means that the preferred category with greater margin is retained first. Margin refers to the difference in confidence between the preferred category and the second-best category. If the margins are the same, the preferred category with the larger detection box area is retained. If the detection box areas are the same, the preferred category is determined according to the smaller detection number.

[0069] Example 3: Another embodiment of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor executes the computer program to implement a ship target identification method applicable to complex marine environments as described above.

[0070] The electronic device may include: a processor, a memory, a bus, and a communication interface, wherein the processor, the communication interface, and the memory are connected via the bus; the memory stores a computer program that can run on the processor, and when the processor runs the computer program, it executes the online identification and early warning method for water quality change trends provided in any of the foregoing embodiments of the present invention.

[0071] The memory may include high-speed random access memory (RAM), and may also include non-volatile memory, such as at least one disk storage device. Communication between this device network element and at least one other network element is achieved through at least one communication interface (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc.

[0072] The bus can be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. The memory is used to store programs, and the processor executes the program after receiving execution instructions. The ship target identification method suitable for complex marine environments disclosed in any of the foregoing embodiments of the present invention can be applied to a processor, or implemented by a processor.

[0073] The processor may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed through integrated logic circuits in the processor's hardware or through software instructions. The processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application-Specific Integrated Circuit (ASIC), an Off-the-shelf Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this invention can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory; the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.

[0074] The electronic devices and methods provided in the embodiments of this application are based on the same inventive concept and have the same beneficial effects as the methods they employ, operate, or implement.

[0075] Example 4: Another embodiment of this application provides a computer-readable storage medium on which a computer program is stored. The computer program is executed by a processor to implement the methods of any of the above embodiments. The computer-readable storage medium shown is an optical disc, on which a computer program (i.e., a program product) is stored. When the computer program is run by a processor, it performs the methods provided in any of the foregoing embodiments.

[0076] It should be noted that examples of computer-readable storage media may also include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other optical and magnetic storage media, which will not be elaborated here.

[0077] The computer-readable storage medium provided in the above embodiments of this application and the method provided in the embodiments of this application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by the applications stored therein.

[0078] The above description is only a preferred embodiment of the present invention and does not limit the patent scope of the present invention. All equivalent structural transformations made under the concept of the present invention using the contents of the present invention specification and drawings, or direct / indirect applications in other related technical fields, are included within the patent protection scope of the present invention.

Claims

1. A method for ship target identification suitable for complex marine environments, characterized in that, Includes the following steps: (1) Obtain multi-source original images of the study area, and obtain fused images after preprocessing the multi-source original images; (2) Input the fused image into the dual-path feature extraction network for feature extraction to generate multi-layer local feature maps, global feature maps and attention maps; after adaptive feature fusion of the multi-layer local feature maps and global feature maps, a fused feature map is obtained; after processing the fused feature map through the feature pyramid network, a multi-scale hybrid feature map is generated. (3) Input the multi-layer local feature map and global feature map into the improved region proposal network, and perform spatial refinement through convolution operation to generate local spatial refinement features and global spatial refinement features respectively; Based on local and global spatial refinement features, the target confidence score and bounding box offset of the anchor box on the feature map are calculated, and then a set of candidate regions is selected. Spatial alignment operation is performed on the candidate regions to map them to a multi-scale hybrid feature space. Then, region alignment features are generated through interpolation sampling. The region alignment features are input into the classification branch, regression branch and mask branch respectively, and the output is the classification result of the ship, the bounding box coordinates and the pixel-level mask. The classification result includes the category and its confidence score. (4) Use attention maps to perform saliency analysis on the output of step (3) to generate the classification results, bounding box coordinates and pixel-level mask of ships with enhanced saliency; The classification results are validated based on multiple preset constraints. If the validation is successful, the classification results are output. If the verification fails, multiple candidate categories of the ship are obtained, all candidate category combinations are traversed, conflicting combinations that violate multiple constraints are eliminated, and the category combination with the highest total confidence score is re-selected as the classification result based on the confidence score of each candidate category. If the total confidence levels are equal, a second decision is made according to the preset reliability decision rules, and the resulting category combination is used as the classification result.

2. The ship target identification method applicable to complex marine environments according to claim 1, characterized in that, Step (2) specifically includes the following steps: A dual-path feature extraction network is constructed, which includes two parallel CNN branches and a ViT branch; The dual-path feature extraction network inputs a fused image. In the CNN branch, a pre-trained ResNet module performs multi-layer convolution and pooling operations on the fused image to generate multi-layer local feature maps containing multi-scale information. In the ViT branch, the fused image is divided into fixed-size image patches, which are then input into the patch Embedding layer for feature embedding to obtain the image patch feature embedding results. Embedding image patch features into the results Input the Transformer encoder to extract global semantic features and generate a global feature map and attention map; Then, the multi-layer local feature maps are upsampled layer by layer and fused with the low-level features in the multi-layer local feature maps. At the same time, the global feature map is reshaped to match the spatial dimension of the multi-layer local feature maps. The local feature maps and global feature maps are then spatially aligned and integrated into a fused feature map. The fused feature map is then processed by a feature pyramid network to generate a multi-scale hybrid feature map.

3. The ship target identification method applicable to complex marine environments according to claim 1, characterized in that, Step (3) specifically includes the following steps: Multi-layer local feature maps and global feature maps are input into the improved region proposal network, and spatial refinement is performed through a convolutional layer, generating local spatial refinement features and global spatial refinement features respectively. The classification head processes local and global spatial refinement features to predict the target confidence score of each anchor box on the feature map; the regression head processes local spatial refinement features to output the bounding box offset of each anchor box. Threshold filtering is performed on the target confidence score. Anchor boxes with confidence scores higher than the first threshold are considered to contain the target. Boundary boxes are adjusted according to the bounding box offset. Then, the non-maximum suppression algorithm is applied to filter out candidate regions with intersection-union ratios greater than the second threshold, retaining the set of N independent candidate regions with target confidence scores higher than the first threshold and ranked by confidence scores after filtering by the non-maximum suppression algorithm. An enhanced alignment operation is performed on the candidate regions, mapping them to the main path space composed of multi-scale hybrid feature maps. By combining local and global feature maps, a fixed-size region alignment feature is generated through bilinear interpolation. Region alignment features are input into the classification branch, regression branch, and mask branch respectively. The classification branch classifies each candidate region through a fully connected layer, predicting the target ship category and the confidence score of each category. The regression branch optimizes the bounding box coordinates of the candidate regions; the mask branch predicts the pixel-level mask of each candidate region through an enhanced fully convolutional network; the final output is the classification result of the ship, the bounding box coordinates, and the pixel-level mask. The classification result includes the category and its confidence score.

4. The ship target identification method applicable to complex marine environments according to claim 1, characterized in that, Step (4) specifically includes the following steps: The classification results, bounding box coordinates, and pixel-level binarized masks of the ships output in step 3 are summarized in real time. The significance analysis is performed in combination with the attention map output in step 2 to generate ship classification results, bounding box coordinates, and pixel-level masks with enhanced significance. The classification result with the highest confidence level is verified based on preset multiple constraints. These constraints include target size ratio constraints and target spacing temporal constraints. Specifically: if the size ratio of two ships is greater than a size threshold, they should not be classified as the same type of ship; if the distance between two ships during their voyage meets the target spacing temporal constraint, they should not be classified as different categories of ships. The target spacing temporal constraint is: within a sliding window of T frames, the center distance between the detection frames of the two ships... Less than the distance threshold And the proportion of frames that meet the target spacing timing constraints is ≥90%; If the verification is successful, the classification result, bounding box coordinates, and pixel-level mask will be output. If the verification fails, the classification result will be corrected a second time. Specifically, the top three categories with the highest confidence in ship classification are obtained, and all candidate combinations formed by the top three categories are iterated through to eliminate conflicting combinations that violate multiple constraints. For the remaining candidate combinations, calculate their sum of confidence scores. The category combination with the highest total confidence score is re-selected as the classification result; if the total confidence score is... If they are equal, a second decision is made according to the preset reliability decision rule, and the result of the decision is used as the classification result. The reliability decision rule means that the preferred category with greater margin is retained first. Margin refers to the difference in confidence between the preferred category and the second-best category. If the margins are the same, the preferred category with the larger detection box area is retained. If the detection box areas are the same, the preferred category is determined according to the smaller detection number.

5. A ship target identification system suitable for complex marine environments, characterized in that, include: The multi-source image acquisition module is used to acquire multi-source raw images of the study area, and the multi-source raw images are preprocessed to obtain a fused image; The feature fusion processing module is used to input the fused image into a dual-path feature extraction network for feature extraction, generating multi-layer local feature maps, global feature maps, and attention maps; after adaptive feature fusion of the multi-layer local feature maps and global feature maps, a fused feature map is obtained; and after processing the fused feature map through a feature pyramid network, a multi-scale hybrid feature map is generated. The category prediction module is used to input multi-layer local feature maps and global feature maps into the improved region proposal network, and perform spatial refinement through convolution operations to generate local spatial refinement features and global spatial refinement features respectively. Based on local and global spatial refinement features, the target confidence score and bounding box offset of the anchor box on the feature map are calculated, and then a set of candidate regions is selected. Spatial alignment operation is performed on the candidate regions to map them to a multi-scale hybrid feature space. Then, region alignment features are generated through interpolation sampling. The region alignment features are input into the classification branch, regression branch and mask branch respectively, and the output is the classification result of the ship, the bounding box coordinates and the pixel-level mask. The classification result includes the category and its confidence score. The category correction module is used to perform saliency analysis on the output of the category prediction module using an attention map, generating saliency-enhanced ship classification results, bounding box coordinates, and pixel-level masks; The classification results are validated based on multiple preset constraints. If the validation is successful, the classification results are output. If the verification fails, multiple candidate categories of the ship are obtained, all candidate category combinations are traversed, conflicting combinations that violate multiple constraints are eliminated, and the category combination with the highest total confidence score is re-selected as the classification result based on the confidence score of each candidate category. If the total confidence levels are equal, a second decision is made according to the preset reliability decision rules, and the resulting category combination is used as the classification result.

6. A ship target identification system suitable for complex marine environments according to claim 5, characterized in that, The feature fusion processing module constructs a dual-path feature extraction network, which includes two parallel CNN branches and a ViT branch. The dual-path feature extraction network inputs a fused image. In the CNN branch, a pre-trained ResNet module performs multi-layer convolution and pooling operations on the fused image to generate multi-layer local feature maps containing multi-scale information. In the ViT branch, the fused image is divided into fixed-size image patches, which are then input into the patch Embedding layer for feature embedding to obtain the image patch feature embedding results. Embedding image patch features into the results Input the Transformer encoder to extract global semantic features and generate a global feature map and attention map; Then, the multi-layer local feature maps are upsampled layer by layer and fused with the low-level features in the multi-layer local feature maps. At the same time, the global feature map is reshaped to match the spatial dimension of the multi-layer local feature maps. The local feature maps and global feature maps are then spatially aligned and integrated into a fused feature map. The fused feature map is then processed by a feature pyramid network to generate a multi-scale hybrid feature map.

7. A ship target identification system suitable for complex marine environments according to claim 5, characterized in that, In the category prediction module, multi-layer local feature maps and global feature maps are input into the improved region proposal network, and spatial refinement is performed through a convolutional layer, generating local spatial refinement features and global spatial refinement features respectively. The classification head processes local and global spatial refinement features to predict the target confidence score of each anchor box on the feature map; the regression head processes local spatial refinement features to output the bounding box offset of each anchor box. Threshold filtering is performed on the target confidence score. Anchor boxes with confidence scores higher than the first threshold are considered to contain the target. Boundary boxes are adjusted according to the bounding box offset. Then, the non-maximum suppression algorithm is applied to filter out candidate regions with intersection-union ratios greater than the second threshold, retaining the set of N independent candidate regions with target confidence scores higher than the first threshold and ranked by confidence scores after filtering by the non-maximum suppression algorithm. An enhanced alignment operation is performed on the candidate regions, mapping them to the main path space composed of multi-scale hybrid feature maps. By combining local and global feature maps, a fixed-size region alignment feature is generated through bilinear interpolation. Region alignment features are input into the classification branch, regression branch, and mask branch respectively. The classification branch classifies each candidate region through a fully connected layer, predicting the target ship category and the confidence score of each category. The regression branch optimizes the bounding box coordinates of the candidate regions; the mask branch predicts the pixel-level mask of each candidate region through an enhanced fully convolutional network; the final output is the classification result of the ship, the bounding box coordinates, and the pixel-level mask. The classification result includes the category and its confidence score.

8. A ship target identification system suitable for complex marine environments according to claim 5, characterized in that, The category correction module summarizes the ship classification results, bounding box coordinates, and pixel-level binarized mask output by the category prediction module in real time, and performs saliency analysis by combining the attention map output by the feature fusion processing module to generate ship classification results, bounding box coordinates, and pixel-level mask with enhanced saliency. The classification result with the highest confidence level is verified based on preset multiple constraints. These constraints include target size ratio constraints and target spacing temporal constraints. Specifically: if the size ratio of two ships is greater than a size threshold, they should not be classified as the same type of ship; if the distance between two ships during their voyage meets the target spacing temporal constraint, they should not be classified as different categories of ships. The target spacing temporal constraint is: within a sliding window of T frames, the center distance between the detection frames of the two ships... Less than the distance threshold And the proportion of frames that meet the target spacing timing constraints is ≥90%; If the verification is successful, the classification result, bounding box coordinates, and pixel-level mask will be output. If the verification fails, the classification result will be corrected a second time. Specifically, the top three categories with the highest confidence in ship classification are obtained, and all candidate combinations formed by the top three categories are iterated through to eliminate conflicting combinations that violate multiple constraints. For the remaining candidate combinations, calculate their sum of confidence scores. The category combination with the highest total confidence score is re-selected as the classification result; if the total confidence score is... If they are equal, a second decision is made according to the preset reliability decision rule, and the result of the decision is used as the classification result. The reliability decision rule means that the preferred category with greater margin is retained first. Margin refers to the difference in confidence between the preferred category and the second-best category. If the margins are the same, the preferred category with the larger detection box area is retained. If the detection box areas are the same, the preferred category is determined according to the smaller detection number.

9. An electronic device, characterized in that, The device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement a ship target identification method suitable for complex marine environments as described in any one of claims 1-4.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, The computer program is executed by a processor to implement a ship target identification method applicable to complex marine environments as described in any one of claims 1-4.