A Ship Type Recognition Method and System Based on Transfer Learning

Through the ship recognition method with cross-domain noise decoupling and space-time perceptual migration enhancement, combined with adversarial robust classification decision-making and incremental learning, the accuracy and robustness of ship recognition in complex environments is solved, and stable and accurate ship type recognition is achieved.

CN119992482BActive Publication Date: 2025-08-01无锡九方科技有限公司

Patent Information

Application Number
CN202510442457.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-10
Publication Date
2025-08-01
Estimated Expiration
2045-04-10

AI Technical Summary

Technical Problem

The existing ship recognition methods have low recognition accuracy in complex sea conditions, low visibility or occlusion scenarios, making it difficult to deal with the data distribution differences between different sensors, and the classifier is insufficient robustness and expansion, and lack effective noise decoupling, motion semantic modeling and context constraints.

Method used

Cross-domain noise decoupled feature extraction, space-time-aware migration enhancement, and adversarial robust classification decision-making, combined with differentiable decision tree and incremental learning, separate ship's inherent features and environmental noise through an adversarial domain decoupling network, enhance motion mode features using ship GPS trajectory data, and trigger incremental learning at low confidence to generate context constraints.

Benefits of technology

It improves the stability and accuracy of ship type identification, enhances the model's adaptability in complex environments, reduces the misidentification rate and the success rate of adversarial attacks, and ensures the reliability and expansion of classifiers in open environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119992482B_ABST
    Figure CN119992482B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of graphic recognition, and specifically relates to a ship type recognition method and system based on transfer learning, including the following steps: jointly preprocess visible light ship images and synthetic aperture radar images, separate the ship inherent feature layer and the environmental noise feature layer through an adversarial domain decoupling network, and generate a cross-domain feature matrix free of interference; strengthen the spatio-temporal consistency features related to the ship motion mode, and output an enhanced enhanced feature matrix; construct a differentiable decision tree classifier based on the enhanced feature matrix of S2, select the category with the highest probability as the final recognition result for output, compare the confidence level of the final recognition result with a preset threshold, and if it is lower than the preset threshold, trigger incremental learning. The present invention improves the adaptability to complex sea conditions, ship type diversity and occlusion conditions, significantly reduces the misrecognition rate and the success rate of adversarial attacks, and effectively improves the reliability of the system in an open environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of graphic recognition, and particularly to a ship type recognition method and system based on transfer learning. Background Art

[0002] With the continuous expansion of the global marine transportation scale, ship type recognition is of great significance in application scenarios such as maritime supervision, port scheduling, maritime traffic management, and illegal behavior monitoring. Traditional ship recognition methods mostly rely on single-modal images (such as visible light images or radar images) for feature extraction and classification discrimination, with low recognition accuracy in complex sea conditions, low visibility, or occlusion scenarios, and it is difficult to cope with the recognition deviation caused by the data distribution differences between different sensors.

[0003] In recent years, with the development of deep learning technology, multi-modal fusion and transfer learning methods have gradually been applied to ship recognition tasks. Some studies have tried to jointly use multi-modal images and visible light images to improve the recognition accuracy by leveraging their complementary advantages under different weather conditions. However, the existing multi-modal methods generally have the following technical bottlenecks:

[0004] First, there is a problem of noise interference coupling in cross-modal features. Different modal images are greatly affected by imaging mechanisms, and noises such as background clutter, light interference, and sea surface reflection are likely to introduce redundant features, affecting the discrimination ability of the ship's body structure.

[0005] Second, the feature transfer process lacks motion semantic modeling. As a dynamic target, the type of a ship is also manifested as differences in motion patterns in addition to structural features. Existing methods do not fully explore the spatio-temporal features in trajectory data and are difficult to effectively distinguish between ship types with similar structures.

[0006] Third, the robustness and scalability of the classifier are insufficient. The recognition accuracy of traditional classification models decreases when facing ships of unknown types or interference samples. There is a lack of an effective robustness enhancement mechanism, and the incremental learning mechanism without context constraints is likely to lead to abnormal expansion of the model structure or fuzzy class boundaries, restricting its long-term adaptation ability in actual complex environments. Summary of the Invention

[0007] The present invention provides a ship type recognition method and system based on transfer learning, which has the ability of cross-modal noise decoupling, motion semantic enhancement, and context constraint adaptive learning, so as to achieve a more stable, accurate, and scalable ship classification effect and meet the actual needs of modern maritime intelligent management systems.

[0008] A ship type recognition method based on transfer learning includes the following steps:

[0009] S1. Cross - domain noise decoupling feature extraction: Jointly preprocess the visible - light ship image and the synthetic aperture radar (SAR) image, and separate the ship's inherent feature layer and the environmental noise feature layer through an adversarial domain decoupling network to generate a cross - domain feature matrix free of interference.

[0010] S2. Spatiotemporal perception migration enhancement: Input the cross - domain feature matrix output by S1 into the spatiotemporal gated migration network, and use the ship's GPS trajectory data to dynamically adjust the feature channel weights to strengthen the spatiotemporal consistency features related to the ship's motion pattern, and output an enhanced feature matrix.

[0011] S3. Adversarial robust classification decision: Construct a differentiable decision - tree classifier based on the enhanced feature matrix of S2, calculate the probability distribution of ship types through the differentiable decision - tree classifier, select the category with the highest probability as the final recognition result for output, compare the confidence of the final recognition result with a preset threshold, and if it is lower than the preset threshold, trigger incremental learning; at the same time, embed virtual adversarial samples generated by adversarial training at the classification nodes to form an anti - interference discriminant boundary for ship types, thereby improving the robustness of the classifier.

[0012] S4. Context - aware incremental learning: Receive the trigger instruction for incremental learning in S3, generate context constraints in combination with the ship traffic density and navigation rules in the current sea area, and only allow new feature vectors that meet the constraints to trigger the expansion of the classifier topology.

[0013] Optionally, S1 specifically includes:

[0014] S11. Spatiotemporal registration of multi - source data: Align the visible - light ship image and the synthetic aperture radar image. Based on the MMSI code and UTC timestamp in the ship's AIS signal, eliminate the spatial offset through the feature - point matching method, and perform pixel - level alignment on the ship targets in the two - modality data.

[0015] S12. Dual - channel adversarial decoupling: Construct a dual - encoder network structure. The first encoder extracts the HSV color - space texture features of the visible - light image, and the second encoder extracts the backscattering intensity features of the synthetic aperture radar image. Perform noise separation through the gradient reversal layer (GRL) and the domain classifier, where:

[0016] The noise feature layer is guided by the domain - classifier loss function (i.e., the adversarial loss function, used to train the noise feature layer) to learn domain - specific features related to environmental interference;

[0017] The ship's inherent feature layer is constrained by the reconstruction loss (i.e., the reconstruction loss function, used to retain the inherent features) to retain cross - modal common features related to the ship's structure denotes the input from The intrinsic features extracted represent the image reconstruction result based on this feature;

[0018] S13, Cross-domain feature fusion: The decoupled visible light intrinsic features and the synthetic aperture radar image intrinsic features are concatenated at the channel level, and dimensionality reduction fusion is performed through the feature mapping weight matrix guided by attention to generate a cross-domain feature matrix , and its calculation formula is:

[0019] where, represents element-wise multiplication, is the Sigmoid activation function, represents the channel concatenation operation, is the Sigmoid activation function, represents transpose of; The total loss function is expressed as: where, , .

[0020] Optionally, the first encoder is a visible light encoder: Using the ResNet-50 backbone network, extract the HSV color space texture features (such as painting, rust, ship name, etc. information).

[0021] The second encoder is a SAR encoder: Design a polarization consistency convolutional layer to extract the backscattering intensity features.

[0022] The domain classifier is composed of a 3-layer fully connected network, connected to the encoder through a gradient reversal layer, identify the source modality of the features, and achieve feature domain adaptation.

[0023] Optionally, S2 includes performing sliding window sampling on the trajectory data of the ship, extracting the motion state information within each time window, and constructing a motion vector sequence composed of speed, heading angle, and acceleration, inputting the motion vector sequence into a bidirectional long short-term memory network for temporal encoding, and outputting a low-dimensional spatio-temporal feature vector for characterizing the current ship motion mode.

[0024] Optionally, S2 also includes flattening the cross-domain fusion feature matrix of S1 in the spatial dimension, performing feature-level interaction with the spatio-temporal feature vector, and inputting the interaction result into a perceptron composed of two layers of fully connected networks to generate a gating attention weight reflecting the importance of each channel. The gating attention weight dynamically adjusts all channels through a normalization process, so that the response capabilities between channels change orderly with the motion state.[[ID=ST]]

[0025] Optionally, the gated attention weights act on the channel dimension of the cross-domain feature matrix of S1, enhancing the feature channels correlated with the current motion pattern through per-channel scaling, while suppressing the expression intensity of noise interference and irrelevant features, to form a weighted feature matrix weighted by the gated attention weights;

[0026] The weighted feature matrix is input into a three-dimensional convolutional layer to jointly extract local continuity structure features in both the temporal and spatial dimensions, aggregate motion consistency features along the time-space dimension, and output an enhanced feature matrix. The enhanced feature matrix satisfies the constraint conditions of the change amplitude between adjacent frames.

[0027] Optionally, S3 includes constructing a differentiable decision tree classifier based on an end-to-end trainable mechanism. Each classification node of the decision tree classifier performs a feature splitting operation through a continuous gating function, allowing the input feature vector to be transmitted in the form of probability among various paths. The input feature vector is the enhanced feature matrix in S2. For the gradient propagation of the overall structure, the leaf nodes correspond to a predefined set of ship classes, and the probability distribution results on the corresponding set of ship classes are output as the candidate output for the final recognition.

[0028] Optionally, during the training phase of the decision tree classifier, an adversarial sample generation mechanism is introduced. By calculating the gradient direction of the input feature vector, a perturbation sample with the maximum classification deviation risk is generated, and it is injected into the classification structure together with the original sample for joint training. The loss function in the joint training combines the prediction loss of the original input and the stability index of the adversarial sample to strengthen the stability of the classification boundary in a high-noise environment;

[0029] During the inference phase of the decision tree classifier, based on the path propagation results of the input feature vector in the classification tree, the probability distribution on each ship type is calculated, and the class corresponding to the maximum probability value is selected as the current recognition result. The reliability of the output result is determined according to a preset confidence threshold. When the confidence of the recognition result is lower than the confidence threshold, an incremental learning process is automatically triggered.

[0030] During the inference phase, the decision tree classifier imposes a continuity constraint on the feature change rate of each classification node to limit the influence amplitude of feature perturbation on the classification output.

[0031] Optionally, in S4, access the historical database of the Automatic Identification System (AIS) of ships, extract the occurrence of ships in the current sea area within the time window, calculate the ship traffic density in combination with the sea area, and at the same time load the maritime rule library, and encode the navigation restriction conditions therein into a set of logical rules; by receiving the data stream of the Automatic Identification System of ships in real time, continuously track the change of traffic density, and calculate the density change rate. When the density change rate exceeds the rate threshold, automatically switch to the high-density operation mode, and readjust the activation conditions of incremental learning according to the current navigation environment, map the loaded set of navigation rules into a continuous vector form, and form a rule feature vector to describe the satisfaction degree of each constraint condition;

[0032] When the confidence of the recognition result output by S3 is lower than the preset threshold, use the corresponding enhanced feature matrix as the new feature vector to be learned, and perform incremental verification on the new feature vector. When the incremental verification passes, use the new feature vector as a new category, create a prototype node for the new category, and update the features of the created prototype node. Add a splitting path for the new category in the original differentiable decision tree classifier structure, and introduce a contrast constraint mechanism. By measuring the feature differences between the prototypes of the new and old categories, forcefully maintain a sufficient feature boundary distance, so as to ensure that the extended classifier structure has clear separability and maintains the stability of the overall classification performance.

[0033] A ship type recognition system based on transfer learning for implementing the above ship type recognition method, including the following modules:

[0034] Cross-domain feature extraction module, used to jointly preprocess visible light images and synthetic aperture radar images, and extract the inherent features of ships through an adversarial domain decoupling network to generate a denoised cross-domain feature matrix;

[0035] Spatio-temporal transfer enhancement module, used to receive the cross-domain feature matrix and dynamically adjust the feature channel weights in combination with the ship's GPS trajectory data, and output a consistency-enhanced feature matrix that strengthens the motion mode features;

[0036] Classification decision module, based on the enhanced features, construct a differentiable decision tree classifier to complete the calculation of the probability of ship types, and trigger the incremental learning mechanism when the recognition confidence is lower than the threshold;

[0037] Incremental learning module, generate context constraints according to ship traffic density and navigation rules, and perform adaptive expansion of the classifier structure when the conditions are met.

[0038] The beneficial effects of the present invention:

[0039] In the present invention, by constructing a dual-encoder adversarial decoupling network for visible light images and SAR images, the effective separation of the inherent structural features of ships and environmental noise is achieved. Through the guided learning of domain-specific noise and the reconstruction constraint of cross-modal inherent features, the image perturbations caused by external factors such as illumination, sea surface reflection, and weather are suppressed, and the robustness and cross-scene recognition performance of the model under multi-source heterogeneous inputs are improved.

[0040] In the present invention, a robust classification method combining a differentiable decision tree and an adversarial embedding mechanism is proposed. During the classification process, adversarial perturbation training and boundary smoothing constraints are introduced, enabling the classifier to maintain a stable and clear decision boundary when facing perturbed samples or unknown type samples. Through the Lipschitz continuity constraint and the prediction uncertainty estimation mechanism, the adaptability to complex sea conditions, ship type diversity, and occlusion situations is improved, significantly reducing the misrecognition rate and the success rate of adversarial attacks. This structure supports fast decision-making for high-confidence samples and rejection output for low-confidence samples, effectively enhancing the reliability of the system in an open environment.

[0041] In the present invention, a context-driven incremental learning mechanism combining traffic density and maritime rule constraints is introduced. In low-confidence recognition scenarios, the similarity between new features and the historical sample distribution and the degree of compliance with navigation rules are comprehensively evaluated to determine whether to allow the expansion of the model structure, controlling the legality and representativeness of new categories from the source. At the same time, through prototype memory update and contrast constraint between categories, the separability between new categories and the existing structure is maintained, preventing category boundary blur and structure inflation. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] To more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only those of the present invention. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without creative efforts.

[0043] Figure 1 Schematic diagram of the recognition method process for the embodiments of the present invention;

[0044] Figure 2 Schematic diagram of the dual-encoder network structure for the embodiments of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0045] The present invention will be described in detail below with reference to the drawings and specific embodiments. At the same time, it should be noted here that in order to make the embodiments more detailed, the following embodiments are the best and preferred embodiments. For some well-known technologies, those skilled in the art can also adopt other alternative methods for implementation; and the drawing part is only for more specifically describing the embodiments, and is not intended to specifically limit the present invention.

[0046] It should be noted that in the specification, the indication of "an embodiment", "embodiments", "exemplary embodiments", "some embodiments", etc. means that the described embodiments may include specific features, structures or characteristics, but not necessarily every embodiment includes such specific features, structures or characteristics. Additionally, when combining embodiments to describe specific features, structures or characteristics, implementing such features, structures or characteristics in combination with other embodiments (whether explicitly described or not) should be within the knowledge scope of those skilled in the relevant art.

[0047] Generally, terms can be understood at least in part from their use in context. For example, at least in part depending on the context, the term "one or more" used herein can be used to describe any feature, structure or characteristic in a singular sense, or can be used to describe a combination of features, structures or characteristics in a plural sense. Additionally, the term "based on" can be understood as not necessarily aiming to convey a set of exclusive factors, but instead, at least in part depending on the context, allowing for the existence of other factors that are not necessarily explicitly described.

[0048] As Figure 1 - Figure 2 shown, a ship type recognition method based on transfer learning includes the following steps:

[0049] S1. Cross - domain noise decoupling feature extraction: Jointly pre - process visible - light ship images and synthetic aperture radar (SAR) images, and separate the ship intrinsic feature layer and environmental noise feature layer through an adversarial domain decoupling network to generate a cross - domain feature matrix free of interference.

[0050] S2. Spatiotemporal perception transfer enhancement: Input the cross - domain feature matrix output by S1 into a spatiotemporal gated transfer network, and use ship GPS trajectory data to dynamically adjust the feature channel weights, strengthen the spatiotemporal consistency features related to the ship motion pattern, and output an enhanced feature matrix.

[0051] S3. Adversarial robust classification decision: Based on the enhanced feature matrix of S2, construct a differentiable decision tree classifier, calculate the ship type probability distribution through the differentiable decision tree classifier, select the category with the highest probability as the final recognition result for output, compare the confidence of the final recognition result with a preset threshold, and if it is lower than the preset threshold, trigger incremental learning; at the same time, embed virtual adversarial samples generated by adversarial training at the classification nodes to form an anti - interference ship type discrimination boundary, thereby improving the robustness of the classifier.

[0052] S4. Context - aware incremental learning: Receive the trigger incremental learning instruction of S3, generate context constraints by combining the ship traffic density and navigation rules in the current sea area, and only allow new feature vectors that meet the constraints to trigger the expansion of the classifier topology structure.

[0053] S1 specifically includes:

[0054] S11, spatio-temporal registration of multi-source data: Perform alignment operations on visible-light ship images and synthetic aperture radar images. Based on the MMSI coding and UTC timestamp in the ship AIS signal, eliminate spatial offsets through feature point matching, and perform pixel-level alignment on ship targets in the two-modal data;

[0055] S12, dual-channel adversarial decoupling: Construct a dual-encoder network structure. The first encoder extracts the HSV color space texture features of the visible-light image, and the second encoder extracts the backscattering intensity features of the synthetic aperture radar image. Perform noise separation through the gradient reversal layer (GRL) and the domain classifier. Among them:

[0056] The noise feature layer is guided by the domain classifier loss function (i.e., the adversarial loss function, used to train the noise feature layer) to learn domain-specific features related to environmental interference;

[0057] The ship inherent feature layer is constrained by the reconstruction loss (i.e., the reconstruction loss function, used to retain inherent features) to retain cross-modal common features related to the ship structure, denotes the inherent features extracted from the input and denotes the image reconstruction result based on this feature;

[0058] S13, cross-domain feature fusion: Concatenate the decoupled visible-light inherent features with the synthetic aperture radar image inherent features at the channel level, and perform dimensionality reduction fusion through the attention-guided feature mapping weight matrix to generate a cross-domain feature matrix , and its calculation formula is:

[0059] Among them, denotes element-wise multiplication, is the Sigmoid activation function, denotes the channel concatenation operation, is the Sigmoid activation function, denotes transpose;

[0060] The total loss function is expressed as: , among which, , . It is used to regulate the training weights of adversarial and reconstructive objectives to ensure noise decoupling while retaining discriminative structural features.

[0061] The first encoder is a visible light encoder: It uses a ResNet-50 backbone network to extract texture features in the HSV color space (such as information on painting, rust, ship names, etc.);

[0062] The visible light encoder (HSV texture feature extraction) is as follows:

[0063] 1. Input preprocessing:

[0064] Convert the visible light RGB image to the HSV color space and separate the three channels of hue (H), saturation (S), and value (V);

[0065] Normalize each channel of HSV (normalize H ∈ [0°, 360°] to [0, 1], and keep the original range for S / V ∈ [0, 1]).

[0066] 2. ResNet-50 structure adjustment:

[0067] Input layer transformation: Replace the 3-channel input layer of the original ResNet-50 with a 3×3 convolutional kernel (to adapt to the three-channel input of HSV);

[0068] Feature extraction strategy: Freeze the first 3 residual blocks (retain the general feature extraction ability);

[0069] Fine-tune the 4th - 5th residual blocks to focus on the HSV texture patterns unique to ships (such as hue changes in rust and saturation differences in painting).

[0070] Output features: Output the feature map from the 5th residual block .

[0071] The second encoder is a SAR encoder: Design a polarization consistency convolutional layer to extract backscattering intensity features;

[0072] The implementation of the SAR encoder (polarization consistency convolutional layer) is as follows:

[0073] 1. Polarization data processing: The input is the scattering matrix of fully polarized synthetic aperture radar image data , which is decomposed into 6-channel real number input;

[0074] 2. Polarization consistency convolution design:

[0075] Convolutional kernel structure: Design 4 groups of 3×3 convolutional kernels, each group corresponding to a polarization combination, and fuse the relationship between polarizations through learnable weights;

[0076] Feature enhancement mechanism: Add polarization coherence loss after the convolutional layer , and constrain the features to be consistent with the scattering characteristics of the ship's metal structure ( is the theoretical value of the polarization coherence coefficient for metal targets);

[0077] Output feature: The output feature map after 4 layers of polarization convolution 。

[0078] The domain classifier is composed of a 3-layer fully connected network, connected to the encoder through a gradient reversal layer, to identify the source modality of the features and achieve feature domain adaptation.

[0079] The domain classifier realizes (noise feature separation) as follows:

[0080] 1. Network structure:

[0081] Input: Noise feature layer (noise features output by the visible light / SAR encoder, dimension 256);

[0082] Fully connected layer design:

[0083] The first layer: , ReLU activation;

[0084] The second layer: 128 , ReLU activation;

[0085] The third layer: 64 , Sigmoid activation (output domain classification probability);

[0086] 2. Adversarial training mechanism:

[0087] Gradient reversal layer (GRL): Insert GRL before the domain classifier, reverse the gradient sign during backpropagation, and force the encoder to generate domain-invariant features;

[0088] Domain classifier loss function: Use binary cross-entropy loss , where represents the feature source (0 = visible light, 1 = SAR);

[0089] 3. Noise separation effect: By maximizing the domain classifier loss, drive the encoder to separate domain-related noises (such as SAR speckle noise, visible light illumination changes) to the noise feature layer, and retain the inherent features of the ship in the domain-invariant space.

[0090] S2 specifically includes:

[0091] S21, Trajectory spatio-temporal encoding: Perform sliding window sampling on the ship's GPS trajectory data (window length is 10 seconds, step size is 1 second), and extract the ship speed , heading angle , acceleration to form a motion vector , input the sequential motion vector sequence into a bidirectional LSTM, and generate a spatio-temporal feature vector through bidirectional LSTM encoding , representing the spatio-temporal feature vector of the current ship motion mode:

[0092] S22, Gating Weight Generation: Unfold the cross-domain feature matrix output by S1 along the spatial dimension into , multiply it element-wise with to generate the channel gating attention weight through a two-layer multi-layer perceptron MLP , expressed as:

[0093] , where the two-layer multi-layer perceptron MLP is a two-layer fully connected network (C , Normalize along the channel dimension so that the weights sum to 1;

[0094] S23, Feature Dynamic Enhancement: Use the gating attention weight to perform channel weighting on the cross-domain feature matrix, strengthen the feature channels related to the motion mode, and form the dynamic feature matrix : , where represents broadcast multiplication along the channel dimension, i.e., per-channel scaling;

[0095] S24, Spatio-Temporal Consistency Verification: Input the weighted feature matrix into a 3D convolutional layer (kernel size 3×3×3), aggregate the motion consistency features along the time-space dimension, and output the enhanced feature matrix , satisfying the spatio-temporal continuity constraint: , where, is the enhanced feature of the i-th frame, is used to measure the change amplitude between frames, is the continuity threshold, controlling the feature fluctuation range to prevent misjudgment and interference enhancement.

[0096] S3 specifically includes:

[0097] S31, Differentiable Decision Tree Construction: Construct a differentiable decision tree classifier based on an end-to-end trainable mechanism. Each classification node uses the Sigmoid activation function as a soft splitting gate, and define the classification node splitting function as a differentiable Sigmoid gating function , where is the enhanced feature matrix output by S2, , are learnable parameters, is the activation function;

[0098] Each leaf node is associated with a ship class probability distribution: , where is the class weight matrix, is the total number of known ship types, is the predicted probability of the th type of ship;

[0099] S32, adversarial feature embedding training:

[0100] In the training stage, adversarial perturbations are generated for the input feature vectors by the fast gradient sign method to obtain adversarial samples : , , is the adversarial perturbation amplitude. The adversarial samples are injected into the decision tree splitting nodes, and the loss function is jointly optimized with the original samples:

[0101] , where is the weight coefficient of the loss between the original sample and the adversarial sample, , forcing the classification boundary to be stable against perturbations, is the cross-entropy loss function;

[0102] S33, probability distribution calculation and decision-making:

[0103] For any input enhanced feature matrix , calculate the product of the path probabilities from the root node to each leaf node to obtain the final ship class probability distribution vector : , the root node is the starting node of the decision tree, located at the top of the tree structure, and is the entry point for all input features to enter the classification process. It belongs to the classification node. The leaf node is the terminal node and no longer splits, outputting the class probability;

[0104] Select the class corresponding to the maximum probability value as the recognition result, and set the confidence threshold , when S4 incremental learning is triggered;

[0105] S34, anti-interference boundary optimization: To suppress the classification deviation caused by small perturbations, in the inference stage, a Lipschitz constraint is imposed on the classification nodes to limit the change rate of the gradient in the feature space: ;

[0106] Generate uncertainty estimates through Monte Carlo Dropout. When the prediction variance Var the output result is rejected and the features are re-extracted.

[0107] S4 specifically includes:

[0108] S41, context knowledge base construction: Access the ship AIS historical database and extract the ship traffic density in the current sea area , where is the number of ships appearing within the time window ; is the sea area. Load the maritime rules library and encode the navigation constraints as a logical rule set , where represents hard or soft navigation constraints such as speed limits, draft limits, and sea area restricted areas. For example, the hard constraint "ships with a draft > 10m are prohibited from entering the inshore area";

[0109] S42, Real-time context feature generation: Based on the AIS real-time data stream, calculate the traffic density change rate of the current sea area , when the traffic density change rate activates the high-density mode, and maps the logical rule set to a rule feature vector , where each dimension corresponds to the satisfaction degree of a specific constraint, and the value range is a continuous value in [0,1]. The mapping method is rule vectorization based on fuzzy logic;

[0110] S43, Constraint-driven incremental verification: For the new feature vector to be learned triggered by S3 , calculate its joint matching degree with the context features: , where represents the Mahalanobis distance similarity with the historical feature distribution , Sat is the rule satisfaction degree, is the weight coefficient of the similarity and the rule constraint, , when , allow the classifier to be extended, is the minimum score threshold for allowing the classifier to be extended, ;

[0111] The new feature vector to be learned triggered by S3 refers to: In the S3 probability distribution calculation and decision-making, after classifying the input feature vector through a differentiable decision tree classifier, if the maximum class probability value of the recognition result is lower than the set confidence threshold (pmax < τ = 0.4), it is considered that the class of the current input sample is not clear or may belong to an unknown class. At this time, trigger the S4 incremental learning process, and use the enhanced feature matrix of this low-confidence input (that is, the feature vector output by S2) as the new feature vector to be learned ;

[0112] S44, Classifier topology extension: For the new class features that have passed the verification, create a new class prototype node EMA , update the prototype using the exponential moving average: , where is the prototype smoothing coefficient, , For the new category prototype vector at time , subsequently, a new splitting path is added in the differentiable decision tree classifier, and a contrast loss function is introduced to constrain the original category boundary. The contrast loss function constrains the distance between the new and old categories ( ), where is the minimum distance threshold between categories, to maintain the structural stability of the classifier, is the prototype vector of the historical category,

[0113] A ship type recognition system based on transfer learning for implementing the above recognition method, including the following modules:

[0114] A cross-domain feature extraction module for jointly preprocessing visible light images and synthetic aperture radar images, and extracting the inherent features of ships through an adversarial domain decoupling network to generate a denoised cross-domain feature matrix;

[0115] A spatio-temporal migration enhancement module for receiving the cross-domain feature matrix and dynamically adjusting the feature channel weights in combination with the ship's GPS trajectory data to output a consistency-enhanced feature matrix that strengthens the motion pattern features;

[0116] A classification decision module for constructing a differentiable decision tree classifier based on the enhanced features, calculating the probability of the ship type, and triggering an incremental learning mechanism when the recognition confidence is lower than the threshold;

[0117] An incremental learning module for generating context constraints based on ship traffic density and navigation rules, and performing adaptive expansion of the classifier structure when the conditions are met.

[0118] The present invention covers any substitutions, modifications, equivalent methods, and solutions made within the spirit and scope of the present invention. To enable the public to have a thorough understanding of the present invention, specific details are described in detail in the following preferred embodiments of the present invention, and those skilled in the art can fully understand the present invention without these detailed descriptions. Additionally, well-known methods, processes, flows, components, and circuits are not described in detail to avoid unnecessary confusion to the essence of the present invention.

[0119] The above description is only a preferred embodiment of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention.

Claims

1. A ship type recognition method based on transfer learning, characterized in that It includes the following steps: S1. Cross-domain noise decoupling feature extraction: Joint preprocessing is performed on visible light ship images and synthetic aperture radar images. The ship inherent feature layer and environmental noise feature layer are separated through an adversarial domain decoupling network to generate a cross-domain feature matrix free of interference. Specifically, it includes: S11. Spatiotemporal registration of multi-source data: Alignment operations are performed on visible light ship images and synthetic aperture radar images; S12. Dual-channel adversarial decoupling: A dual-encoder network structure is constructed. The first encoder extracts the HSV color space texture features of visible light images, and the second encoder extracts the backscattering intensity features of synthetic aperture radar images. Noise separation is performed through a gradient reversal layer and a domain classifier; S13. Cross-domain feature fusion is performed to generate a cross-domain feature matrix; S2. Spatiotemporal perception migration enhancement: The cross-domain feature matrix output by S1 is input into a spatiotemporal gated migration network. The ship GPS trajectory data is used to dynamically adjust the feature channel weights to strengthen the spatiotemporal consistency features related to the ship motion pattern, and an enhanced feature matrix is output; S3. Adversarial robust classification decision: A differentiable decision tree classifier is constructed based on the enhanced feature matrix of S2. The ship type probability distribution is calculated through the differentiable decision tree classifier, and the category with the highest probability is selected as the final recognition result for output. The confidence level of the final recognition result is compared with a preset threshold. If it is lower than the preset threshold, incremental learning is triggered; at the same time, virtual adversarial samples generated by adversarial training are embedded in the classification nodes to form an anti-interference ship type discrimination boundary; S4. Context-aware incremental learning: Receive the incremental learning trigger instruction of S3, generate context constraints in combination with the ship traffic density and navigation rules in the current sea area, and only allow new feature vectors that meet the constraints to trigger the expansion of the classifier topology structure.

2. The method for identifying ship types based on transfer learning according to claim 1, wherein The alignment operation on the visible light ship image and the synthetic aperture radar image includes eliminating spatial offsets through feature point matching based on the MMSI code and UTC timestamp in the ship AIS signal, and performing pixel-level alignment on the ship targets in the two-modal data; The noise feature layer is guided by the domain classifier loss function to learn domain-specific features related to environmental interference; The inherent feature layer of the ship retains cross-modal common features related to the ship type structure through reconstruction loss constraints, denotes the inherent features extracted from the input ; denotes the image reconstruction result based on this feature. In the cross-domain feature fusion, the decoupled visible light inherent features are cascaded with the synthetic aperture radar image inherent features and are dimensionally reduced and fused through the attention-guided feature mapping weight matrix to generate a cross-domain feature matrix , and its calculation formula is as follows: Among them, represents element-wise multiplication, is the Sigmoid activation function, represents the channel concatenation operation, is the Sigmoid activation function, represents the transpose of; The total loss function is expressed as: , where , .

3. The method for identifying ship types based on transfer learning according to claim 2, characterized in that The first encoder is a visible light encoder: It uses a ResNet-50 backbone network to extract HSV color space texture features; The second encoder is a SAR encoder: A polarization consistency convolutional layer is designed to extract backscattering intensity features; The domain classifier consists of a 3-layer fully connected network, which is connected to the encoder through a gradient reversal layer to identify the source modality of the features and achieve feature domain adaptation.

4. A method for identifying ship types based on transfer learning according to claim 1, characterized in that, S2 includes performing sliding window sampling on the ship's trajectory data, extracting the motion state information within each time window, constructing a motion vector sequence composed of speed, heading angle, and acceleration, and inputting the motion vector sequence into a bidirectional long short-term memory network for temporal encoding to output a low-dimensional spatiotemporal feature vector representing the current ship motion pattern.

5. The ship type recognition method based on transfer learning according to claim 4, characterized in that S2 further includes flattening the cross-domain fusion feature matrix of S1 in the spatial dimension and performing feature-level interaction with the spatio-temporal feature vector. The interaction result is input into a perceptron composed of two layers of fully connected networks to generate gating attention weights reflecting the importance of each channel. The gating attention weights dynamically adjust all channels through a normalization process, enabling the response capabilities between channels to change orderly with the motion state.

6. The ship type recognition method based on transfer learning according to claim 5, wherein, The gating attention weights act on the channel dimension of the cross-domain feature matrix of S1, enhancing the feature channels correlated with the current motion pattern through per-channel scaling, while suppressing the expression intensity of noise interference and irrelevant features, thus forming a weighted feature matrix weighted by the gating attention weights. The weighted feature matrix is input into a three-dimensional convolutional layer to jointly extract local continuity structure features in both the time and space dimensions, aggregate motion consistency features along the time-space dimension, and output an enhanced feature matrix. The enhanced feature matrix satisfies the constraint condition of the change amplitude between adjacent frames.

7. A method for identifying ship types based on transfer learning according to claim 1, characterized in that, S3 includes constructing a differentiable decision tree classifier based on an end-to-end trainable mechanism. Each classification node of the decision tree classifier performs a feature splitting operation through a continuous gating function, allowing the input feature vector to be transmitted in the form of probability among various paths. The input feature vector is the enhanced feature matrix in S2. For the gradient propagation of the overall structure, the leaf nodes correspond to a predefined set of ship classes, and a probability distribution result on the corresponding set of ship classes is output as the candidate output for the final recognition.

8. The method for identifying ship types based on transfer learning according to claim 7, wherein, During the training phase of the decision tree classifier, an adversarial sample generation mechanism is introduced. By calculating the gradient direction of the input feature vector, a perturbation sample with the maximum classification deviation risk is generated and injected into the classification structure together with the original sample for joint training. The loss function in the joint training combines the prediction loss of the original input and the stability index of the adversarial sample to strengthen the stability of the classification boundary in a high-noise environment. During the inference phase of the decision tree classifier, according to the path propagation result of the input feature vector in the classification tree, the probability distribution on each ship type is calculated, and the class corresponding to the maximum probability value is selected as the current recognition result. The reliability of the output result is determined based on a preset confidence threshold. When the confidence of the recognition result is lower than the confidence threshold, an incremental learning process is automatically triggered. During the inference phase of the decision tree classifier, a continuity constraint is imposed on the feature change rate of each classification node to limit the influence amplitude of feature perturbation on the classification output.

9. The method for identifying ship types based on transfer learning according to claim 1, wherein In step S4, access the historical database of the Automatic Identification System (AIS) for ships, extract the ship appearance in the current sea area within the time window, calculate the ship traffic density in combination with the sea area, and at the same time load the maritime rule library, and encode the navigation restriction conditions therein into a set of logical rules; by continuously receiving the data stream of the AIS for ships, continuously track the change of traffic density, and calculate the density change rate. When the density change rate exceeds the rate threshold, automatically switch to the high-density operation mode, and readjust the activation conditions of incremental learning according to the current navigation environment. Map the loaded set of navigation rules into a continuous vector form to form a rule feature vector, which is used to describe the satisfaction degree of each constraint condition. When the confidence level of the recognition result output by S3 is lower than the preset threshold, use the corresponding enhanced feature matrix as a new feature vector to be learned, and perform incremental verification on the new feature vector. After the incremental verification passes, use the new feature vector as a new category, create a prototype node for the new category, and update the features of the created prototype node. Add a new splitting path for this new category in the original differentiable decision tree classifier structure, and introduce a contrast constraint mechanism to force a sufficient feature boundary distance by measuring the feature differences between the prototypes of the new and old categories.

10. A ship type recognition system based on transfer learning, which is used to implement a ship type recognition method based on transfer learning as described in any one of claims 1-9, characterized in that, It includes the following modules: A cross-domain feature extraction module, which is used to jointly preprocess visible light images and synthetic aperture radar images, and extract the inherent features of ships through an adversarial domain decoupling network to generate a denoised cross-domain feature matrix. A spatio-temporal migration enhancement module, which is used to receive the cross-domain feature matrix and dynamically adjust the feature channel weights in combination with the ship GPS trajectory data, and output a consistency-enhanced feature matrix that strengthens the motion mode features. A classification decision module, which constructs a differentiable decision tree classifier based on the enhanced features, completes the calculation of the ship type probability, and triggers an incremental learning mechanism when the recognition confidence level is lower than the threshold. An incremental learning module, which generates context constraints according to the ship traffic density and navigation rules, and performs adaptive expansion of the classifier structure when the conditions are met.

Citation Information

Patent Citations

  • Ship classification and identification method and system based on track features and deep neural network MobileNet migration training

    CN113920481A

  • Ship radar identification method based on deep learning

    CN119780871A

Cited By

  • Ground stray current type identification method and device

    CN121302141A