Remote sensing ship heading identification method based on mamba and convolution dynamic fusion
By employing the Mamba and convolutional dynamic fusion method, the contradiction between multimodal feature fusion and angle representation in remote sensing ship orientation recognition is resolved, achieving high-precision ship orientation recognition that is adaptable to complex sea conditions and dense port scenarios.
Patent Information
- Application Number
- CN202511468705.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-15
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2045-10-15
AI Technical Summary
Existing remote sensing ship orientation recognition technologies suffer from contradictions between the static nature of multimodal feature fusion and the multi-scale characteristics of ships under complex sea conditions, as well as quantification errors in angle representation and coupling deviations in geometric deformation, resulting in insufficient positioning accuracy. This is especially true in dense port scenarios where ship alignment causes severe feature confusion.
A method based on Mamba and convolutional dynamic fusion is adopted. By constructing a feature extraction module, including an orthogonal feature fusion module of global and local branches and a progressive residual module, combined with a ring neighborhood angle encoding and decoding module, high-precision identification of ship orientation is achieved.
It improves the accuracy and robustness of ship orientation identification in remote sensing images, reduces quantization errors, meets the requirements of high-precision navigation, and adapts to complex sea conditions and dense port scenarios.
Smart Images

Figure CN120953834B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image data processing technology, and in particular to a remote sensing ship orientation recognition method based on Mamba and convolutional dynamic fusion. Background Technology
[0002] In recent years, with the rapid development of remote sensing technology, especially synthetic aperture radar (SAR), optical remote sensing and UAV remote sensing platforms, the ability to acquire high-resolution remote sensing images has been significantly enhanced, providing rich data support for the accurate detection and positioning of ship targets. Ship detection technology, by identifying ship targets in remote sensing images, is widely used in maritime safety supervision, ship traffic management, marine resource monitoring and military reconnaissance. Traditional detection methods based on artificial features face significant challenges in complex sea conditions, while the introduction of deep learning has brought new breakthroughs to this field. However, existing technologies still have bottleneck problems that need to be solved, specifically: (1) the sharp contradiction between the static nature of multimodal feature fusion and the multi-scale characteristics of ships; (2) the coupling deviation between the quantization error of angle representation and geometric deformation.
[0003] Early detection frameworks based on HOG-LBP features and SVM (Support Vector Machine) classifiers were limited by their feature representation capabilities, resulting in high false detection rates under interference from clouds, fog, and ocean clutter. Two-stage detectors, such as Faster R-CNN, improved localization accuracy through region proposal mechanisms, but single-stage detectors like YOLOv5, with their higher inference speed, became the mainstream choice for engineering deployments. Improved algorithms for rotating targets, such as R-DFPN, reduced the direction prediction error from ±30 degrees in traditional horizontal frames to ±15 degrees through rotatable anchor frame designs; however, mutual occlusion of ships in dense port scenes still leads to feature confusion. Notably, current angle representation methods generally employ discretization classification strategies (such as CSL (Circular Smooth Label)). Their 5° interval quantization error can cause confusion between bow and stern directions on ships with an aspect ratio >5:1. Experiments show that when the true heading angle is 82°, the CSL method suffers a 3.2° prediction deviation due to quantization rounding. This reveals the fundamental contradiction between existing angular representation methods in continuous angular regression and discrete classification.
[0004] Mainstream rotation detectors commonly employ backbone networks such as ResNet, but their local receptive field characteristics result in insufficient global context modeling capabilities. Experiments show that when the aspect ratio of a ship exceeds 5:1 (e.g., cargo ships), the asymmetry in the response of traditional CNNs (Convolutional Neural Networks) to bow and stern features causes systematic biases in angle prediction. Although deformable convolutions such as DCNv2 enhance geometric deformation adaptability, the learning of deformation parameters still lacks clear physical constraints when dealing with the projective distortion unique to remote sensing images. This deficiency creates a coupling effect with existing angle regression methods: when the UAV pitch angle is >25°, projective distortion compresses the ship's aspect ratio by more than 20%, causing the systematic bias (Mean Absolute Error) in angle representation based on the long-side definition method to increase from 5.1° to 9.7°. This phenomenon exposes the dual limitations of traditional CNNs in geometric deformation modeling and decoupling of orientation features. The recently emerging Mamba architecture offers a novel solution to this problem. Through a time-varying parameterized state-space model, Mamba demonstrates potential to surpass Transformers in long-sequence modeling tasks. Recent research shows that it can capture intertemporal dependencies of over 1200 frames in Landsat time-series data analysis, providing a new approach for processing large-format remote sensing imagery (e.g., 16K×16K pixels). However, directly using Mamba for pixel-level prediction suffers from insufficient semantic abstraction. Preliminary experiments on the NWPU VHR-10 dataset show that the pure Mamba architecture has an AP50 score 8.2 percentage points lower than CNNs in small object detection tasks.
[0005] Current mainstream fusion methods in remote sensing image target detection (such as the cross-attention mechanism in the ViT (Vision Transformer) + CNN dual-branch architecture) do indeed face the challenge of static fusion weights failing to adapt to drastic changes in target scale. Taking ship detection in SPOT-6 imagery as an example, when the target pixel area drops sharply from 128×128 near the shore to 16×16 in the open sea, fixed fusion coefficients prevent the local detail features of the CNN branch from achieving optimal interaction with the global context features of the Mamba branch. In particular, the global semantic cues of small targets are easily oversuppressed by traditional weighting strategies. This phenomenon is even more severe in angle estimation tasks—the direction vector of small targets requires global context support, while static fusion strategies reduce the confidence of the ship's heading direction by 37%, leading to discrete jumps in heading angle prediction.
[0006] Experiments revealed that while dynamic routing networks theoretically support data-dependent path selection, their discrete decision-making mechanism leads to gradient breakage during end-to-end training. More importantly, dynamic weight allocation easily results in the long-range modeling capability of the Mamba branch being suppressed by the locally feature-dominated CNN branch, contradicting the intended design goal of complementary advantages. This phenomenon is particularly pronounced in ship heading detection tasks, as accurate estimation of the ship's heading angle highly depends on accurate modeling of global spatial relationships. Based on these findings, a progressive residual fusion architecture is proposed as an innovative solution. This is especially significant in ship heading detection tasks because accurate estimation of the ship's heading angle highly depends on accurate modeling of global spatial relationships. Existing methods have conflicting optimization objectives between the angle regression head and the feature extraction network: the L1 loss of position regression suppresses the periodic continuity constraint of the angle branch, causing directional confusion in the heading angle gradient during training. This contradiction creates a vicious cycle in angle regression tasks: the locally feature-dominated CNN branch distorts the semantic continuity of the ship's long axis direction, while Mamba's global state space model cannot correct directional deviations due to weight suppression (highlighting the gradient coordination advantage of progressive fusion).
[0007] Definitions:
[0008] The Visual Mamba model, a novel sequence model proposed in 2024, is based on the Structured State-Space Model (SSM) and optimizes the processing efficiency of long sequences. It dynamically filters irrelevant information based on the input, reducing computational redundancy. Its computational complexity increases linearly with sequence length (O(N)), significantly outperforming the Transformer's O(N²). The Visual Mamba model mainly consists of a normalization layer and a two-dimensional cross-scanning block (SS2D). After performing layer normalization on the input features, SS2D adjusts the state transition weights based on the current input to capture long-range dependencies and achieves adaptive fusion of local and global information through a selective mechanism.
[0009] The Mamba described in this invention is based on the Mamba structure proposed by VMamba, with only slight differences in the post-processing stage.
[0010] BCE With Logits Loss is a loss function used for binary classification problems. It combines the sigmoid function with the binary cross-entropy loss. Internally, BCE With Logits Loss automatically applies the sigmoid function to convert logits into predicted probabilities before calculating the binary cross-entropy loss. Logits refer to the raw output values of the last layer of the model (usually a fully connected layer), before normalization.
[0011] Varifocal Loss is a loss function specifically designed for dense object detection. It addresses the issues of extreme imbalance between positive and negative samples (where the background far outweighs the target) and inconsistency between classification confidence and localization quality in dense object detection. This loss function enables the model to focus more on high-quality positive samples, improving detection accuracy. It is particularly suitable for small targets, dense targets, and occluded scenes. Summary of the Invention
[0012] The purpose of this invention is to provide a remote sensing ship orientation recognition method based on Mamba and dynamic convolutional fusion, which solves the problems of the traditional convolutional neural network's lack of global feature extraction capability, poor global and local feature fusion capability, and angle representation method.
[0013] To achieve the above objectives, the technical solution adopted by this invention is as follows: a remote sensing ship orientation recognition method based on Mamba and convolutional dynamic fusion, comprising the following steps:
[0014] S1, obtain dataset D1 for ship orientation recognition, where the samples are remote sensing images of ships and the ship's heading angle is labeled, and the sample size is 3×H×W, where 3, H, and W are the number of color channels, height, and width of the sample, respectively;
[0015] S2, construct a feature extraction module, including a downsampling module, a global branch, a local branch, an orthogonal feature fusion module, and a progressive residual module;
[0016] The downsampling module is used to construct a feature tensor FT of shape B×3×H×W for a batch of samples. in Downsampling, output shape is B×C in ×H in ×W in Downsampled features FT1, B, C in H in W in FT in Batch size, number of output channels, height and width, H in =H / 2、W in =W / 2;
[0017] The global branch and local branch extract features from FT1 using the visual Mamba model and convolutional model, respectively, to obtain the corresponding global branch features X. Mamba and local branch features X Conv ;
[0018] The orthogonal feature fusion module includes a first branch and a second branch, wherein the first branch is used for X Mamba Channel alignment yields global alignment feature f Mamba Then for fMamba Power-wise enhancement and pooling operations are performed to obtain a global vector g. g is then L2 normalized and reshaped into a four-dimensional tensor, which is then broadcast and expanded to B×C. mid ×H in ×W in The broadcast feature g is obtained. expand C mid The intermediate channel number dimension; the second branch uses X. Conv Channel alignment yields local alignment features f Conv Then, orthogonal decomposition yields the orthogonal residual f. orth Then g expand and f orth By performing channel dimension splicing and dimensionality reduction, a shape of B×C is obtained. mid ×H in ×W in fusion feature f mix ;
[0019] The progressive residual module is used to extract from FT in X Mamba X Conv Choose 1 to 3 features from the list and compare them with f. mix Together they form set G in G in There are S features in total, for G in The s-th feature f s First, feature alignment is performed, and residual features f are generated according to the following formula. out1 The shape is then adjusted to a progressive residual feature f of B×(C+F). out ;
[0020] ,
[0021] In the formula, f s Features after feature alignment, α s for The weights are 1≤s≤S, where C is the coarse-grained coding length and F is the fine-grained coding length.
[0022] S3, constructs a ring-shaped neighborhood angle encoding module for FT. in For each sample, the ship's heading angle is used to generate a fusion code of length C+F, which is then stacked into a B×(C+F) encoding tensor, where the ship's heading angle θ of the b-th sample is generated. b The fusion encoding includes steps S31 to S32;
[0023] S31, divide the angle range [0°, 360°) into C large intervals, and each large interval is further divided into F small intervals. The index of the large interval is i, 1≤i≤C, and the index of the small interval is j, 1≤j≤F;
[0024] S32, Analyze θ b The index k of the large interval c and the interval index k f Circular neighborhood smoothing encoding is performed on both large and small intervals to obtain a coarse-grained code of length C, Coarse. En and fine-grained encoding of length F En Then concatenate them into a fusion code of length C+F (Mix). En Coarse En We obtain the following formula:
[0025] , ;
[0026] In the formula, Softmax(∙) is the Softmax function, and C s [i] is the encoded value of the large interval i, α c r is the attenuation coefficient over a large area. c Let dist(k) be the radius of the large interval neighborhood. c i) is k c The annular distance between i and i, dist(k) c ,i)=min(|k c -i|,C-|k c -i|), min(∙) is the minimum value operation;
[0027] S4, construct a ring-shaped neighborhood angle decoding module to obtain the progressive residual feature f. out Output FT in Predicted ship heading angle set , For FT in The predicted heading angle of the ship in the b-th sample;
[0028] S5, constructs a ship orientation detection network, including a feature extraction module, a ring neighborhood angle encoding module, and a ring neighborhood angle decoding module;
[0029] S6. Train the ship orientation detection network using D1 until it converges to obtain the ship orientation detection model.
[0030] S7 acquires a batch of remote sensing images to be identified to form a feature tensor. After passing through the feature extraction module and the ring neighborhood angle decoding module, it outputs the corresponding set of predicted ship head orientation angles.
[0031] Preferably, D1 is obtained by filtering from the remote sensing dataset DOTA.
[0032] Preferably, the local branch includes a depthwise separable convolutional layer, a channel mixing layer, and a residual reconstruction layer connected in sequence, wherein the depthwise separable convolutional layer, the channel mixing layer, and the residual reconstruction layer generate convolutional features FT according to the following formula. DW Channel mixing features FT CM Local branching feature X Conv ;
[0033] ,
[0034] ,
[0035] ,
[0036] In the formula, Conv 3×3,depthwise (∙) represents a 3×3 depthwise separable convolution, BN(∙) represents batch normalization, and Conv 1×1 (∙) is a 1×1 convolution, GELU(∙) is the GELU activation function, and Dropout(∙) is a random dropout operation.
[0037] Preferably, the orthogonal feature fusion module includes a first branch and a second branch;
[0038] The first branch includes a first channel alignment layer, a global vector generation layer, a unit vector normalization layer, a dimension reshaping layer, and a broadcast extension layer;
[0039] The first channel alignment layer is used to align X Mamba Channels are aligned to a preset dimension to obtain the global alignment feature f. Mamba ;
[0040] The global vector generation layer is used to perform power-strengthened and pooling operations according to the following formula to obtain the global vector g;
[0041] ,
[0042] In the formula, p is the user input parameter, p=1,3 or p≥20, and AdaptiveAvgPool2d(∙) is the AdaptiveAvgPool2d function;
[0043] The unit vector normalization layer obtains g according to the following formula L2 normalization. norm ;
[0044] ,
[0045] In the formula, It is the L2 norm. The value is the square of the feature value of the c-th channel of the b-th sample in a batch of samples, where 1 ≤ b ≤ B and 1 ≤ c ≤ C. mid gnorm The shape is B×C mid ;
[0046] The dimension reshaping layer is used to reshape g norm Dimensional reshaping into B×C mid The four-dimensional tensor g of ×1×1 reshaped ;
[0047] The broadcast extension layer is used to transmit g reshaped Broadcast extended to B×C mid ×H in ×W in broadcast characteristics g expand ;
[0048] The second branch includes a second channel alignment layer, an orthogonal projection decomposition layer, a feature stitching layer, and a convolutional dimensionality reduction layer;
[0049] The second channel alignment layer is used to align X Conv Channels are aligned to a preset dimension to obtain local alignment features f. Conv ;
[0050] The orthogonal projection decomposition layer is orthogonally decomposed according to the following formula, resulting in a shape of B×C. mid ×H in ×W in and the orthogonal residual f orth ;
[0051] ,
[0052] In the formula, ⊙ represents the element-wise dot product;
[0053] The feature splicing layer is used to combine g expand and f orth By concatenating along the channel dimension, we obtain B×2C. mid ×H in ×W in splicing characteristics;
[0054] The convolutional dimensionality reduction layer is used to perform 1×1 convolutional dimensionality reduction on the spliced features, resulting in B×C. mid ×H in ×W in fusion feature f mix This serves as the output of the orthogonal feature fusion module.
[0055] Preferably, the progressive residual module includes a feature alignment transformation layer, a weight normalization layer, a progressive residual fusion layer, and a shape adjustment layer;
[0056] The feature alignment transform layer is used to transform from FT in X Mamba X ConvChoose 1 to 3 features from the list and compare them with f. mix Together they form set G in And according to the following formula for G in The s-th feature f s Perform feature alignment to obtain f s Aligned features ;
[0057] ,
[0058] In the formula, SiLU(∙) is the SiLU function, BN(∙) is batch normalization, and Conv 1×1 (∙) represents a 1×1 convolution;
[0059] The weight normalization layer is used to determine the weights based on α = Softmax(α). raw Update the weight vector α raw The updated weight vector α is obtained, where the s-th element of α is α. s α raw initial value ;
[0060] The progressive residual fusion layer generates f according to the following formula. out1 ;
[0061] ,
[0062] The shape adjustment layer is used to perform a convolution operation on f. out1 The shape is adjusted to B×(C+F) to obtain f. out .
[0063] Preferably, the decoding method of the annular neighborhood angle decoding module is as follows:
[0064] S41, Obtain FT in The corresponding asymptotic residual characteristic f out Feature separation is performed, and the features in the first C columns are used as the coarse-grained component P. coarse The fine-grained component P in column F. fine ;
[0065] S42, Output the first prediction set based on the self-attention decoding strategy. , For FT in The first predicted angle of the b-th sample;
[0066] S43, Constrained to between 0° and 360°, the Fourier Transform (FT) is obtained. in Predicted ship heading angle for the b-th sample , constitutes FT in Predicted ship heading angle set .
[0067] Preferably, the self-attention decoding strategy is a discrete index positioning method or a probability weighted average method;
[0068] The discrete index positioning method is as follows: generate a predicted large interval index according to the following formula. Predicting small interval indexes and the first prediction set ;
[0069] ,
[0070] ,
[0071] In the formula, argmax(∙) is the argmax function. The angle value corresponding to the large interval. The angle value corresponding to the interval;
[0072] The probability-weighted averaging method generates a coarse-grained probability distribution p according to the following formula. c Fine-grained probability distribution p f and the first prediction set ;
[0073] ,
[0074] ,
[0075] In the formula, p c [i] is p c The i-th element in the array corresponds to the predicted probability of the large interval i, p. f [j] is p f The j-th element in the interval represents the predicted probability of interval j.
[0076] As a preferred option, if the self-attention decoding strategy is a discrete index localization method, then one round of training in S6 includes Sa1~Sa3;
[0077] Sa1, obtains a batch of samples from D1 to form the feature tensor FT. in The actual ship bow orientation angles of this batch of samples constitute the angle set θ. ture ;
[0078] Sa2, FT in The progressive residual features f are obtained through the feature extraction module. out , θ ture The coded tensor is generated by the annular neighborhood angle coding module, and f is calculated. outThe loss 1 between the encoding tensor and the loss 1 is calculated using BCE With LogitsLoss;
[0079] Sa3 adjusts the parameters of the ship orientation detection network to minimize loss1.
[0080] As a preferred option, if the self-attention decoding strategy is a probability-weighted average method, then one round of training in S6 includes Sb1~Sb4;
[0081] Sb1, obtains a batch of samples from D1 to form the feature tensor FT. in The actual ship bow orientation angles of this batch of samples constitute the angle set θ. ture ;
[0082] Sb2, FT in The progressive residual features f are obtained through the feature extraction module. out and θ ture The coded tensor is generated by the annular neighborhood angle coding module, and f is calculated. out The loss between the encoding tensor and loss1;
[0083] Sb3, f out The set of predicted ship heading angles is output by the annular neighborhood angle decoding module. ,calculate With θ ture The loss2 is derived using Varifocal Loss;
[0084] Sb4, calculate the total loss L total =loss1+loss2, and minimize L total Adjust the parameters of the ship orientation detection network.
[0085] Regarding the feature extraction module:
[0086] (1) In the global branch, the visual Mamba model is used to extract the global features of the image. First, the channels of the input features are normalized, and then the normalized output is passed to the SS2D module. The SS2D module adjusts the state transition weights according to the current input to capture long-range dependencies and achieves local-global information adaptive fusion through a selective mechanism.
[0087] (2) Extract local features of the image using a convolution model in the local branches, where Conv 3×3,depthwise (∙) Used for extracting spatial features such as ship edges, and the number of parameters for a 3×3 depthwise separable convolution can be reduced to 1 / C of that of a standard 3×3 convolution. in BN(∙) is used for stable feature distributions; Conv 1×1(∙) Uses 1×1 convolution to fuse cross-channel information, Dropout(∙) is used to randomly drop out to prevent overfitting, and the remaining part of Dropout(∙) is connected to the FT1 residual to preserve the original features and prevent gradient vanishing.
[0088] (3) In the orthogonal feature fusion module, feature fusion is performed on the outputs of the global branch and the local branch. The global features of the global branch are used as the basis vectors of the orthogonal space, and then the global features of the local branch are orthogonally projected. This step is achieved through the formula... To achieve this, the formula uses element-wise dot products to compute f. Conv The similarity between each spatial location and the global semantics is calculated, and then summed along the channel dimension to obtain scalar projection coefficients, which are then compared with g. expan Multiply; then according to the formula Calculate the orthogonal residual f orth f orth In the channel dimension, compared with g expand Orthogonal, that is This allows us to remove semantically redundant components in local branches and enhance fine-grained features that are unrelated to the global semantics. Then, g... expand and f orth The fused feature f is obtained by concatenating and reducing the channel dimensions. mix .
[0089] (4) The input to the progressive residual module is set G. in It can be constructed according to actual needs, but should at least include f mix During feature alignment, standardization is performed along the channel dimension to stabilize training, followed by Sigmoid linear activation to enhance nonlinearity. Then, weight normalization is used to learn the weights of each feature for fusion. Finally, the features are fused in progressive residual fusion and the Fourier Transform (FT) is shorted. in This phased weighted accumulation can avoid information overload from a one-time fusion and support gradient segmented propagation.
[0090] Regarding the annular neighborhood angle encoding module, this invention can perform coarse-grained (large interval) and fine-grained (small interval) division and encoding of circumferential angles. If the number of large intervals C=12, then each 30° interval is a large interval. This process can discretize continuous angles into coarse-grained intervals to capture macroscopic angle distribution. If the number of small intervals F=5, then 30° is further refined into 5 small intervals, each 6° interval. This is to further discretize the residual angles and capture microscopic angle transformations.
[0091] Constructing a ring-shaped neighborhood angle decoding module: Two methods are proposed in the self-attention decoding strategy to meet the needs of tasks with high real-time requirements and tasks with high accuracy requirements, respectively.
[0092] Compared with the prior art, the advantages of the present invention are as follows:
[0093] (1) In view of the problem that ships in remote sensing image ship orientation recognition scenarios have typical characteristics such as dense arrangement and arbitrary direction, making it impossible to achieve accurate positioning and orientation recognition, the present invention constructs a brand-new feature extraction module.
[0094] First, addressing the issue that the visual Mamba model excels at long sequence modeling but lacks the local inductive bias of convolution, leading to blurred edge texture responses to small targets in remote sensing images or insufficient extraction of features sensitive to the rotational orientation of targets (such as bow / stern asymmetry), an orthogonal feature fusion module is designed to fuse the outputs of global and local branches. This module uses the global features of the global branch as orthogonal spatial basis vectors and orthogonally projects the local features of the local branch to generate detailed feature components orthogonal to the global semantics. Image visualization results show that the output f of the orthogonal feature fusion module... mix It has a more focused response in the hull outline and overall structure, enabling it to capture the ship's position information more accurately.
[0095] Secondly, addressing the issues that traditional residual connections simply add input features to a single-layer output, failing to achieve multi-stage feature complementarity (such as the lack of cross-level interaction between shallow textures and deep semantics), and causing interference between high-frequency and low-frequency signals through direct addition, a progressive residual module was designed to further improve f... mix The fusion process involves progressively introducing compensation information from local or global branches to refine the fusion features, resulting in a final output of progressive residual features f. out Further improvements in detail representation and robustness provide more discriminative and stable feature representations for downstream orientation regression and detection tasks.
[0096] (2) A new method for encoding and decoding the heading angle of a ship is proposed.
[0097] In the encoding method: First, a ring-shaped neighborhood attention mechanism is introduced: coarse-grained encoding of large intervals is used. En For example, it was proposed The concept, in which The circular distance is used as the exponent of the attenuation factor α to model the periodicity of the angle and the correlation of the neighborhood. Second, multi-granularity joint coding is introduced: This invention captures the macroscopic distribution of the heading and the microscopic offset through coarse-fine dual-path coding, improving the feature representation capability by 23%. Third, a probability normalization noise reduction design is introduced to transform the coding result into a probability distribution, with the measured angle estimation error ≤1.5°, meeting the requirements of high-precision navigation.
[0098] Regarding the self-attention decoding strategy, two implementation methods are proposed: a discrete index localization method and a probability-weighted averaging method. The ring neighborhood angle decoding module using the discrete index localization method does not require network training; it directly finds the ring neighborhood angle using the argmax function. , And fused together This direct mapping method is computationally efficient and suitable for tasks with high real-time requirements, with a maximum error of [missing value]. The ring neighborhood angle decoding module using the probability-weighted averaging method needs to participate in training, but the quantization error can be reduced to [missing information]. It is suitable for tasks that require high precision.
[0099] In summary, the features extracted by this invention are further improved in terms of detail representation and robustness, providing more discriminative and stable feature representations for downstream orientation regression and detection tasks, enabling high-precision reconstruction of the ship's bow orientation angle and reducing quantization errors. Attached Figure Description
[0100] Figure 1 This is a diagram showing the overall structure of the ship orientation detection network.
[0101] Figure 2 This is a schematic diagram of a local branch structure;
[0102] Figure 3 This is a structural diagram of the orthogonal feature fusion module;
[0103] Figure 4 This is a structural diagram of the progressive residual module;
[0104] Figure 5 Flowchart of the ring-shaped neighborhood angle encoding module;
[0105] Figure 6 Here is the decoding flowchart for the ring-shaped neighborhood angle decoding module;
[0106] Figure 7 This is a diagram showing the detection results of a remote sensing image using the present invention.
[0107] Figure 8 This is a diagram showing the detection results of another remote sensing image using the present invention.
[0108] Figure 9 This is a comparison image of features extracted from remote sensing images through the global branch, local branch, orthogonal feature fusion module, and progressive residual module. Detailed Implementation
[0109] The present invention will be further described below with reference to the embodiments and accompanying drawings.
[0110] Example 1: See Figures 1 to 6A remote sensing ship orientation recognition method based on Mamba and convolutional dynamic fusion includes the following steps:
[0111] S1, obtain dataset D1 for ship orientation recognition, where the samples are remote sensing images of ships and the ship's heading angle is labeled, and the sample size is 3×H×W, where 3, H, and W are the number of color channels, height, and width of the sample, respectively;
[0112] S2, construct a feature extraction module, including a downsampling module, a global branch, a local branch, an orthogonal feature fusion module, and a progressive residual module;
[0113] The downsampling module is used to construct a feature tensor FT of shape B×3×H×W for a batch of samples. in Downsampling, output shape is B×C in ×H in ×W in Downsampled features FT1, B, C in H in W in FT in Batch size, number of output channels, height and width, H in =H / 2、W in =W / 2;
[0114] The global branch and local branch extract features from FT1 using the visual Mamba model and convolutional model, respectively, to obtain the corresponding global branch features X. Mamba and local branch features X Conv ;
[0115] The orthogonal feature fusion module includes a first branch and a second branch, wherein the first branch is used for X Mamba Channel alignment yields global alignment feature f Mamba Then for f Mamba Power-wise enhancement and pooling operations are performed to obtain a global vector g. g is then L2 normalized and reshaped into a four-dimensional tensor, which is then broadcast and expanded to B×C. mid ×H in ×W in The broadcast feature g is obtained. expand C mid The intermediate channel number dimension; the second branch uses X. Conv Channel alignment yields local alignment features f Conv Then, orthogonal decomposition yields the orthogonal residual f. orth Then g expand and f orth By performing channel dimension splicing and dimensionality reduction, a shape of B×C is obtained. mid ×H in ×W infusion feature f mix ;
[0116] The progressive residual module is used to extract from FT in X Mamba X Conv Choose 1 to 3 features from the list and compare them with f. mix Together they form set G in G in There are S features in total, for G in The s-th feature f s First, feature alignment is performed, and residual features f are generated according to the following formula. out1 The shape is then adjusted to a progressive residual feature f of B×(C+F). out ;
[0117] ,
[0118] In the formula, f s Features after feature alignment, α s for The weights are 1≤s≤S, where C is the coarse-grained coding length and F is the fine-grained coding length.
[0119] S3, constructs a ring-shaped neighborhood angle encoding module for FT. in For each sample, the ship's heading angle is used to generate a fusion code of length C+F, which is then stacked into a B×(C+F) encoding tensor, where the ship's heading angle θ of the b-th sample is generated. b The fusion encoding includes steps S31 to S32;
[0120] S31, divide the angle range [0°, 360°) into C large intervals, and each large interval is further divided into F small intervals. The index of the large interval is i, 1≤i≤C, and the index of the small interval is j, 1≤j≤F;
[0121] S32, Analyze θ b The index k of the large interval c and the interval index k f Circular neighborhood smoothing encoding is performed on both large and small intervals to obtain a coarse-grained code of length C, Coarse. En and fine-grained encoding of length F En Then concatenate them into a fusion code of length C+F (Mix). En Coarse En We obtain the following formula:
[0122] , ;
[0123] In the formula, Softmax(∙) is the Softmax function, and C s [i] is the encoded value of the large interval i, α c r is the attenuation coefficient over a large area. c Let dist(k) be the radius of the large interval neighborhood. c i) is k c The annular distance between i and i, dist(k) c ,i)=min(|k c -i|,C-|k c -i|), min(∙) is the minimum value operation;
[0124] S4, construct a ring-shaped neighborhood angle decoding module to obtain the progressive residual feature f. out Output FT in Predicted ship heading angle set , For FT in The predicted heading angle of the ship in the b-th sample;
[0125] S5, constructs a ship orientation detection network, including a feature extraction module, a ring neighborhood angle encoding module, and a ring neighborhood angle decoding module;
[0126] S6. Train the ship orientation detection network using D1 until it converges to obtain the ship orientation detection model.
[0127] S7 acquires a batch of remote sensing images to be identified to form a feature tensor. After passing through the feature extraction module and the ring neighborhood angle decoding module, it outputs the corresponding set of predicted ship head orientation angles.
[0128] In this embodiment, D1 is obtained by filtering from the remote sensing dataset DOTA.
[0129] The local branch includes a depthwise separable convolutional layer, a channel mixing layer, and a residual reconstruction layer connected in sequence. The depthwise separable convolutional layer, the channel mixing layer, and the residual reconstruction layer generate convolutional features (FT) according to the following formula. DW Channel mixing features FT CM Local branching feature X Conv : , , In the formula, Conv 3×3,depthwise (∙) represents a 3×3 depthwise separable convolution, BN(∙) represents batch normalization, and Conv 1×1 (∙) is a 1×1 convolution, GELU(∙) is the GELU activation function, and Dropout(∙) is a random dropout operation.
[0130] The orthogonal feature fusion module includes a first branch and a second branch;
[0131] The first branch includes a first channel alignment layer, a global vector generation layer, a unit vector normalization layer, a dimension reshaping layer, and a broadcast extension layer;
[0132] The first channel alignment layer is used to align X Mamba Channels are aligned to a preset dimension to obtain the global alignment feature f. Mamba ;
[0133] The global vector generation layer is used to generate vectors according to the formula. Perform power-enhancing and pooling operations to obtain a global vector g, where p is the user input parameter, p=1,3 or p≥20, and AdaptiveAvgPool2d(∙) is the AdaptiveAvgPool2d function;
[0134] The unit vector normalization layer is based on the formula L2 normalization yields g norm In the formula, It is the L2 norm. The value is the square of the feature value of the c-th channel of the b-th sample in a batch of samples, where 1 ≤ b ≤ B and 1 ≤ c ≤ C. mid g norm The shape is B×C mid ;
[0135] The dimension reshaping layer is used to reshape g norm Dimensional reshaping into B×C mid The four-dimensional tensor g of ×1×1 reshaped ;
[0136] The broadcast extension layer is used to transmit g reshaped Broadcast extended to B×C mid ×H in ×W in broadcast characteristics g expand ;
[0137] The second branch includes a second channel alignment layer, an orthogonal projection decomposition layer, a feature stitching layer, and a convolutional dimensionality reduction layer;
[0138] The second channel alignment layer is used to align X Conv Channels are aligned to a preset dimension to obtain local alignment features f. Conv ;
[0139] The orthogonal projection decomposition layer is based on Orthogonal decomposition yields a shape of B×C. mid ×H in ×W in and the orthogonal residual f orth , ⊙ represents the element-wise dot product;
[0140] The feature splicing layer is used to combine g expand and f orth By concatenating along the channel dimension, we obtain B×2C. mid ×H in ×W in splicing characteristics;
[0141] The convolutional dimensionality reduction layer is used to perform 1×1 convolutional dimensionality reduction on the spliced features, resulting in B×C. mid ×H in ×W in fusion feature f mix This serves as the output of the orthogonal feature fusion module.
[0142] The progressive residual module includes a feature alignment transformation layer, a weight normalization layer, a progressive residual fusion layer, and a shape adjustment layer;
[0143] The feature alignment transform layer is used to transform from FT in X Mamba X Conv Choose 1 to 3 features from the list and compare them with f. mix Together they form set G in And according to the following formula for G in The s-th feature f s Perform feature alignment to obtain f s Aligned features ;
[0144] ,
[0145] In the formula, SiLU(∙) is the SiLU function, BN(∙) is batch normalization, and Conv 1×1 (∙) represents a 1×1 convolution;
[0146] The weight normalization layer is used to determine the weights based on α = Softmax(α). raw Update the weight vector α raw The updated weight vector α is obtained, where the s-th element of α is α. s α raw initial value ;
[0147] The progressive residual fusion layer generates f according to the following formula. out1 ;
[0148] ,
[0149] The shape adjustment layer is used to perform a convolution operation on f. out1 The shape is adjusted to B×(C+F) to obtain f. out .
[0150] The decoding method of the ring-shaped neighborhood angle decoding module is as follows:
[0151] S41, Obtain FT in The corresponding asymptotic residual characteristic f out Feature separation is performed, and the features in the first C columns are used as the coarse-grained component P. coarse The fine-grained component P in column F. fine ;
[0152] S42, Output the first prediction set based on the self-attention decoding strategy. , For FT in The first predicted angle of the b-th sample;
[0153] S43, Constrained to between 0° and 360°, the Fourier Transform (FT) is obtained. in Predicted ship heading angle for the b-th sample , constitutes FT in Predicted ship heading angle set Constrained to the range of 0° to 360° Figure 6 This is referred to as a ring constraint.
[0154] The self-attention decoding strategy is either a discrete index positioning method or a probability-weighted average method.
[0155] The discrete index positioning method is as follows: generate a predicted large interval index according to the following formula. Predicting small interval indexes and the first prediction set ;
[0156] ,
[0157] ,
[0158] In the formula, argmax(∙) is the argmax function. The angle value corresponding to the large interval. The angle value corresponding to the interval;
[0159] The probability-weighted averaging method generates a coarse-grained probability distribution p according to the following formula. c Fine-grained probability distribution p f and the first prediction set ;
[0160] ,
[0161] ,
[0162] In the formula, p c[i] is p c The i-th element in the array corresponds to the predicted probability of the large interval i, p. f [j] is p f The j-th element in the interval represents the predicted probability of interval j.
[0163] If the self-attention decoding strategy is a discrete index localization method, then one round of training in S6 includes Sa1~Sa3;
[0164] Sa1, obtains a batch of samples from D1 to form the feature tensor FT. in The actual ship bow orientation angles of this batch of samples constitute the angle set θ. ture ;
[0165] Sa2, FT in The progressive residual features f are obtained through the feature extraction module. out , θ ture The coded tensor is generated by the annular neighborhood angle coding module, and f is calculated. out The loss 1 between the encoding tensor and the loss 1 is calculated using BCE With LogitsLoss;
[0166] Sa3 adjusts the parameters of the ship orientation detection network to minimize loss1.
[0167] If the self-attention decoding strategy is a probability-weighted average method, then one round of training in S6 includes Sb1~Sb4;
[0168] Sb1, obtains a batch of samples from D1 to form the feature tensor FT. in The actual ship bow orientation angles of this batch of samples constitute the angle set θ. ture ;
[0169] Sb2, FT in The progressive residual features f are obtained through the feature extraction module. out and θ ture The coded tensor is generated by the annular neighborhood angle coding module, and f is calculated. out The loss between the encoding tensor and loss1;
[0170] Sb3, f out The set of predicted ship heading angles is output by the annular neighborhood angle decoding module. ,calculate With θ ture The loss2 is derived using Varifocal Loss;
[0171] Sb4, calculate the total loss L total =loss1+loss2, and minimize L totalAdjust the parameters of the ship orientation detection network.
[0172] Based on the above structure and method, the output of the progressive residual module can be connected to various detection heads in the prior art to realize functions such as ship identification and positioning. Combined with the method of this invention, it can also detect the ship's bow orientation angle and output the predicted ship's bow orientation angle.
[0173] Example 2: See Figures 1-6 Based on Example 1, we provide a more specific implementation method as follows:
[0174] S1, same as step S1 in Example 1.
[0175] S2, in the orthogonal feature fusion module, p is the user input parameter;
[0176] P=1, average standard pooling is used to suppress noise and preserve overall semantics; P=3, approximate max pooling is used to enhance key features such as object edges; P≥20, approximate max pooling is used for salient region localization in extreme scenarios; the rest is the same as step S2 in Example 1.
[0177] S3, construct a ring-shaped neighborhood angle encoding module, which generates the ship's heading angle θ of the b-th sample. b The fusion encoding includes steps S31 to S32;
[0178] S31, divide the angle range [0°, 360°) into C=12 large intervals, each large interval corresponds to 30°, the index of the large interval is i, 1≤i≤12, divide each large interval into F=30 small intervals, each small interval corresponds to 1°, the index of the small interval is j, 1≤j≤30;
[0179] S32, Read θ b Assuming the angle is 350°, set the radius of the large interval neighborhood r. c =1, Inter-regional attenuation coefficient α c =0.5, neighborhood radius r of the smaller interval f =2, Inter-valence attenuation coefficient α f =0.8;
[0180] Coarse is generated according to the following formula. En :
[0181] ,
[0182] ,
[0183] ,
[0184] Fine is generated according to the following formula. En :
[0185] ,
[0186] ,
[0187] ,
[0188] Among them, C f [j] is the encoded value of interval j, dist(k) f ,j) is k f The annular distance between j;
[0189] After the above encoding is concatenated, we get:
[0190] Coarse En : [0.2500, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.2500, 0.5000], with a length of 12;
[0191] Fine En : [0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.1649, 0.2062, 0.2577, 0.2062, 0.1649, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000], with a length of 30.
[0192] Mix En: [0.2500, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.2500, 0.5000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.1649, 0.2062, 0.2577, 0.2062, 0.1649, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000.
[0193] Steps S4 to S6 are the same as steps S4 to S6 in Example 1.
[0194] Example 3: See Figures 1-6 Based on Example 1, we designed the following experiment:
[0195] Dataset: Dataset D1 is formed by extracting remote sensing images of ships only from the DOTA dataset and is divided into training and test sets. The training set contains 6300 images and the test set contains 1940 images. Each remote sensing image is a 600×600 color image.
[0196] Experimental environment: The hardware environment is NVIDIA RTX 3090 GPU, and the software environment is PyTorch 2.3.0.
[0197] Experimental Groups: The experimental group used the ship orientation detection model of this invention, with the discrete index positioning method employed as the self-attention decoding strategy in the annular neighborhood angle decoding module. The control group used the traditional R3Det detection model. Since the R3Det detection model does not perform orientation detection, this experiment converted the angle of the rotating frame in the R3Det detection model's detection results into the ship's bow orientation angle. The performance indicators of the two experimental groups were compared, as shown in Table 1 below:
[0198] Table 1. Comparison of Performance Indicators of Different Models
[0199] Model Accuracy (%) Orientation accuracy (%) This invention model 92.1 96.2 R3Det detection model 80.4 87.0
[0200] Example 4: See Figures 7-9 Based on Example 3, the model of the present invention obtained in Example 3 is used to identify and detect two remote sensing images in dataset D1, and the output results are as follows. Figure 7 and Figure 8As shown in the two figures, the left side (a) is the original remote sensing image, and the right side (b) is the detection result output by this invention. As can be seen from the right side, the red box is the positioning box of the ship, and the arrow indicates the orientation of the ship.
[0201] In addition, we select a remote sensing image from D1 and input it into the ship orientation detection model of this invention. The global feature X is obtained through global branching, local branching, orthogonal feature fusion module and progressive residual module, respectively. Mamba Local feature X Conv Fusion features f mix and asymptotic residual characteristics f out as follows Figure 9 As shown, Figure 9 The symbols (a) to (e) correspond to remote sensing image, global feature, local feature, fused feature and progressive residual feature, respectively.
[0202] from Figure 9 It can be seen that, compared to the simple global feature X, Mamba or local feature X Conv The fusion feature f obtained by orthogonal fusion mix It exhibits a more concentrated response in both the hull profile and overall structure, enabling more accurate capture of the ship's positional information. Furthermore, by progressively introducing compensation information from local or global branches through asymptotic residual connections, the fused features are continuously refined, resulting in a final output of asymptotic residual feature f. out Further improvements in detail representation and robustness provide more discriminative and stable feature representations for downstream orientation regression and detection tasks.
[0203] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A remote sensing ship orientation recognition method based on Mamba and convolutional dynamic fusion, characterized in that, Includes the following steps: S1, obtain dataset D1 for ship orientation recognition, where the samples are remote sensing images of ships and the ship's heading angle is labeled, and the sample size is 3×H×W, where 3, H, and W are the number of color channels, height, and width of the sample, respectively; S2, construct a feature extraction module, including a downsampling module, a global branch, a local branch, an orthogonal feature fusion module, and a progressive residual module; The downsampling module is used to construct a feature tensor FT of shape B×3×H×W for a batch of samples. in Downsampling, output shape is B×C in ×H in ×W in Downsampled features FT1, B, C in H in W in FT in Batch size, number of output channels, height and width, H in =H / 2、W in =W / 2; The global branch and local branch extract features from FT1 using the visual Mamba model and convolutional model, respectively, to obtain the corresponding global branch features X. Mamba and local branch features X Conv ; The orthogonal feature fusion module includes a first branch and a second branch, wherein the first branch is used for X Mamba Channel alignment yields global alignment feature f Mamba Then for f Mamba Power-wise enhancement and pooling operations are performed to obtain a global vector g. g is then L2 normalized and reshaped into a four-dimensional tensor, which is then broadcast and expanded to B×C. mid ×H in ×W in The broadcast feature g is obtained. expand C mid The intermediate channel number dimension; the second branch uses X. Conv Channel alignment yields local alignment features f Conv Then, orthogonal decomposition yields the orthogonal residual f. orth Then g expand and f orth By performing channel dimension splicing and dimensionality reduction, a shape of B×C is obtained. mid ×H in ×W in fusion feature f mix ; The progressive residual module is used to extract from FT in X Mamba X Conv Choose 1 to 3 features from the list and compare them with f. mix Together they form set G in G in There are S features in total, for G in The s-th feature f s First, feature alignment is performed, and residual features f are generated according to the following formula. out1 The shape is then adjusted to a progressive residual feature f of B×(C+F). out ; , In the formula, f s Features after feature alignment, α s for The weights are 1≤s≤S, where C is the coarse-grained coding length and F is the fine-grained coding length. S3, constructs a ring-shaped neighborhood angle encoding module for FT. in For each sample, the ship's heading angle is used to generate a fusion code of length C+F, which is then stacked into a B×(C+F) encoding tensor, where the ship's heading angle θ of the b-th sample is generated. b The fusion encoding includes steps S31 to S32; S31, divide the angle range [0°, 360°) into C large intervals, and each large interval is further divided into F small intervals. The index of the large interval is i, 1≤i≤C, and the index of the small interval is j, 1≤j≤F; S32, Analyze θ b The index k of the large interval c and the interval index k f Circular neighborhood smoothing encoding is performed on both large and small intervals to obtain a coarse-grained code of length C, Coarse. En and fine-grained encoding of length F En Then concatenate them into a fusion code of length C+F (Mix). En Coarse En We obtain the following formula: , ; In the formula, Softmax(∙) is the Softmax function, and C s [i] is the encoded value of the large interval i, α c r is the attenuation coefficient over a large area. c Let dist(k) be the radius of the large interval neighborhood. c i) is k c The annular distance between i and i, dist(k) c ,i)=min(|k c -i|,C-|k c -i|), min(∙) is the minimum value operation; S4, construct a ring-shaped neighborhood angle decoding module to obtain the progressive residual feature f. out Output FT in Predicted ship heading angle set , For FT in The predicted heading angle of the ship in the b-th sample; S5, constructs a ship orientation detection network, including a feature extraction module, a ring neighborhood angle encoding module, and a ring neighborhood angle decoding module; S6. Train the ship orientation detection network using D1 until it converges to obtain the ship orientation detection model. S7 acquires a batch of remote sensing images to be identified to form a feature tensor. After passing through the feature extraction module and the ring neighborhood angle decoding module, it outputs the corresponding set of predicted ship head orientation angles.
2. The remote sensing ship orientation recognition method based on Mamba and convolutional dynamic fusion according to claim 1, characterized in that, D1 was obtained by filtering from the remote sensing dataset DOTA.
3. The remote sensing ship orientation recognition method based on Mamba and convolutional dynamic fusion according to claim 1, characterized in that, The local branch includes a depthwise separable convolutional layer, a channel mixing layer, and a residual reconstruction layer connected in sequence. The depthwise separable convolutional layer, the channel mixing layer, and the residual reconstruction layer generate convolutional features (FT) according to the following formula. DW Channel mixing features FT CM Local branching feature X Conv ; , , , In the formula, Conv 3×3,depthwise (∙) represents a 3×3 depthwise separable convolution, BN(∙) represents batch normalization, and Conv 1×1 (∙) is a 1×1 convolution, GELU(∙) is the GELU activation function, and Dropout(∙) is a random dropout operation.
4. The remote sensing ship orientation recognition method based on Mamba and convolutional dynamic fusion according to claim 1, characterized in that, The orthogonal feature fusion module includes a first branch and a second branch; The first branch includes a first channel alignment layer, a global vector generation layer, a unit vector normalization layer, a dimension reshaping layer, and a broadcast extension layer; The first channel alignment layer is used to align X Mamba Channels are aligned to a preset dimension to obtain the global alignment feature f. Mamba ; The global vector generation layer is used to perform power-strengthened and pooling operations according to the following formula to obtain the global vector g; , In the formula, p is the user input parameter, p=1,3 or p≥20, and AdaptiveAvgPool2d(∙) is the AdaptiveAvgPool2d function; The unit vector normalization layer obtains g according to the following formula L2 normalization. norm ; , In the formula, It is the L2 norm. The value is the square of the feature value of the c-th channel of the b-th sample in a batch of samples, where 1 ≤ b ≤ B and 1 ≤ c ≤ C. mid g norm The shape is B×C mid ; The dimension reshaping layer is used to reshape g norm Dimensional reshaping into B×C mid The four-dimensional tensor g of ×1×1 reshaped ; The broadcast extension layer is used to transmit g reshaped Broadcast extended to B×C mid ×H in ×W in broadcast characteristics g expand ; The second branch includes a second channel alignment layer, an orthogonal projection decomposition layer, a feature stitching layer, and a convolutional dimensionality reduction layer; The second channel alignment layer is used to align X Conv Channels are aligned to a preset dimension to obtain local alignment features f. Conv ; The orthogonal projection decomposition layer is orthogonally decomposed according to the following formula, resulting in a shape of B×C. mid ×H in ×W in and the orthogonal residual f orth ; , In the formula, ⊙ represents the element-wise dot product; The feature splicing layer is used to combine g expand and f orth By concatenating along the channel dimension, we obtain B×2C. mid ×H in ×W in splicing characteristics; The convolutional dimensionality reduction layer is used to perform 1×1 convolutional dimensionality reduction on the spliced features, resulting in B×C. mid ×H in ×W in fusion feature f mix This serves as the output of the orthogonal feature fusion module.
5. The remote sensing ship orientation recognition method based on Mamba and convolutional dynamic fusion according to claim 1, characterized in that, The progressive residual module includes a feature alignment transformation layer, a weight normalization layer, a progressive residual fusion layer, and a shape adjustment layer; The feature alignment transform layer is used to transform from FT in X Mamba X Conv Choose 1 to 3 features from the list and compare them with f. mix Together they form set G in And according to the following formula for G in The s-th feature f s Perform feature alignment to obtain f s Aligned features ; , In the formula, SiLU(∙) is the SiLU function, BN(∙) is batch normalization, and Conv 1×1 (∙) represents a 1×1 convolution; The weight normalization layer is used to determine the weights based on α = Softmax(α). raw Update the weight vector α raw The updated weight vector α is obtained, where the s-th element of α is α. s α raw initial value ; The progressive residual fusion layer generates f according to the following formula. out1 ; , The shape adjustment layer is used to perform a convolution operation on f. out1 The shape is adjusted to B×(C+F) to obtain f. out .
6. The remote sensing ship orientation recognition method based on Mamba and convolutional dynamic fusion according to claim 1, characterized in that, The decoding method of the ring-shaped neighborhood angle decoding module is as follows: S41, Obtain FT in The corresponding asymptotic residual characteristic f out Feature separation is performed, and the features in the first C columns are used as the coarse-grained component P. coarse The fine-grained component P in column F. fine ; S42, Output the first prediction set based on the self-attention decoding strategy. , For FT in The first predicted angle of the b-th sample; S43, Constrained to between 0° and 360°, the Fourier Transform (FT) is obtained. in Predicted ship heading angle for the b-th sample , constitutes FT in Predicted ship heading angle set .
7. The remote sensing ship orientation recognition method based on Mamba and convolutional dynamic fusion according to claim 6, characterized in that, The self-attention decoding strategy is either a discrete index positioning method or a probability-weighted average method. The discrete index positioning method is as follows: generate a predicted large interval index according to the following formula. Predicting small interval indexes and the first prediction set ; , , In the formula, argmax(∙) is the argmax function. The angle value corresponding to the large interval. The angle value corresponding to the interval; The probability-weighted averaging method generates a coarse-grained probability distribution p according to the following formula. c Fine-grained probability distribution p f and the first prediction set ; , , In the formula, p c [i] is p c The i-th element in the array corresponds to the predicted probability of the large interval i, p. f [j] is p f The j-th element in the interval represents the predicted probability of interval j.
8. The remote sensing ship orientation recognition method based on Mamba and convolutional dynamic fusion according to claim 6, characterized in that, If the self-attention decoding strategy is a discrete index localization method, then one round of training in S6 includes Sa1~Sa3; Sa1, obtains a batch of samples from D1 to form the feature tensor FT. in The actual ship bow orientation angles of this batch of samples constitute the angle set θ. ture ; Sa2, FT in The progressive residual features f are obtained through the feature extraction module. out , θ ture The coded tensor is generated by the annular neighborhood angle coding module, and f is calculated. out The loss between the encoded tensor and the loss1, wherein the loss1 adopts BCE With Logits Loss; Sa3 adjusts the parameters of the ship orientation detection network to minimize loss1.
9. The remote sensing ship orientation recognition method based on Mamba and convolutional dynamic fusion according to claim 6, characterized in that, If the self-attention decoding strategy is a probability-weighted average method, then one round of training in S6 includes Sb1~Sb4; Sb1, obtains a batch of samples from D1 to form the feature tensor FT. in The actual ship bow orientation angles of this batch of samples constitute the angle set θ. ture ; Sb2, FT in The progressive residual features f are obtained through the feature extraction module. out and θ ture The coded tensor is generated by the annular neighborhood angle coding module, and f is calculated. out The loss between the encoding tensor and loss1; Sb3, f out The set of predicted ship heading angles is output by the annular neighborhood angle decoding module. ,calculate With θ ture The loss2 is derived using Varifocal Loss; Sb4, calculate the total loss L total =loss1+loss2, and minimize L total Adjust the parameters of the ship orientation detection network.
Citation Information
Patent Citations
Unmanned surface ship cluster trajectory prediction method and system in uncertain environment
CN119179863A
SiDAT model SAR image ship wake detection method based on multi-modal fusion attention mechanism
CN120388302A