Ship identification system and method for optical remote sensing images

By combining visual global clustering scanning branch and local shape adaptation branch with wavelet attention enhancement module, the problem of feature extraction of ships with large aspect ratio in optical remote sensing images is solved, and more accurate global feature extraction and target recognition are achieved.

CN122156998BActive Publication Date: 2026-07-21CHANGCHUN INST OF OPTICS FINE MECHANICS & PHYSICS CHINESE ACAD OF SCI

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHANGCHUN INST OF OPTICS FINE MECHANICS & PHYSICS CHINESE ACAD OF SCI
Filing Date
2026-04-15
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively extract discriminative features of ships with large aspect ratios in optical remote sensing images. Traditional methods are prone to introducing noise when modeling directional contexts and are difficult to obtain global information. Self-attention mechanisms have high computational complexity in high-resolution images, and image flattening operations disrupt spatial structure.

Method used

A structure-aware sequence is constructed by visual global clustering scanning branch, and local shape adaptation branch is used to collaboratively model local texture and slender structure. Combined with wavelet attention enhancement module, adaptive weighting and spatial-frequency domain fusion are performed to achieve differentiated enhancement and complementary fusion of global semantics and local structure.

Benefits of technology

It significantly improves the ability to extract local features from ships with large length-to-width ratios, enhances the accuracy of global feature extraction and target representation capabilities, and strengthens the overall recognition performance of ships.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122156998B_ABST
    Figure CN122156998B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of deep learning, and more particularly to a ship identification system and method for optical remote sensing images, wherein the collected ship remote sensing images are processed by multiple global-local fusion modules, the output features enter the detection head, and the detection result of the ship is obtained; in each global-local fusion module, a structure perception sequence is constructed by a feature-guided local clustering strategy to maintain the spatial integrity of the local structure such as target texture and edge, thereby realizing more accurate extraction of global features; through collaborative modeling of conventional local texture and slender structure, the local feature extraction capability for large aspect ratio ship targets is significantly improved; the wavelet attention enhanced fusion branch realizes differentiated enhancement and complementary fusion of global semantics and local structure information through adaptive weighting and space-frequency domain fusion, and significantly improves the overall target representation capability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of deep learning technology, and in particular relates to a ship identification system and method for optical remote sensing images. Background Technology

[0002] Ship detection aims to automatically identify, locate, and classify ship targets in images. Its widespread application in fisheries management, maritime patrol, and rescue is of great significance for strengthening ship traffic management and maintaining maritime safety. However, ships in optical remote sensing images typically have large aspect ratios, small scales, and are often situated in complex marine backgrounds. This makes it difficult to effectively extract the discriminative features of ships. Currently, mainstream feature extraction networks are mainly divided into three categories: CNN-based, Transformer-based, and Mamba-based feature extraction networks.

[0003] CNN-based feature extraction networks primarily rely on convolutions to extract local features such as edges and textures of targets. However, features of targets with large aspect ratios, such as ships, are spatially unevenly distributed, dense at one end and sparse at the other. Traditional square convolutional kernels are ineffective in modeling their directional context and easily introduce background noise. Furthermore, the local extraction characteristics of sliding windows limit the receptive field, making it difficult to acquire sufficient global information.

[0004] Transformer-based feature extraction networks model long-range dependencies through self-attention mechanisms to achieve global context awareness. However, the quadratic computational complexity of self-attention makes it difficult to balance efficiency and performance in high-resolution optical remote sensing images. Furthermore, global self-attention has limitations in capturing local details.

[0005] Mamba-based feature extraction networks have shown great potential in image processing due to their advantages of both global receptive field and linear complexity. However, since images rely on two-dimensional topological structures, simple image flattening operations can disrupt the spatial structure between pixels, causing pixels belonging to the same object to be far apart in a sequence. This disrupted spatial information makes it difficult to effectively utilize spatial priors such as local texture and shape of ships, thus weakening the ability to model the context. Summary of the Invention

[0006] In view of this, the present invention aims to provide a ship identification system and method for optical remote sensing images. The visual global clustering scanning branch constructs a structure-aware sequence through a feature-guided local clustering strategy to maintain the spatial integrity of local structures such as target textures and edges. A local shape adaptation branch is proposed to collaboratively model conventional local textures and slender structures. The wavelet attention enhancement fusion module realizes differentiated enhancement and complementary fusion of global semantic and local structural information through adaptive weighting and spatial-frequency domain fusion.

[0007] To achieve the above objectives, the technical solution created by this invention is implemented as follows: A ship identification system based on optical remote sensing images includes multiple cascaded global-local fusion groups and a detection head. The acquired ship remote sensing images are processed by these groups, and the output features are input into the detection head to obtain the ship detection result. Each global-local fusion group includes multiple cascaded global-local fusion modules. In each module, input features are fed into a parallel visual global clustering scanning branch and a local shape adaptation branch. The visual global clustering scanning branch acquires the spatial image information of the input features to obtain global features. The local shape adaptation branch extracts local features from the input features in different directions to obtain local features. A wavelet attention-enhanced fusion branch simultaneously applies wavelet transform to both global and local features to obtain their respective frequency domain features. Then, the two frequency domain features are fused using an attention-based feature interaction mechanism to obtain the output features.

[0008] Furthermore, in the visual global clustering scanning branch: a deep convolution operation is performed on the input features to fuse the spatial information in the input features, resulting in spatial features; the spatial features are sorted forward according to their element indices to obtain a forward scanning sequence, and a forward global clustering scan is performed on the spatial features according to their element indices to obtain a forward clustering sequence; the forward scanning sequence and the forward clustering sequence are sorted in reverse order according to their respective indices to obtain a reverse scanning sequence and a reverse clustering sequence; the forward scanning sequence, the forward clustering sequence, the reverse scanning sequence, and the reverse clustering sequence are input into a selective state-space model for sequence modeling to obtain global features.

[0009] Further, the process of obtaining the positive clustering sequence of features includes: taking each element in the spatial features as the center element, determining the neighborhood matrix of each element, and forming an index matrix by combining the indices of each element in the neighborhood matrix in the spatial features; calculating the cosine similarity between the center element and other elements in each neighborhood matrix, and sorting the cosine similarities according to the corresponding element's index in the neighborhood matrix to obtain a similarity matrix; comparing the cosine similarity in the similarity matrix with a set similarity threshold, setting the cosine similarity greater than or equal to the similarity threshold to 1, and setting the cosine similarity less than the similarity threshold to 0, to obtain the corresponding binary mask matrix; superimposing the binary mask matrix onto the index matrix, and replacing the index value of the center element with the index value of the element with the smallest value among the elements corresponding to the retained index, to obtain the new index value of the center element of each neighborhood matrix, and thus the new index value of each element in the spatial features; sorting the elements in the spatial features according to the new index values ​​to obtain the positive clustering sequence.

[0010] Furthermore, in the local shape adaptation branch: a deep square convolution is performed on the input features, and local neighborhood context information is extracted independently for each channel of the input features to obtain square convolution features; the square convolution features are then continuously subjected to horizontal and vertical strip convolutions to obtain the features of the square convolution features in the two directions, thus obtaining local features.

[0011] Furthermore, in the wavelet attention-enhanced fusion branch: wavelet transform is performed on the global features to obtain low-frequency global features and high-frequency global features; wavelet transform is performed on the local features to obtain low-frequency local features and high-frequency local features; attention weights are extracted from the high-frequency local features and low-frequency global features respectively, and the corresponding attention weights are assigned to the high-frequency global features and low-frequency local features respectively; the weighted high-frequency global features and low-frequency local features are concatenated with the residuals of the original high-frequency global features and the original low-frequency local features respectively, and then the two features are concatenated and fused; the features obtained by the concatenated and fused features are then concatenated and fused with the global features and local features to obtain the output features.

[0012] Furthermore, wavelet transform is applied to the global features, and the high-frequency features obtained in the horizontal, vertical, and diagonal directions are concatenated to obtain high-frequency global features; wavelet transform is applied to the local features, and the high-frequency features obtained in the horizontal, vertical, and diagonal directions are concatenated to obtain high-frequency local features.

[0013] Furthermore, channel attention operations are performed on low-frequency global features to obtain channel attention weights, and these channel attention weights are multiplied by the corresponding elements of the low-frequency local features; spatial attention operations are performed on high-frequency local features to obtain spatial attention weights; and these spatial attention weights are multiplied by the corresponding elements of the high-frequency global features.

[0014] Furthermore, the output features of each global-local fusion group are processed and then input into the feature pyramid. The output features of the feature pyramid are then input into the detection head to obtain the detection results of the ship.

[0015] A ship identification method based on optical remote sensing images includes: S1: Obtain a dataset of ship remote sensing images with ship labels, and preprocess the ship remote sensing image dataset to obtain a training set; S2: Construct a ship identification system as provided in this invention; S3: Using the remote sensing images of ships in the training set from step S1 as input and the corresponding ship labels in the training set as output, train the ship identification system constructed in step S2 to obtain the ship identification model. S4: Input the remote sensing image of the ship to be detected into the ship recognition model obtained in step S3 to obtain the ship recognition result.

[0016] Compared with the prior art, the present invention can achieve the following beneficial effects: This invention creates a ship identification system and method for optical remote sensing images. The visual global clustering scanning branch constructs a structure-aware sequence through a feature-guided local clustering strategy to maintain the spatial integrity of local structures such as target textures and edges, thereby achieving more accurate extraction of global features. The proposed local shape adaptation branch significantly improves the ability to extract local features from ship targets with large aspect ratios by collaboratively modeling conventional local textures and slender structures. The proposed wavelet attention-enhanced fusion module achieves differentiated enhancement and complementary fusion of global semantic and local structural information through adaptive weighting and spatial-frequency domain fusion, significantly improving the overall target representation capability. Attached Figure Description

[0017] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments and descriptions of the invention are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings: Figure 1 A schematic diagram of a ship identification system based on optical remote sensing images, as described in an embodiment of the present invention; Figure 2 A schematic diagram illustrating the feature processing of the visual global clustering scanning branch as described in an embodiment of the present invention; Figure 3 A schematic diagram illustrating the process of obtaining a positive clustering sequence as described in an embodiment of the present invention; Figure 4 A schematic diagram illustrating the feature processing of the local shape adaptation branch as described in an embodiment of the present invention; Figure 5 A schematic diagram of the feature processing process of the wavelet attention enhancement fusion branch described in the embodiment of the present invention; Figure 6 A schematic flowchart of the ship identification method based on optical remote sensing images as described in the embodiments of the present invention; Figure 7 The image shows the result of ship detection in optical remote sensing images using the method provided by the present invention, as described in an embodiment of the invention. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not constitute a limitation thereof. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.

[0019] In the description of this invention, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined with "first," "second," etc., may explicitly or implicitly include one or more of that feature. In the description of this invention, unless otherwise stated, "a plurality of" means two or more.

[0020] The invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0021] like Figure 1 As shown in the embodiments of the present invention, the ship identification system for optical remote sensing images includes multiple cascaded global-local fusion groups and a detection head. The acquired ship remote sensing images are processed by multiple global-local fusion groups, and the output features are input into the detection head to obtain the ship detection result. Each global-local fusion group includes multiple cascaded global-local fusion modules. In each global-local fusion module, the input features are fed into a parallel visual global clustering scanning branch and a local shape adaptation branch. The visual global clustering scanning branch acquires global spatial image information of the input features to obtain global features; the local shape adaptation branch extracts local features from the input features in different directions to obtain local features; the wavelet attention enhancement fusion branch simultaneously performs wavelet transform on both the global and local features to obtain their respective frequency domain features, and then performs feature interaction fusion based on an attention mechanism to obtain the output features. In some embodiments, the output features processed by each global-local fusion group are input into a feature pyramid for processing, and the output features of the feature pyramid are then input into the detection head to obtain the ship detection result.

[0022] The ship identification system for optical remote sensing images provided in this embodiment of the invention includes four global-local fusion groups. The acquired ship remote sensing image, after being downsampled by a downsampling layer, is input into the first global-local fusion group. In the first global-local fusion group, the downsampled features are processed by two cascaded global-local fusion modules before being processed by the second global-local fusion group. In the second global-local fusion group, the features output from the first global-local fusion group are downsampled, processed by two more cascaded global-local fusion modules, and then processed by the third global-local fusion group. In the third global-local fusion group, the features output from the second global-local fusion group are downsampled, processed by eight more cascaded global-local fusion modules, and then processed by the fourth global-local fusion group. In the fourth global-local fusion group, the features output from the third global-local fusion group are downsampled, processed by two more cascaded global-local fusion modules, and all global-local fusion processes are completed. All features after global and local fusion processing are fused into multi-scale features in the feature pyramid processing to obtain multi-scale feature maps that take into account both high-level semantic information and low-level spatial details. The multi-scale feature maps are then fed into the detection head, where the target category is predicted through the classification branch and the target bounding box parameters are predicted through the regression branch, thus obtaining the ship detection results.

[0023] In some embodiments, the feature processing of the visual global clustering scanning branch includes: performing a deep convolution operation on the input features to fuse spatial information in the input features, obtaining spatial features; sorting the spatial features in forward order according to their element indices to obtain a forward scanning sequence, and performing a forward global clustering scan on the spatial features according to their element indices to obtain a forward clustering sequence; sorting the forward scanning sequence and the forward clustering sequence in reverse order according to their respective indices to obtain a reverse scanning sequence and a reverse clustering sequence; inputting the forward scanning sequence, the forward clustering sequence, the reverse scanning sequence, and the reverse clustering sequence into a selective state space model for sequence modeling to obtain global features. In this embodiment of the invention, the selective state space model proposed by Mamba is directly used for sequence modeling to obtain global features. The visual global clustering scanning branch provided by this invention constructs a structure-aware sequence through a feature-guided local clustering strategy to maintain the spatial integrity of local structures such as target textures and edges, thereby achieving more accurate extraction of global features.

[0024] In this embodiment of the invention, the feature processing procedure for the visual global clustering scanning branch is as follows: Figure 2As shown, the input features first undergo channel dimension transformation through a linear mapping layer, followed by depthwise convolution to obtain spatial features. The spatial features are then activated using the SiLU activation function to enhance nonlinear expressive power. This process effectively enhances local texture and edge details while maintaining spatial resolution, providing a feature foundation for subsequent construction of structure-aware sequences. The spatial features after SiLU activation are sorted forward by element index to obtain a forward scan sequence. A forward global clustering scan is then performed on the spatial features according to element index to obtain a forward clustering sequence. The forward scan sequence and forward clustering sequence are then sorted in reverse order by their respective indices to obtain a reverse scan sequence and a reverse clustering sequence. These sequences are then input into a selective state-space model for sequence modeling. Each scan sequence is restored to a two-dimensional feature map, and the feature distribution is stabilized through normalization. A linear mapping is then used to restore the feature dimension to the same level as the input, achieving effective extraction of global information and obtaining global features.

[0025] In some embodiments, the process of obtaining a forward clustering sequence of features includes: taking each element in the spatial features as the center element, determining the neighborhood matrix of each element, and forming an index matrix by combining the indices of each element in the neighborhood matrix in the spatial features; calculating the cosine similarity between the center element and other elements in each neighborhood matrix, and sorting the cosine similarities according to the indices of the corresponding elements in the neighborhood matrix to obtain a similarity matrix; comparing the cosine similarities in the similarity matrix with a set similarity threshold, setting the cosine similarities greater than or equal to the similarity threshold to 1, and setting the cosine similarities less than the similarity threshold to 0, to obtain the corresponding binary mask matrix; superimposing the binary mask matrix onto the index matrix, replacing the index value of the center element with the index value of the element with the smallest value among the elements corresponding to the retained index, to obtain a new index value for the center element of each neighborhood matrix, and thus a new index value for each element in the spatial features; and sorting the elements in the spatial features according to the new index values ​​to obtain a forward clustering sequence.

[0026] In this embodiment of the invention, the process of obtaining the positive clustering sequence is as follows: Figure 3 As shown, the process includes: the spatial feature resolution after SiLU activation is 5×5×1536; determining the 8-neighborhood matrix for each element in the spatial feature as the center element; and forming an index matrix by combining the indices of each element in the neighborhood matrix within the spatial feature. For example, taking the 19th element in the spatial feature as an example, the index matrix corresponding to the 8-neighborhood matrix of the 19th element is... In each neighborhood matrix, the cosine similarity between the central element and other elements is calculated, and the cosine similarities are sorted according to the index of the corresponding element in the neighborhood matrix to obtain a similarity matrix. For example, the similarity matrix corresponding to the 19th element in the spatial feature is... The cosine similarity in the similarity matrix is ​​compared with a set similarity threshold. Cosine similarities greater than or equal to the threshold are set to 1, and those less than the threshold are set to 0, resulting in the corresponding binary mask matrix. In this embodiment, the similarity threshold is set to 0.5, thus obtaining the binary mask matrix corresponding to the 19th element. The binary mask matrix is ​​superimposed on the index matrix. The index value of the element with the smallest value among the elements corresponding to the retained indexes is used to replace the index value of the center element, resulting in a new index value for the center element of each neighborhood matrix, and thus a new index value for each element in the spatial features. For example, for the 19th element, it has four pixels with a mask value of 1 (excluding itself). The element with index 13 is the smallest in the 8-neighborhood matrix, so the index label of the 19th pixel is updated to 13. This local clustering strategy aims to avoid incorrectly aggregating spatially distant but semantically similar targets, thereby protecting the target boundaries and local structure from damage. The feature sequence is reordered in ascending order of the updated index matrix's index labels, and within the same label, it is arranged in ascending order of the original index, thus obtaining the forward clustering sequence. For example, the standard forward scan order [1,2,3,...,24,25] is updated to [1,7,2,...,24,25]. Finally, to further capture diverse contextual dependencies, a corresponding reverse clustering sequence [25,24,...,2,7,1] is constructed simultaneously. To ensure model stability and generalization ability, the standard forward sequence [1,2,3,...,24,25] and the reverse sequence [25,24,...,3,2,1] are also retained. This invention concatenates these four sequences to form a four-way scanning sequence, enhancing the diversity of feature modeling from multiple perspectives.

[0027] In some embodiments, the feature processing of the local shape adaptation branch includes: performing a depthwise square convolution on the input features, independently extracting local neighborhood context information for each channel of the input features to obtain square convolution features; and continuously performing horizontal and vertical strip convolutions on the square convolution features to obtain the features of the square convolution features in both directions, thus obtaining local features. The local shape adaptation branch provided by this invention significantly improves the ability to extract local features from ship targets with large aspect ratios by collaboratively modeling conventional local textures and slender structures.

[0028] In this embodiment of the invention, the feature processing procedure for local shape-adaptive branches is as follows: Figure 4As shown, a 3×3 depthwise square convolution is first used to independently extract local neighborhood context information for each channel. This operation can effectively capture the local texture pattern and edge response of the target, while significantly reducing computational complexity and the number of parameters. Then, a series of strip convolutions with horizontal and vertical constraints are used to convolve the features after the depthwise square convolution, with kernel sizes of 1×5 and 5×1, respectively. By using convolution methods in different directions, this invention achieves explicit modeling of shape features in different directions while maintaining computational efficiency. This makes the network more capable of shape perception and structural adaptation in both the horizontal and vertical main directions, especially suitable for feature extraction of large aspect ratio targets such as ships in remote sensing images. After completing the vertical convolution with a 5×1 kernel, the output features are normalized to stabilize the feature distribution and accelerate model convergence. The SiLU activation function is then introduced to enhance the features, thereby further improving the expressive power and discriminative power of local features, and finally achieving local shape adaptive feature extraction of ship targets. The feature processing of the local shape adaptation branch in this embodiment can be represented by the following formula: F L =δ(BN(WConv(HConv(DWConv(F in ))))); Among them, F in The input features represent the local shape adaptation branch, DWConv represents depthwise square convolution, HConv represents 1×5 horizontal bar convolution, WConv represents 5×1 vertical bar convolution, BN represents batch normalization, δ represents the SiLU activation function, and F... L This represents a local feature whose shape adapts to the branch output.

[0029] In some embodiments, the feature processing of the wavelet attention-enhanced fusion branch includes: performing wavelet transform on the global features to obtain low-frequency global features and high-frequency global features; performing wavelet transform on the local features to obtain low-frequency local features and high-frequency local features; extracting attention weights for the high-frequency local features and low-frequency global features respectively, and assigning the corresponding attention weights to the high-frequency global features and low-frequency local features respectively; concatenating the weighted high-frequency global features and low-frequency local features with the residuals of the original high-frequency global features and original low-frequency local features respectively, and then performing convolutional fusion on the resulting two features; and then performing convolutional fusion on the features obtained from the convolutional fusion with the global features and local features to obtain the output features. The wavelet attention-enhanced fusion module provided by this invention achieves differentiated enhancement and complementary fusion of global semantic and local structural information through adaptive weighting and spatial-frequency domain fusion, significantly improving the overall representation capability of the target.

[0030] In some embodiments, wavelet transform is performed on the global features, and the high-frequency features obtained in the horizontal, vertical, and diagonal directions are concatenated to obtain high-frequency global features; wavelet transform is performed on the local features, and the high-frequency features obtained in the horizontal, vertical, and diagonal directions are concatenated to obtain high-frequency local features.

[0031] In some embodiments, channel attention operations are performed on low-frequency global features to obtain channel attention weights, and the channel attention weights are multiplied by the corresponding elements of low-frequency local features; spatial attention operations are performed on high-frequency local features to obtain spatial attention weights; and the spatial attention weights are multiplied by the corresponding elements of high-frequency global features.

[0032] In this embodiment of the invention, the feature processing procedure of the wavelet attention enhancement fusion branch is as follows: Figure 5 As shown, for global feature F G Perform wavelet transform (SWT) to obtain low-frequency global features. and high-frequency global features For local features F L Perform wavelet transform to obtain low-frequency local features. and high-frequency local features Specifically, using a low-pass filter. For global features F G Perform wavelet transform to obtain low-frequency global features. Using a horizontal high-pass filter Vertical high-pass filter and diagonal high-pass filter For global features F G Perform wavelet transform to obtain the high-frequency features in the horizontal direction. Vertical high-frequency characteristics and high-frequency features in the diagonal direction By splicing the data, high-frequency global features are obtained. Similarly, for local features F L Perform wavelet transform to obtain low-frequency local features. and the obtained horizontal high-frequency features Vertical high-frequency characteristics and high-frequency features in the diagonal direction By splicing the data, high-frequency local features are obtained. The above process is as follows: ; .

[0033] Because this invention captures the global long-range dependencies in ship remote sensing images through a global modeling mechanism, the global feature F... GThe low-frequency components of [the matrix] exhibit stronger expressive power in terms of semantic consistency and global context modeling. In contrast, [the matrix] focuses on extracting information from local regions, and its local features F [are more effective]. L High-frequency components have significant advantages in accurately depicting fine-grained edges, texture details, and small-scale object shapes. Therefore, this invention uses a band-level channel attention weighting system to guide the importance allocation of low-frequency features along the channel dimension, specifically including: Channel attention operations are performed on low-frequency global features to obtain channel attention weights. In this embodiment of the invention, the channel attention operation specifically includes... Spatial dimension average pooling is performed, and then the average pooled features are sequentially linearly mapped and activated by SiLU, followed by linearly mapped and activated by Sigmoid to obtain the channel attention weights Att. c The above process can be represented by the following formula: ; Where Mean represents the average pooling of the spatial dimension, W1 and W2 represent the weights of the two linear mappings respectively, and σ represents the Sigmoid activation.

[0034] Simultaneously, frequency band-level spatial attention weights are selected to highlight key structural regions in the spatial dimension, specifically including: Spatial attention operations are performed on high-frequency local features to obtain spatial attention weights. In this embodiment of the invention, the spatial attention operation specifically includes... After performing average pooling and max pooling along the channel dimension, the features obtained from the two pooling methods are concatenated and fused using convolution to obtain the spatial attention weights Att. s The above process can be represented by the following formula: ; Where Conv represents convolution operation, Concat represents channel concatenation, and M... avg and M max These represent average pooling and max pooling at the channel level, respectively.

[0035] Using channel attention weights Att c Spatial attention weights Att s Weighting is applied to corresponding frequency band features to achieve targeted complementary guidance. Specifically, low-frequency local features are weighted under the global semantic constraints of channel attention weights to obtain low-frequency features with greater semantic discriminative power, while high-frequency global features are weighted under the local structural constraints of spatial attention weights to obtain high-frequency features with enhanced key structures. The weighting process for the two features is as follows: ; ; Among them, F L and F H Represents the corresponding enhanced features, LN represents layer normalization, and Conv 1×1 This represents a 1×1 convolution.

[0036] Finally, the enhanced two features F L and F H The features are stitched together along the channel dimension to form the frequency domain enhancement feature F. E As shown in the following formula: F E =δ(LN(Conv 1×1 (Concat[F L ,F H ]))); Frequency domain enhancement feature F E By integrating attention-weighted global semantic information with local structural details, key information enhancement of the target at the frequency domain level is achieved. Furthermore, the frequency domain enhancement feature F... E Compared with the original global feature F G and local features F L By fusing the data, the output features F of the current stage can be obtained. out The specific formula is as follows: F out =δ(LN(Conv 1×1 (Concat[F E ,F L ,F G ]))); Output feature F out It not only preserves the rich local spatial structure and global semantic context in the airspace, but also introduces enhanced representation of targets in the frequency domain, thereby significantly improving the overall representation and discriminability of ship targets.

[0037] This invention also provides a ship identification method based on optical remote sensing images, combined with Figure 1 and Figure 6 The methods include: S1: Obtain a dataset of ship remote sensing images with ship labels, and preprocess the dataset to obtain a training set. In this embodiment of the invention, the ship remote sensing image dataset HRSC2016 with ship labels is obtained, and the images in the HRSC2016 dataset are scaled to 800×800, followed by random flipping and random rotation preprocessing operations.

[0038] S2: Construct a ship identification system as provided in this invention; S3: Using the remote sensing images of ships from the training set in step S1 as input and the corresponding ship labels from the training set as output, train the ship identification system constructed in step S2 to obtain the ship identification model. In this embodiment of the invention, the ship identification system constructed in step S2 is trained for 36 epochs, and the AdamW optimizer is selected with a weight decay of 0.0001, an initial learning rate of 0.0001, and a momentum of 0.9. The learning rate is multiplied by 0.1 in each decay phase. FocalLoss is used as the classification loss function, and RotatedIoULoss is used as the regression loss function.

[0039] S4: Input the remote sensing image of the ship to be detected into the ship recognition model obtained in step S3 to obtain the ship recognition result.

[0040] Figure 7 The results of ship detection in optical remote sensing images using the method provided by this invention are shown. The first row of results shows that the ship recognition model provided by this invention can effectively detect densely packed ship targets in any direction. This capability is mainly attributed to the scale and rotation adaptability of the local shape adaptation branch, which can accurately capture the contour features of the target, thereby achieving compact and accurate localization. In the second row of results, ships of different scales are accurately detected, thanks to the global modeling capability of the visual global clustering scanning branch, which helps improve the detection performance of small targets.

[0041] It should be understood that the various forms of processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this invention disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this invention can be achieved, and this is not limited herein.

[0042] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A ship identification system based on optical remote sensing images, characterized in that, It includes multiple cascaded global-local fusion groups and a detection head; among them, the acquired ship remote sensing images are processed by multiple global-local fusion groups, and the output features are entered into the detection head to obtain the ship detection results; Each global-local fusion group comprises multiple cascaded global-local fusion modules. Within each module, input features are fed into parallel visual global clustering scanning and local shape adaptation branches. The visual global clustering scanning branch acquires spatial image information of the input features to obtain global features. The local shape adaptation branch extracts local features from the input features in different directions to obtain local features. The wavelet attention-enhanced fusion branch simultaneously applies wavelet transform to both global and local features to obtain their respective frequency domain features. Then, it performs attention-based feature interaction fusion on the two frequency domain features to obtain the output features. In the visual global clustering scanning branch: The input features are subjected to a depthwise convolution operation to fuse the spatial information in the input features, thus obtaining spatial features; The spatial features are sorted in forward order according to their element indices to obtain the forward scan sequence. The spatial features are then subjected to a forward global clustering scan according to their element indices to obtain the forward clustering sequence. The forward scan sequence and the forward clustering sequence are sorted in reverse order according to their respective indices to obtain the reverse scan sequence and the reverse clustering sequence, respectively. The forward scan sequence, forward clustering sequence, reverse scan sequence, and reverse clustering sequence are input into the selective state-space model for sequence modeling to obtain global features.

2. The ship identification system based on optical remote sensing images according to claim 1, characterized in that, The process of obtaining the positive clustering sequence of features includes: Using each element in the spatial feature as the center element, determine the neighborhood matrix of each element, and form an index matrix by combining the indices of each element in the neighborhood matrix in the spatial feature; In each neighborhood matrix, the cosine similarity between the central element and other elements is calculated, and the cosine similarity is sorted according to the index of the corresponding element in the neighborhood matrix to obtain the similarity matrix; The cosine similarity in the similarity matrix is ​​compared with the set similarity threshold. Cosine similarity values ​​greater than or equal to the similarity threshold are set to 1, and cosine similarity values ​​less than the similarity threshold are set to 0, thus obtaining the corresponding binary mask matrix. The binary mask matrix is ​​superimposed on the index matrix. The index value of the center element is replaced by the index value of the element with the smallest value among the elements corresponding to the index. This yields the new index value of the center element of each neighborhood matrix, and thus the new index value of each element in the spatial feature. The elements in the spatial features are sorted according to the new index values ​​to obtain a positive clustering sequence.

3. The ship identification system based on optical remote sensing images according to claim 1, characterized in that, In the local shape adaptation branch: The input features are subjected to a deep square convolution, and local neighborhood context information is extracted independently for each channel of the input features to obtain square convolution features. By continuously performing horizontal and vertical strip convolutions on the square convolution features, the features of the square convolution features in the two directions are obtained, thus obtaining local features.

4. The ship identification system based on optical remote sensing images according to claim 1, characterized in that, In the wavelet attention-enhanced fusion branch: By performing wavelet transform on the global features, low-frequency global features and high-frequency global features are obtained; By performing wavelet transform on the local features, low-frequency local features and high-frequency local features are obtained; Attention weights are extracted from high-frequency local features and low-frequency global features respectively, and the corresponding attention weights are assigned to the high-frequency global features and low-frequency local features respectively. After weighting the high-frequency global features and low-frequency local features, respectively, they are concatenated with the residuals of the original high-frequency global features and the original low-frequency local features, and then the two features are concatenated and fused. The features obtained by concatenating and convolving are then concatenated and convolved with the global and local features to obtain the output features.

5. The ship identification system based on optical remote sensing images according to claim 4, characterized in that, A wavelet transform is performed on the global features, and the high-frequency features obtained in the horizontal, vertical, and diagonal directions are concatenated to obtain high-frequency global features. A wavelet transform is performed on the local features, and the high-frequency features obtained in the horizontal, vertical, and diagonal directions are concatenated to obtain high-frequency local features.

6. The ship identification system based on optical remote sensing images according to claim 4, characterized in that, Perform channel attention operation on low-frequency global features to obtain channel attention weights, and multiply the channel attention weights by the corresponding elements of the low-frequency local features; perform spatial attention operation on high-frequency local features to obtain spatial attention weights; and multiply the spatial attention weights by the corresponding elements of the high-frequency global features.

7. The ship identification system based on optical remote sensing images according to claim 1, characterized in that, The output features of each global-local fusion group are processed and then input into the feature pyramid. The output features of the feature pyramid are then input into the detection head to obtain the ship detection results.

8. A ship identification method for optical remote sensing images, characterized in that, include: S1: Obtain a dataset of ship remote sensing images with ship labels, and preprocess the ship remote sensing image dataset to obtain a training set; S2: Construct a ship identification system as described in any one of claims 1 to 7; S3: Using the remote sensing images of ships in the training set from step S1 as input and the corresponding ship labels in the training set as output, train the ship identification system constructed in step S2 to obtain the ship identification model. S4: Input the remote sensing image of the ship to be detected into the ship recognition model obtained in step S3 to obtain the ship recognition result.