Hyperspectral remote sensing image classification method based on spatial topology and inter-class features
By constructing a hyperspectral remote sensing image classification network and utilizing knowledge distillation and optimal transport techniques between the teacher and student networks, the alignment of local and global spatial information in the feature maps is enhanced, solving the domain offset problem in cross-domain hyperspectral remote sensing image classification and achieving higher classification accuracy.
Patent Information
- Application Number
- CN202510178192.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-18
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2045-02-18
AI Technical Summary
Existing cross-domain hyperspectral remote sensing image classification methods have limited ability to reduce domain offset, mainly because they ignore the influence of spatial topology and inter-class features between the source and target domains on domain offset, resulting in low classification accuracy.
A hyperspectral remote sensing image classification method based on spatial topology and inter-class features is adopted. By constructing a hyperspectral remote sensing image classification network, including a feature extraction network, a domain alignment network, and a classifier, knowledge distillation and optimal transport techniques of teacher and student networks are used to achieve distribution alignment and graph alignment, enhance the similarity of feature maps, and reduce the impact of domain offset.
This method improves the accuracy of hyperspectral remote sensing image classification by enhancing the alignment of local and global spatial information in feature maps, reducing the impact of differences in inter-class features and spatial topology on domain offset, and thus improving classification accuracy.
Smart Images

Figure CN119992215B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of hyperspectral remote sensing image classification technology, specifically to a hyperspectral remote sensing image classification method based on spatial topology and inter-class features. Background Technology
[0002] Domain shift refers to the difference between the source domain and the target domain. In cross-domain hyperspectral remote sensing image classification, domain shift is a major challenge to classification accuracy. This is mainly because the hyperspectral remote sensing image acquisition process is very sensitive to various factors, such as sensor nonlinearity, seasonal changes, and weather fluctuations. These factors may cause significant differences in spectral reflectance between the source and target domains for the same land cover category.
[0003] To reduce domain offset between the source and target domains and thus improve classification accuracy in the target domain, researchers have begun to introduce deep learning techniques into cross-domain hyperspectral remote sensing image classification to address the domain offset problem. However, existing deep learning-based cross-domain hyperspectral remote sensing image classification methods have limited ability to reduce domain offset. This is because these methods primarily emphasize the overall distribution alignment between the source and target domain hyperspectral remote sensing images, neglecting the influence of spatial topology and inter-class features on domain offset, resulting in low classification accuracy. Therefore, this application proposes a hyperspectral remote sensing image classification method based on spatial topology and inter-class features. Summary of the Invention
[0004] To overcome the shortcomings of existing technologies, this invention provides a hyperspectral remote sensing image classification method based on spatial topology and inter-class features.
[0005] The technical solution of this invention is as follows:
[0006] This application provides a hyperspectral remote sensing image classification method based on spatial topology and inter-class features, comprising the following steps:
[0007] A hyperspectral remote sensing image classification method based on spatial topology and inter-class features includes the following steps:
[0008] S1: Obtain source domain sub-image pairs and target domain sub-image pairs for training;
[0009] S2: Construct a hyperspectral remote sensing image classification network. This network comprises a feature extraction network, a domain alignment network, and a classifier connected sequentially. The feature extraction network extracts global and local features, the domain alignment network performs distribution alignment and graph alignment, and the classifier predicts the classification results. The domain alignment network includes a feature enhancement network and distribution alignment and graph alignment modules connected to the output of the feature enhancement network. The distribution alignment module includes a teacher network and a student network, and the graph alignment module includes branch I and branch II. The inputs of the teacher network and branch I are connected to the output of the feature enhancement network. The source domain of the feature enhancement network is... The enhanced feature map serves as the input to the teacher network and branch I; the input ends of the student network and branch II are both connected to the output end of the feature extraction network. The target domain enhanced feature map output by the feature enhancement network serves as the input to the student network and branch II; the output ends of the teacher network and branch I are both connected to the input end of the classifier. The knowledge learned by the teacher network is transferred to the student network through knowledge distillation, enabling the feature maps obtained by the student network to be aligned with those obtained by the teacher network (distribution alignment). Through optimal transport, the feature maps obtained by branch II are aligned with those obtained by branch I (graph alignment).
[0010] S3: Based on the total loss of the hyperspectral remote sensing image classification network, and using source domain sub-image pairs and target domain sub-image pairs to train the hyperspectral remote sensing image classification network model.
[0011] S4. Fill each boundary of the hyperspectral remote sensing image to be classified with pixels of the same size, the size of which is 1 / 2 patch size plus 1. Then map the images to obtain image X. Divide image X into two sub-images of the same size to be predicted. These two sub-images form a pair of sub-images to be predicted. Then, input the pair of sub-images to be predicted into the hyperspectral remote sensing image classification network model and process them sequentially through the feature extraction network and the feature enhancement network to obtain the enhanced feature map. Then, input the enhanced feature map into the classifier for classification prediction to obtain the image classification category prediction result and classification accuracy.
[0012] Preferably, step S1 specifically includes the following steps: acquiring a hyperspectral remote sensing image dataset, dividing the hyperspectral remote sensing image dataset into source hyperspectral remote sensing images and target hyperspectral remote sensing images according to the scene in the hyperspectral remote sensing image dataset; preprocessing the source hyperspectral remote sensing images and target hyperspectral remote sensing images to obtain images S, T and U, and then acquiring source domain sub-image pairs and target domain sub-image pairs based on images S and T respectively.
[0013] Preferably, in step S1, the source hyperspectral remote sensing image and the target hyperspectral remote sensing image are preprocessed to obtain image S, image T, and image U. Then, based on image S and image T, source domain sub-image pairs and target domain sub-image pairs are obtained respectively, specifically including the following steps:
[0014] S1-1: Fill each boundary of the source hyperspectral remote sensing image and the target hyperspectral remote sensing image with pixels of the same size. The size of the filled pixels is 1 / 2 the patch size plus 1, to obtain the initial processed source hyperspectral remote sensing image and the initial processed target hyperspectral remote sensing image.
[0015] S1-2: Randomly select 80% of the primary processed source hyperspectral remote sensing images with corresponding labels, and then use them together with all the primary processed target hyperspectral remote sensing images without corresponding labels as the training set, and use all the primary processed target hyperspectral remote sensing images with corresponding labels as the test set.
[0016] Then, 5% of the initial hyperspectral remote sensing images from the training set were randomly selected for flipping and radiative noise reduction to augment the data, resulting in secondary hyperspectral remote sensing images. Each secondary hyperspectral remote sensing image had a corresponding label and was also added to the training set. Flipping included horizontal and vertical flipping, with the same probability for both. Radiative noise included Gaussian noise, Poisson noise, and salt-and-pepper noise, with the same probability for each.
[0017] S1-3: Input all images in the training set and the test set into the feature space for mapping. The primary processed source hyperspectral remote sensing images with corresponding labels and the secondary processed source hyperspectral remote sensing images with corresponding labels in the training set are mapped to obtain image S. The primary processed target hyperspectral remote sensing images without corresponding labels in the training set are mapped to obtain image T. The primary processed target hyperspectral remote sensing images with corresponding labels in the test set are mapped to obtain image U.
[0018] S1-4: Each image S is divided into two source domain sub-images of the same dimension. The two source domain sub-images obtained from the same image S are a pair of source domain sub-images, called a source domain sub-image pair. Each image T is divided into two target domain sub-images of the same dimension. The two target domain sub-images obtained from the same image T are a pair of target domain sub-images, called a target domain sub-image pair.
[0019] Preferably, in step S2, the feature extraction network includes a Mamba branch and a convolutional branch; the input of the Mamba branch and the input of the convolutional branch are connected, and the output of both the Mamba branch and the convolutional branch are connected to the Concat layer. The Concat layer is connected to the first 2D convolutional layer and the first Add layer in sequence, and the input of the first Add layer is also connected to the input of both the convolutional branch and the Mamba branch.
[0020] Preferably, in step S2, the Mamba branch includes a first normalized layer, a first linear layer, a depthwise separable convolutional layer, a first SiLU layer, a 2D selective scanning module, a second normalized layer, and an element-wise multiplication module connected in sequence; the output of the first normalized layer is also connected to the second linear layer and the second SiLU layer in sequence, the output of the second SiLU layer is connected to the input of the element-wise multiplication module, and the element-wise multiplication module is also connected to the third linear layer and the second Add layer in sequence; the input of the first normalized layer is also connected to the input of the second Add layer.
[0021] Preferably, in step S2, the convolutional branch includes a second 2D convolutional layer, a first ReLU layer, a third 2D convolutional layer, a second ReLU layer, and a fourth 2D convolutional layer connected in sequence; the input of the second 2D convolutional layer in the convolutional branch is connected to the input of the first normalization layer in the Mamba branch, and the output of the fourth 2D convolutional layer and the output of the second Add layer are both connected to the Concat layer; the input of the second 2D convolutional layer is also connected to the input of the first Add layer.
[0022] Preferably, in step S2, the teacher network includes four channel conversion units connected in sequence. Each channel conversion unit includes a convolutional layer, a batch normalization layer, a ReLU layer, and a max pooling layer connected in sequence. The kernel size of the convolutional layer in the first channel conversion unit is 7×7, and the kernel sizes of the convolutional layers in the second, third, and fourth channel conversion units are all 3×3.
[0023] Preferably, in step S2, the student network includes four dimensional transformation units connected in sequence, and each of the four dimensional transformation units includes a fully connected layer and a ReLU layer connected in sequence.
[0024] Preferably, in step S2, branch I and branch II have the same structure and function; branch I includes two graph convolutional layers connected in sequence, wherein the first graph convolutional layer is used to capture global spatial topology information, and the second graph convolutional layer is used to capture more detailed local spatial topology information.
[0025] Preferably, in step S2, the feature enhancement network includes a fifth 2D convolutional layer, a GELU layer, a sixth 2D convolutional layer, and a channel segmentation layer connected in sequence. The output of the channel segmentation layer is connected to four depthwise separable convolutional layers, and the outputs of the four depthwise separable convolutional layers are all connected to a Concat layer. The Concat layer is connected to a seventh 2D convolutional layer and an Add layer in sequence. The input of the Add layer is also connected to the input of the fifth 2D convolutional layer. The kernel size of the fifth 2D convolutional layer is 3×3, and the kernel size of the sixth and seventh 2D convolutional layers is 1×1. In this application, the feature enhancement network is used to enhance the local spatial information and global spatial information in the feature map output by the feature extraction network.
[0026] Preferably, step S3 specifically includes the following steps: inputting a pair of source domain sub-images and a pair of target domain sub-images into the hyperspectral remote sensing image classification network, calculating the total loss of the hyperspectral remote sensing image classification network, then optimizing the gradient and backpropagating to update the model parameters of the hyperspectral remote sensing image classification network, completing one epoch of training; repeating the training for 500 epochs to complete one training segment; after one training segment, the classifier outputs the classification category prediction result and classification accuracy; repeating the training segment until the classification accuracy output by the next training segment is greater than the classification accuracy of the current training segment, then saving the parameters of the hyperspectral remote sensing image classification network during the training of the last epoch of the next training segment as the final model parameters, thus obtaining the hyperspectral remote sensing image classification network model.
[0027] Preferably, in step S3, for each epoch of training, a pair of source domain sub-images and a pair of target domain sub-images are input. During the training process of each epoch, the input pair of source domain sub-images is randomly selected from all the pairs of source domain sub-images, and the input pair of target domain sub-images is also randomly selected from all the pairs of target domain sub-images.
[0028] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0029] The feature extraction network in this application can extract features from the input source domain sub-image pairs, target domain sub-image pairs, and test sub-image pairs, respectively, and extract the source domain feature map M. s Target domain feature map M t And the test feature map, source domain feature map M s Target domain feature map M t Both the test feature maps and the feature enhancement network in the domain alignment network possess rich supplementary information, global spatial information, and local spatial information; while the feature enhancement network in the domain alignment network enhances the source domain feature map M. sAfter processing, it can output source domain enhanced feature maps with enhanced local and global spatial information, and the feature enhancement network enhances the target domain feature map M. t After processing, the target domain enhanced feature map, which improves both local and global spatial information, is output. In training the hyperspectral remote sensing image classification network, this application employs distribution alignment and graph alignment to achieve domain alignment, resulting in a hyperspectral remote sensing image classification network model with higher classification accuracy. Specifically, during distribution alignment, the knowledge learned by the teacher network in processing the source domain enhanced feature map is transferred to the student network through knowledge distillation. This allows the feature map obtained by the student network in processing the target domain enhanced feature map to be mutually aligned with the feature map obtained by the teacher network in processing the source domain enhanced feature map (this mutual alignment is distribution alignment). This improves the alignment of inter-class features between the source and target domains, reducing the impact of inter-class feature differences on domain shift. This approach aims to improve the classification accuracy of hyperspectral remote sensing image classification networks by increasing the similarity between the feature maps output by the teacher network and the feature maps output by the student network. In the graph alignment process, branch II processes the enhanced feature map of the target domain. Through optimal transport, the feature map obtained by branch II in processing the enhanced feature map of the target domain can be mutually aligned with the feature map obtained by branch I in processing the enhanced feature map of the source domain (this mutual alignment is graph alignment). This allows for better alignment of the spatial topological information of the source and target domains, reducing the impact of differences in spatial topological information on domain offset, and ensuring that the feature maps output by branch I and branch II are more similar. Figure 2 The hyperspectral remote sensing image classification network achieves higher similarity among the data, thereby improving its classification accuracy. Furthermore, during the training process of the hyperspectral remote sensing image classification network, both local and global spatial information in the source and target domain enhanced feature maps are enhanced. Therefore, during distribution alignment and graph alignment, the differences in inter-class features and spatial topology information are smaller, thus reducing the impact of these differences on domain shift. This allows the application to obtain a hyperspectral remote sensing image classification network model with better classification accuracy.
[0030] In this application, when classifying hyperspectral remote sensing images to be classified, the classifier is used to perform classification prediction on the feature map output by the feature enhancement network, outputting the classification category prediction result. Because the feature map output by the feature enhancement network contains enhanced local and global spatial information, and because the method uses a hyperspectral remote sensing image classification network model with higher classification accuracy trained in this application, the method described in this application achieves better classification results. Attached Figure Description
[0031] Figure 1 This is a schematic diagram of the network structure of the hyperspectral remote sensing image classification network in this invention;
[0032] Figure 2 This is a schematic diagram of the network structure of a feature extraction network. Figure 2 In this context, when the input is a pair of source domain sub-images, the feature extraction network outputs the source domain feature map M. s ;
[0033] Figure 3 yes Figure 1 A schematic diagram of the network structure of the feature enhancement network;
[0034] Figure 4 yes Figure 1 A schematic diagram of the network structure of the Chinese teachers' network;
[0035] Figure 5 yes Figure 1 A schematic diagram of the network structure of a middle school student network;
[0036] Figure 6 yes Figure 1 A schematic diagram of the network structure of branch I. Detailed Implementation
[0037] To help those skilled in the art better understand the technical solutions of the present invention, the technical solutions in the embodiments will be described in detail below with reference to the accompanying drawings. It should be emphasized that the embodiments described are only some examples of the present invention and not all implementation methods. Other implementation methods that can be obtained by those skilled in the art without creative effort based on the embodiments of the present invention should be included within the protection scope of the present invention.
[0038] This embodiment provides a hyperspectral remote sensing image classification method based on spatial topology and inter-class features, which specifically includes the following steps:
[0039] S1: Obtain source domain sub-image pairs and target domain sub-image pairs for training; specifically, this includes the following steps: obtaining a hyperspectral remote sensing image dataset, dividing the hyperspectral remote sensing image dataset into source hyperspectral remote sensing images and target hyperspectral remote sensing images according to the scenes in the hyperspectral remote sensing image dataset; and preprocessing the source hyperspectral remote sensing images and target hyperspectral remote sensing images to obtain images S, T, and U, and then obtaining source domain sub-image pairs and target domain sub-image pairs based on images S and T, respectively.
[0040] In this application, the hyperspectral remote sensing image dataset is the HyRANK dataset, and the URL for obtaining the HyRANK dataset is:
[0041] https: / / www.jianguoyun.com / p / DT4z7ugQncXpChj19dAEIAA;
[0042] The HyRANK dataset includes two scenes: Dioni and Loukia. In this application, source hyperspectral remote sensing images and target hyperspectral remote sensing images are classified according to the scenes in the hyperspectral remote sensing image dataset. Specifically, Dioni is identified as the source scene, and Loukia as the target scene. Hyperspectral remote sensing images containing the source scene are identified as source hyperspectral remote sensing images, and hyperspectral remote sensing images containing the target scene are identified as target hyperspectral remote sensing images. In this application, the land cover categories of Dioni and Loukia, as well as the number of samples in each category, shown in Table 1, are the same as Table II disclosed in the paper "Topological Structure and Semantic Information Transfer Network for Cross-Scene Hyperspectral Image Classification".
[0043] In this application, the source hyperspectral remote sensing image and the target hyperspectral remote sensing image are preprocessed to obtain image S, image T, and image U. Then, based on image S and image T, source domain sub-image pairs and target domain sub-image pairs are obtained, specifically including the following steps:
[0044] S1-1: Fill each boundary of the source hyperspectral remote sensing image and the target hyperspectral remote sensing image with pixels of the same size. The size of the filled pixels is 1 / 2 the patch size plus 1, resulting in the initial processed source hyperspectral remote sensing image and the initial processed target hyperspectral remote sensing image. In this embodiment, the patch size is 13, and the size of the filled pixels is 13 / 2 + 1 = 7.5. Since some source hyperspectral remote sensing images in the HyRANK dataset have corresponding labels, and some source hyperspectral remote sensing images do not have corresponding labels; similarly, some target hyperspectral remote sensing images in the HyRANK dataset have corresponding labels, and some target hyperspectral remote sensing images do not have corresponding labels; therefore, after step S1-1, the following situation exists: some initial processed source hyperspectral remote sensing images have corresponding labels, some initial processed source hyperspectral remote sensing images do not have corresponding labels, some initial processed target hyperspectral remote sensing images have corresponding labels, and some initial processed target hyperspectral remote sensing images do not have corresponding labels.
[0045] S1-2: Randomly select 80% of the primary processed source hyperspectral remote sensing images with corresponding labels, and then combine them with all the primary processed target hyperspectral remote sensing images without corresponding labels to form a training set. Use all the primary processed target hyperspectral remote sensing images with corresponding labels as the test set.
[0046] Then, 5% of the initial processing source hyperspectral remote sensing images (all initial processing source hyperspectral remote sensing images in the training set are labeled) are randomly selected from the training set and flipped and subjected to radiative noise processing for data augmentation to obtain secondary processing source hyperspectral remote sensing images. The secondary processing source hyperspectral remote sensing images are all labeled and are also added to the training set. In this application, flipping includes horizontal flipping and vertical flipping, and the probability of horizontal flipping and vertical flipping is the same. Radiative noise includes Gaussian noise, Poisson noise and salt-and-pepper noise, and the probability of radiative Gaussian noise, Poisson noise and salt-and-pepper noise is the same.
[0047] S1-3: Input all images in the training set and the test set into the feature space for mapping. The primary processed source hyperspectral remote sensing images with corresponding labels and the secondary processed source hyperspectral remote sensing images with corresponding labels in the training set are mapped to obtain image S. The primary processed target hyperspectral remote sensing images without corresponding labels in the training set are mapped to obtain image T. The primary processed target hyperspectral remote sensing images with corresponding labels in the test set are mapped to obtain image U.
[0048] S1-4: Each image S is divided into two source domain sub-images with the same dimension size. The dimension size of each source domain sub-image is half the dimension size of image S. The two source domain sub-images obtained from the same image S are a pair of source domain sub-images, called a source domain sub-image pair. Each image T is divided into two target domain sub-images with the same dimension size. The dimension size of each target domain sub-image is half the dimension size of image T. The two target domain sub-images obtained from the same image T are a pair of target domain sub-images, called a target domain sub-image pair.
[0049] S2: Construct a hyperspectral remote sensing image classification network. The network structure of the hyperspectral remote sensing image classification network is as follows: Figure 1 As shown, the hyperspectral remote sensing image classification network consists of a feature extraction network, a domain alignment network, and a classifier connected in sequence, as detailed below:
[0050] In this application, a feature extraction network is used to extract global and local features from paired source domain sub-images (i.e., source domain sub-image pairs) to obtain source domain feature maps M. s It is also used to extract global and local features from paired target domain sub-images (i.e., target domain sub-image pairs) to obtain target domain feature maps M. t ;
[0051] In this application, the network structure of the feature extraction network is as follows: Figure 2 As shown, the feature extraction network includes a Mamba branch and a convolutional branch; the input of the Mamba branch is connected to the input of the convolutional branch, and the output of both the Mamba branch and the convolutional branch is connected to the Concat layer. The Concat layer is connected to the first 2D convolutional layer and the first Add layer in sequence. The input of the first Add layer is also connected to the input of both the convolutional branch and the Mamba branch.
[0052] In this application, the Mamba branch includes a first normalized layer, a first linear layer, a depthwise separable convolutional layer, a self-attention module, a first SiLU layer, a 2D selective scanning module, a second normalized layer, and an element-wise multiplication module connected in sequence. The output of the first normalized layer is also connected to the second linear layer and the second SiLU layer in sequence. The output of the second SiLU layer is connected to the input of the element-wise multiplication module. The element-wise multiplication module is also connected to the third linear layer and the second Add layer in sequence. The input of the first normalized layer is connected to the input of the second Add layer.
[0053] In this application, the convolutional branch includes a second 2D convolutional layer, a first ReLU layer, a third 2D convolutional layer, a second ReLU layer, a fourth 2D convolutional layer, a third normalization layer, and a third Add layer connected sequentially. The input of the second 2D convolutional layer is connected to the input of the first normalization layer in the Mamba branch, and the input of the second 2D convolutional layer is also connected to the input of the third Add layer. In this application, the outputs of both the third and second Add layers are connected to the Concat layer, and the input of the second 2D convolutional layer is connected to the input of the first Add layer. In this application, the kernel size of the second and third convolutional layers is 3×3, and the kernel size of the fourth 2D convolutional layer is 1×1.
[0054] When the input to the feature extraction network is a pair of source domain sub-images, one of the source domain sub-images enters the convolution branch, resulting in a structure with dimensions H×W×. The local fusion feature map contains rich complementary and local spatial information. Another source domain sub-image enters the Mamba branch, resulting in a fusion feature map of dimension H×W×C with complementary information. The local fusion feature map and the fusion feature map are concatenated using a Concat layer, and then convolved using the first 2D convolutional layer to obtain a feature map with rich global and local spatial information. Finally, the feature map with rich global and local spatial information, along with the two source domain sub-images mentioned above, are added using the first Add layer to obtain the source domain feature map M, which contains rich complementary, global, and local spatial information. s ;
[0055] Similarly, when the input to the feature extraction network is a pair of target domain sub-images, the output of the feature extraction network is the target domain feature map M. t It also contains a wealth of supplementary information, global spatial information, and local spatial information.
[0056] This application uses a pair of source domain sub-images as input to the feature extraction network as an example to introduce the working principle of the feature extraction network in this application:
[0057] In this application, the Mamba branch is used to extract global features from one of the source domain sub-images, resulting in a dimension of H×W×. The global feature fusion feature map of this application contains rich complementary information, spatial information, and contextual information. Furthermore, it also contains rich enhanced key spatial information and key contextual information. H represents the height of image S, W represents the width of image S, and C represents the dimension of image S. The convolutional branch is used to extract local features from another source domain sub-image, resulting in a dimension of H×W×. Furthermore, it generates a feature map with rich local spatial details; the Concat layer is used to concatenate the feature maps output from the Mamba branch and the convolutional branch to obtain a fused feature map with dimensions H×W×C and rich global spatial features and rich local spatial details; the first 2D convolutional layer is used to further fuse the feature map output from the first Concat layer; the first Add layer is used to add the two source domain sub-images input to the feature extraction network and the feature map output from the first 2D convolutional layer element-wise to obtain a fused feature map with dimensions H×W×C and complementary information; specifically:
[0058] In this application, within the Mamba branch, the first normalization layer normalizes the feature map in one of the source domain sub-images in the input feature extraction network; the first linear layer performs a linear transformation on the feature map output by the first normalization layer; the depthwise separable convolutional layer extracts features from the feature map output by the first linear layer, obtaining a global feature map with spatial and contextual information; the self-attention module captures long-range dependencies in the feature map output by the depthwise separable convolutional layer, obtaining a global feature map enhanced with spatial and contextual information; the first SiLU layer performs activation operations on the feature map output by the self-attention module; the 2D selective scanning module selectively scans the feature map output by the first SiLU layer, obtaining a global feature map enhanced with key spatial and contextual information; and the second normalization layer normalizes the feature map output by the 2D selective scanning module.
[0059] The second linear layer performs linear processing on the feature map output from the first normalized layer; the second SiLU layer performs activation operations on the feature map output from the second linear layer; the element-wise multiplication module performs element-wise multiplication on the feature maps output from the second SiLU layer and the second normalized layer to obtain a global feature map with richer spatial and contextual information; the third linear layer performs linear transformation on the feature map output from the element-wise multiplication unit; the second Add layer adds the feature map output from the third linear layer and the feature map input to the first normalized layer to obtain a feature map with dimensions H×W×. The global fusion feature map of this application has rich complementary information, spatial information and contextual information, and also has rich enhanced key spatial information and key contextual information.
[0060] In this application, in the convolution branch, the second 2D convolutional layer is used to perform a convolution operation on another source domain sub-image of the input feature extraction network to obtain a feature map with local features; the first ReLU layer is used to perform an activation operation on the feature map output by the second 2D convolutional layer; the third 2D convolutional layer is used to perform a convolution operation on the feature map output by the first ReLU layer to obtain a local feature map with rich detail information; the second ReLU layer is used to perform an activation operation on the input feature map; the fourth 2D convolutional layer is used to perform a convolution operation on the feature map output by the second ReLU layer to obtain a feature map with dimensions H×W× Furthermore, the local feature maps provide richer details. The third normalization layer normalizes the feature map output from the fourth 2D convolutional layer. The third Add layer adds the feature map output from the third normalization layer and the feature map input to the second 2D convolutional layer, resulting in a dimension of H×W×. The local fusion feature map of this application contains rich complementary information as well as rich local spatial information.
[0061] In this application, the domain alignment network includes a feature enhancement network. The input of the feature enhancement network is connected to the output of the feature extraction network. The output of the feature enhancement network is connected to a distribution alignment module and a graph alignment module. The distribution alignment module includes a teacher network and a student network. The graph alignment module includes branch I and branch II. The inputs of the teacher network and branch I are both connected to the output of the feature enhancement network, as are the inputs of the student network and branch II. In this application, the source domain feature map M output by the feature extraction network... s After enhancement processing by the feature enhancement network, the source domain enhanced feature map is obtained, and the target domain feature map M is output by the feature extraction network. t After enhancement processing by the feature enhancement network, the enhanced feature map of the target domain is obtained. In this application, the feature extraction network is used for the source domain feature map M. s and target domain feature map M t The enhancement processing method is the same; the source domain enhanced feature map is used as the input to the teacher network and branch I, and the target domain enhanced feature map is used as the input to the student network and branch II; the output of the teacher network and the output of branch I are both connected to the input of the classifier; in this application, during the training of the hyperspectral remote sensing image classification network, the classifier is used to perform classification prediction on the feature maps output by the teacher network and branch I, and output the classification category prediction result; in this application, during the testing process, the classifier is used to perform classification prediction on the feature maps output by the feature enhancement network, and output the classification category prediction result; and when performing classification prediction on the hyperspectral remote sensing image to be classified, the classifier is used to perform classification prediction on the feature maps output by the feature enhancement network, and output the classification category prediction result.
[0062] In this application, the network structure of the feature enhancement network is as follows: Figure 3 As shown, the feature enhancement network includes a fifth 2D convolutional layer, a GELU layer, a sixth 2D convolutional layer, and a channel segmentation layer connected in sequence. The output of the channel segmentation layer is connected to four depthwise separable convolutional layers, and the outputs of the four depthwise separable convolutional layers are all connected to a Concat layer. The Concat layer is connected to a seventh 2D convolutional layer and an Add layer in sequence. The input of the Add layer is also connected to the input of the fifth 2D convolutional layer. The kernel size of the fifth 2D convolutional layer is 3×3, and the kernel size of the sixth and seventh 2D convolutional layers is 1×1.
[0063] In this application, the source domain feature map is used. Taking the feature enhancement network as an example, the fifth 2D convolutional layer enhances the source domain feature map. A convolution operation is performed to obtain a feature map with 96 channels, increasing the number of channels from 48 to 96 and retaining richer spatial information. A GELU layer activates the feature map output from the fifth 2D convolutional layer. A sixth 2D convolutional layer convolves the feature map activated by the GELU layer, resulting in a feature map with 48 channels, reducing the number of channels from 96 to 48 and preserving rich local spatial information. A channel segmentation layer segments the feature map output from the sixth 2D convolutional layer into four sub-blocks, each with 12 channels. This application uses four depthwise separable convolutional layers to perform convolution operations on each of the four sub-blocks. The depthwise separable convolutional layers have kernel sizes of 3×3, 5×5, 7×7, and 11×11. This application uses four depthwise separable convolutional layers with different kernel sizes to perform convolution operations on the four segmented sub-blocks, which can effectively enhance the spatial representation ability of features, capture local features at different scales, and obtain four feature maps with local features at different scales. The Concat layer concatenates the feature maps output by the four depthwise separable convolutional layers, and the seventh 2D convolutional layer performs channel fusion on the feature map output by the Concat layer. The output is combined with the feature map of the fifth 2D convolutional layer (i.e., the source domain feature map). The Add layer is used to process the feature map with the same number of channels as the output of the seventh 2D convolutional layer and the source domain feature map. By adding the features, we obtain a source domain enhanced feature map that enhances both local and global spatial information.
[0064] Similarly, when the input to the feature enhancement network is the target domain feature map M... t At the same time, the target domain enhanced feature map output by the feature enhancement network also contains enhanced local spatial information and global spatial information.
[0065] In this application, the network structure of the teacher network is as follows: Figure 4 As shown, the teacher network includes four channel transformation units connected in sequence. Each channel transformation unit includes a convolutional layer, a batch normalization layer, a ReLU layer, and a max pooling layer connected in sequence. The kernel size of the convolutional layer in the first channel transformation unit is 7×7, and the kernel sizes of the convolutional layers in the second, third, and fourth channel transformation units are all 3×3.
[0066] In this application, the source domain enhancement feature map of the input teacher network has 32 channels. The convolutional layers in all four channel conversion units perform convolution operations. The first channel conversion unit's convolutional layer produces a feature map with primary features and 64 channels. The second channel conversion unit's convolutional layer produces a feature map with intermediate features and 128 channels. The third channel conversion unit's convolutional layer produces a feature map with advanced features and 256 channels. The fourth channel conversion unit's convolutional layer produces an even more advanced feature map with 512 channels. The feature map is as follows: In this application, the batch normalization layer in each of the four channel transformation units is used to perform batch normalization on the feature map, the ReLU layer is used to perform activation on the feature map output by the batch normalization layer, and the max pooling layer is used to perform max pooling on the feature map output by the ReLU layer. In this application, the feature map output by the fourth channel transformation unit is a feature map with inter-class features in the source domain enhanced feature map and 512 channels. That is to say, after the source domain enhanced feature map is processed sequentially by the four channel transformation units in the teacher network, a feature map with inter-class features in the source domain enhanced feature map and 512 channels can be obtained.
[0067] In this application, the knowledge learned by the teacher network during the processing of the source domain augmented feature map is transferred to the student network through knowledge distillation. This allows the feature map obtained by the student network during the processing of the target domain augmented feature map to be mutually aligned (this alignment is distributional alignment) with the feature map obtained by the teacher network during the processing of the source domain augmented feature map. This results in higher similarity between the feature maps output by the teacher network and the student network. In this application, during the training of the hyperspectral remote sensing image classification network, the feature map obtained by the teacher network during the processing of the source domain augmented feature map is fed to the classifier.
[0068] In this application, the network structure of the student network is as follows: Figure 5As shown, the student network includes four sequentially connected dimension transformation units. Each of the four dimension transformation units includes a fully connected layer and a ReLU layer connected sequentially. The fully connected layer in the first dimension transformation unit extracts primary features from the feature map and transforms it from 1024 dimensions to 64 dimensions, resulting in a 64-dimensional feature map with primary features. The fully connected layer in the second dimension transformation unit extracts intermediate features from the feature map to enhance semantic information and transforms it from 64 dimensions to 128 dimensions, resulting in a 128-dimensional feature map rich in intermediate features. The fully connected layer in the third dimension transformation unit extracts high-level features from the feature map and transforms it from 128 dimensions to 256 dimensions, resulting in a 256-dimensional feature map with high-level features. The fully connected layer in the fourth dimension transformation unit extracts even higher-level features from the feature map and transforms it from 256 dimensions to 512 dimensions, resulting in a 512-dimensional feature map with even higher-level features. The ReLU layers in all four dimension transformation units are used to perform activation operations on the feature maps.
[0069] In this application, the graph alignment module includes branch I and branch II. Branch I and branch II have the same structure and function. The network structure of branch I is as follows: Figure 6 As shown; Branch I includes two sequentially connected graph convolutional layers, GraphSAGE. The first graph convolutional layer, GraphSAGE, is used to capture global spatial topological information (which is graph structure information), including the global relationships between nodes. The second graph convolutional layer, GraphSAGE, is used to capture more detailed local spatial topological information, including the local relationships between nodes. The URL for obtaining the graph convolutional layer GraphSAGE is: https: / / proceedings.neurips.cc / paper / 2017 / hash / 5dd9db5e033da9c6fb5ba83c7a7ebea9-Abstract.html. In this application, after the source domain enhanced feature map is processed sequentially by the two graph convolutional layers GraphSAGE in Branch I, a feature map with both global and local spatial topological information can be obtained.
[0070] Then, branch II processes the target domain augmented feature map. Through optimal transport, the feature map obtained by branch II in processing the target domain augmented feature map is aligned with the feature map obtained by branch I in processing the source domain augmented feature map (this alignment is graph alignment). This ensures that the feature map output by branch I and the feature map output by branch II are aligned. Figure 2 The features of the images are more similar to those of the images. In this application, during the training process of the hyperspectral remote sensing image classification network, the feature map output by branch I is fed to the classifier.
[0071] S3: Based on the total loss of the hyperspectral remote sensing image classification network, and using source domain sub-image pairs and target domain sub-image pairs to train the hyperspectral remote sensing image classification network model, the following steps are specifically included:
[0072] A pair of source domain sub-images and a pair of target domain sub-images are input into a hyperspectral remote sensing image classification network. The total loss of the hyperspectral remote sensing image classification network is calculated, and then the gradient is optimized and backpropagated to update the model parameters of the hyperspectral remote sensing image classification network, completing one epoch of training. In this application, for each epoch of training, a pair of source domain sub-images and a pair of target domain sub-images are input. During the training process of each epoch, the input source domain sub-image pairs are randomly selected from all source domain sub-image pairs, and the input target domain sub-images are also randomly selected from all target domain sub-images. In this application, the training is repeated for 500 epochs. The POCH process completes the training of one training segment. After one training segment is completed, the classifier outputs the classification category prediction result and classification accuracy. In the process of training the hyperspectral remote sensing image classification network in this application, the classification accuracy is calculated by comparing the source domain prediction result with the source domain label. The training segments are repeated until the classification accuracy of the next training segment is greater than that of the current training segment (the next training segment and the current training segment are two adjacent training segments). Then, the parameters of the hyperspectral remote sensing image classification network during the last epoch of the next training segment are saved as the final model parameters of the hyperspectral remote sensing image classification network, thus obtaining the hyperspectral remote sensing image classification network model.
[0073] In this application, the total loss of the hyperspectral remote sensing image classification network includes distribution alignment loss and distillation loss. Graph alignment loss Classification loss of teacher networks Classification loss of branch I and consistency constraint loss Specifically, as shown in equation (1):
[0074] = + + + + (1)
[0075] In equation (1), the distribution alignment and distillation loss This is used to calculate the loss from knowledge distillation and the loss from distribution alignment of the teacher and student networks, as well as the distribution alignment and distillation loss. The calculation method is shown in equation (2).
[0076] = α· +(1-α)· (2)
[0077] In equation (2), Indicates distillation loss, This represents the loss incurred from aligning the teacher network and student network distributions. α is a balancing parameter, which is set to 0.5 in this embodiment.
[0078] In equation (2), distillation loss This is used to calculate the loss incurred during the knowledge distillation process from the teacher network to the student network; distillation loss. The calculation method is shown in equation (3).
[0079] = (3)
[0080] In equation (3), and These represent the feature maps output by the teacher network and the student network, respectively. T It is the temperature coefficient. KL express KL divergence, S This represents the calculation using the softmax function with temperature parameters.
[0081] In Equation (2), the loss generated by the distribution alignment of the teacher network and the student network is... The calculation method is shown in equation (4).
[0082] = (4)
[0083] In equation (2), and Let represent the i-th feature map output by the teacher's network and the i-th feature map output by the student's network, respectively. N is the number of feature maps output by the teacher's network. In this application, the number of feature maps output by the student's network is the same as the number of feature maps output by the teacher's network. This indicates the second normal form computation.
[0084] In equation (1), the graph alignment loss This is used to calculate the loss generated by graph alignment between the source domain augmented feature map and the target domain augmented feature map; graph alignment loss. The calculation method is shown in equation (5):
[0085] (5)
[0086] In equation (5), Indicates the first The output of the graph convolutional layer, when When =0, This represents the alignment result between the source domain augmented feature map and the target domain augmented feature map; when When =1, This represents the features with source domain characteristics output by the first graph convolutional layer of branch I and the first graph convolutional layer of branch II, respectively. Figure I and features with target domain characteristics Figure I Alignment results between; when When =2, This represents the features with source domain characteristics output by the second graph convolutional layer of branch I and the second graph convolutional layer of branch II, respectively. Figure II and features with target domain characteristics Figure II The alignment results between them.
[0087] In this application form (5), The calculation method is the same as that of formula (7) published in the paper "Topological Structure and Semantic Information Transfer Network for Cross-Scene Hyperspectral ImageClassification";
[0088] In equation (1), This represents the classification loss of the teacher network, used to calculate the loss between the feature map output by the teacher network and its corresponding ground truth label, specifically the convolutional classification loss. The calculation method is shown in equation (7):
[0089] (7)
[0090] In equation (7), and Let represent the i-th feature map output by the teacher network and its corresponding ground truth label, respectively. S represents the calculation of the softmax function. This indicates the calculation of cross-entropy loss, and ns represents the number of feature maps output by the teacher network.
[0091] In equation (1), the classification loss of branch I is... The loss between the feature map output by branch I and its corresponding ground truth label is used to calculate the classification loss of branch I. The calculation method is shown in equation (8):
[0092] (8)
[0093] In equation (8), and Let represent the i-th feature map output from branch I and its corresponding ground truth label, respectively. S represents the calculation of the softmax function. This indicates the calculation of cross-entropy loss, and NS represents the number of feature maps output by branch I.
[0094] In equation (1), the consistency constraint loss The consistency constraint loss is used to calculate the difference between the probability prediction results obtained by the classifier from probabilistic predictions of the feature maps output by the teacher network and the feature maps output by branch I, respectively. The calculation method is shown in equation (9):
[0095] ( = (9)
[0096] In equation (9), where, C Indicates the number of categories. and These represent the probability prediction results of the classifier for the feature maps output by the teacher network and the feature maps output by branch I, respectively. ns represents the number of feature maps output by the teacher network. In this application, the number of feature maps output by the teacher network and branch I is the same.
[0097] S4. Fill each boundary of the hyperspectral remote sensing image to be classified and predicted with pixels of the same size, the size of which is 1 / 2 patch size plus 1. Then map the images to obtain image X. Divide image X into two sub-images of the same size to be predicted. These two sub-images form a pair of sub-images to be predicted. Then, input the pair of sub-images to be predicted into the hyperspectral remote sensing image classification network model obtained in step S3. The feature extraction network extracts features, and then the feature enhancement network enhances the features to obtain an enhanced feature map. Then, input the enhanced feature map into the classifier for classification prediction to obtain the image classification category prediction result and classification accuracy.
[0098] test:
[0099] To compare the classification performance of the hyperspectral remote sensing image classification method of this invention with seven existing hyperspectral image classification methods, namely SVM (from the paper "Support Vector Method of Classification"), DAN (from the paper "Learning transferable features with deep adaptation networks"), MRAN (from the paper "Deep subdomain adaptation network for image classification"), TSTnet (from the paper "Topological Structure and Semantic Information Transfer Network for Cross-Scene Hyperspectral Image Classification"), DSAN (from the paper "Deep subdomain adaptation network for image classification"), DAAN (from the paper "Deep subdomain adaptation network for image classification"), and CEGCN (from the paper "Deep subdomain adaptation network for image classification"), this application uses the aforementioned seven existing hyperspectral image classification methods and the remote sensing image classification method described in this application to perform classification tests on the image U obtained in step S1 of this application, and obtains test results such as classification accuracy CA, overall accuracy OA, and KAPPA coefficient, as shown in Table 2. During the classification test in this application, the image U is divided into two test sub-images of the same size. These two test sub-images constitute a test sub-image pair. Then, the test sub-image pair is input into the hyperspectral remote sensing image classification network model obtained in step S3. Features are extracted through the feature extraction network, and then the feature enhancement network is used to enhance the features to obtain an enhanced feature map. The enhanced feature map is then input into the classifier for classification prediction.
[0100] Table 1 shows the land cover categories in the HYRANK dataset and the number of Dioin and Loukia samples for each land cover category.
[0101]
[0102] The first column of Table 1 shows the 12 land cover categories in the HYRANK dataset. The second column of Table 1 shows the corresponding land cover categories. The number of samples in Dioin and Loukia for each land cover category is shown in the third and fourth columns of Table 1. The last row of Table 1, which records the total number, shows that the total number of samples for Dioin and Loukia are 20024 and 10317, respectively.
[0103] Table 2 shows the test results of classification accuracy (CA), overall accuracy (OA), and Kappa coefficient (KAPPA) obtained by different hyperspectral remote sensing image classification methods.
[0104]
[0105] In Table 2, the Ours method represents the hyperspectral remote sensing image classification method described in this application. The category numbers 1 to 12 recorded in the first column of Table 2 represent the 12 categories included in the HYRANK dataset, which are consistent with the 12 categories shown in the first column of Table 1. The DAN method, SVM method, MRAN method, TSTnet method, CEGCN method, DSAN method, DAAN method, and Ours method recorded in the first row of Table 2 represent different hyperspectral remote sensing image classification methods. The second to ninth columns and the third to fourteenth rows show the classification accuracy CA of the image U corresponding to each of the 12 land cover categories when using the eight hyperspectral remote sensing image classification methods, namely DAN method, SVM method, MRAN method, TSTnet method, CEGCN method, DSAN method, DAAN method, and Ours method, to predict the classification of the image U. The classification accuracy CA refers to the ratio between the number of correctly classified images U corresponding to a certain category obtained by a certain hyperspectral remote sensing image classification method and the total number of images U. The value of 11.66%, as shown at the intersection of the third row and the second column in Table 2, indicates that the classification accuracy CA obtained by testing the image U corresponding to land cover category 1 using the DAN method is 11.66%.
[0106] In Table 2, the second-to-last row represents the overall accuracy (OA), and the last row represents the Kappa coefficient (KAPPA). Higher classification accuracy (CA), overall accuracy (OA), and KAPPA coefficient indicate higher model classification accuracy. The overall accuracy (OA) is the ratio of the sum of all correctly classified samples output by the hyperspectral remote sensing image classification network model to the total number of test samples. The remote sensing image classification method described in this application has the highest accuracy compared to the seven existing hyperspectral remote sensing image classification methods mentioned above. Compared to the highest OA value (62.66%) achievable by the seven existing methods, the OA value obtained by the hyperspectral remote sensing image classification method described in this application is increased by ((0.6488-0.6266) / 0.6266)×100%=3.54%, indicating that this application has a more outstanding ability to correctly classify samples.
[0107] The KAPPA coefficient is a standardized accuracy metric that takes into account the accuracy of random classification. A KAPPA value closer to 1 indicates better classifier performance. Compared to the existing hyperspectral remote sensing image classification methods, the remote sensing image classification method described in this application achieves the highest KAPPA accuracy, with a KAPPA value of 0.5599. The KAPPA value obtained by the remote sensing image classification method described in this application is 10.92% higher than the highest KAPPA value achievable by the seven existing hyperspectral remote sensing image classification methods ((0.6012-0.5420) / 0.5420)×100%=10.92%. This indicates that the remote sensing image classification method described in this application achieves higher consistency in the classification categories obtained when classifying images.
[0108] Furthermore, Table 2 shows that the hyperspectral remote sensing image classification method described in this application achieves higher classification accuracy (CA) for images corresponding to land cover types 2 and 4 in the HYRANK dataset compared to the seven existing hyperspectral remote sensing image classification methods. Specifically, when classifying and predicting the image U corresponding to land cover type 2, the hyperspectral remote sensing image classification method described in this application improves the classification accuracy (CA) by ((0.5378-0.4344) / 0.4344)×100%=23.80% compared to the highest classification accuracy (CA) obtained by the seven existing hyperspectral remote sensing image classification methods. The hyperspectral remote sensing image classification method described in this application improves the classification accuracy CA of image U corresponding to the fourth type of land cover by ((0.2407-0.1177) / 0.1177)×100%=104.50% compared with the highest classification accuracy CA obtained by the seven existing hyperspectral remote sensing image classification methods. This indicates that the hyperspectral remote sensing image classification method described in this application has significant classification accuracy for the second and fourth types of land cover in the HYRANK dataset, especially for the fourth type of land cover in the HYRANK dataset.
Claims
1. A hyperspectral remote sensing image classification method based on spatial topology and inter-class features, characterized in that: Specifically comprising the following steps: S1: obtaining source domain sub-image pairs and target domain sub-image pairs for training; S2: constructing a hyperspectral remote sensing image classification network, the hyperspectral remote sensing image classification network comprising a feature extraction network, a domain alignment network and a classifier connected in sequence; wherein the feature extraction network is used for extraction of global features and local features, the domain alignment network is used for realizing distribution alignment and graph alignment, and the classifier is used for predicting a classification result; wherein the domain alignment network comprises a feature enhancement network, and a distribution alignment module and a graph alignment module connected with the output end of the feature enhancement network respectively, the distribution alignment module comprises a teacher network and a student network, the graph alignment module comprises branch I and branch II, the input end of the teacher network and the input end of branch I are both connected with the output end of the feature enhancement network, and the source domain enhanced feature map output by the feature enhancement network is taken as the input of the teacher network and branch I; the input end of the student network and the input end of branch II are both connected with the output end of the feature extraction network, and the target domain enhanced feature map output by the feature enhancement network is taken as the input of the student network and branch II; the output end of the teacher network and the output end of branch I are both connected with the input end of the classifier; wherein the knowledge learned by the teacher network is transmitted to the student network in a manner of knowledge distillation, so that the feature map obtained by the student network can be mutually aligned with the feature map obtained by the teacher network, and the mutual alignment is distribution alignment; through optimal transportation, the feature map obtained by branch II is mutually aligned with the feature map obtained by branch I, and the mutual alignment is graph alignment; S3: training the hyperspectral remote sensing image classification network based on the total loss of the hyperspectral remote sensing image classification network and using the source domain sub-image pairs and the target domain sub-image pairs, to obtain a hyperspectral remote sensing image classification network model; S4, fill the same size of pixels on each boundary of the hyperspectral remote sensing image to be classified and predicted, the size of the filled pixels is 1 / 2 patch size plus 1, then perform mapping to obtain an image X, divide the image X to obtain a to-be-predicted sub-image pair, then input the to-be-predicted sub-image pair into the hyperspectral remote sensing image classification network model, sequentially pass through the feature extraction network and the feature enhancement network for processing, and then pass through the classifier for classification and prediction, so as to obtain an image classification category prediction result and a classification accuracy.
2. The hyperspectral remote sensing image classification method based on spatial topology and inter-class features according to claim 1, characterized in that: Step S1 specifically comprises the following steps: obtaining a hyperspectral remote sensing image dataset, dividing a source hyperspectral remote sensing image and a target hyperspectral remote sensing image according to scenes in the hyperspectral remote sensing image dataset; and pre-processing the source hyperspectral remote sensing image and the target hyperspectral remote sensing image to obtain images S, T and U, and then obtaining source domain sub-image pairs and target domain sub-image pairs based on the images S and T respectively. 3.The hyperspectral remote sensing image classification method based on spatial topology and inter-class features according to claim 1, characterized in that: In step S2, the feature extraction network comprises a Mamba branch and a convolution branch; an input end of the Mamba branch and an input end of the convolution branch are connected, and an output end of the Mamba branch and an output end of the convolution branch are both connected with a Concat layer, the Concat layer is sequentially connected with a first 2D convolution layer and a first Add layer, and an input end of the first Add layer is also connected with the input end of the convolution branch and the input end of the Mamba branch.
4. The hyperspectral remote sensing image classification method based on spatial topology and inter-class features according to claim 3, characterized in that: In step S2, the Mamba branch comprises a first normalization layer, a first linear layer, a depth separable convolution layer, a first SiLU layer, a 2D selective scanning module, a second normalization layer and an element-wise multiplication module which are sequentially connected; an output end of the first normalization layer is also sequentially connected with a second linear layer and a second SiLU layer, an output end of the second SiLU layer is connected with an input end of the element-wise multiplication module, and the element-wise multiplication unit is also sequentially connected with a third linear layer and a second Add layer; an input end of the first normalization layer is also connected with an input end of the second Add layer.
5. The hyperspectral remote sensing image classification method based on spatial topology and inter-class features according to claim 3, characterized in that: In step S2, the convolution branch comprises a second 2D convolution layer, a first RELU layer, a third 2D convolution layer, a second RELU layer and a fourth 2D convolution layer which are sequentially connected; an input end of the second 2D convolution layer in the convolution branch is connected with an input end of the first normalization layer in the Mamba branch, and an output end of the fourth 2D convolution layer and an output end of the second Add layer are both connected with the Concat layer; an input end of the second 2D convolution layer is also connected with an input end of the first Add layer. 6.The method of claim 1, wherein: In step S2, the teacher network comprises four channel conversion units which are sequentially connected, and each channel conversion unit comprises a convolution layer, a batch normalization layer, a ReLU layer and a max pooling layer which are sequentially connected; the convolution kernel size of the convolution layer in the first channel conversion unit is 7x7, and the convolution kernel size of the convolution layer in the second channel conversion unit, the convolution kernel size of the convolution layer in the third channel conversion unit and the convolution kernel size of the convolution layer in the fourth channel conversion unit are all 3x3.
7. The method of claim 1, wherein the method further comprises: In step S2, the student network comprises four dimension conversion units which are sequentially connected, and each dimension conversion unit comprises a full connection layer and a ReLU layer which are sequentially connected. 8.The method of claim 1, wherein: In step S2, the branch I and the branch II have the same structure and the same function; the branch I comprises two graph convolution layers which are sequentially connected, wherein the first graph convolution layer is used for capturing global spatial topological structure information, and the second graph convolution layer is used for capturing more detailed local spatial topological structure information. 9.The hyperspectral remote sensing image classification method based on spatial topology and inter-class features according to claim 1, characterized in that: In step S2, the feature enhancement network comprises a fifth 2D convolution layer, a GELU layer, a sixth 2D convolution layer and a channel segmentation layer connected in sequence, the output end of the channel segmentation layer is connected with four depth separable convolution layers, the output ends of the four depth separable convolution layers are connected with a Concat layer, the Concat layer is connected with a seventh 2D convolution layer and an Add layer in sequence, and the input end of the Add layer is also connected with the input end of the fifth 2D convolution layer; wherein the convolution kernel size of the fifth 2D convolution layer is 3*3, and the convolution kernel size of the sixth 2D convolution layer and the seventh 2D convolution layer is 1*1; the feature enhancement network is used for enhancing the local spatial information and the global spatial information in the feature map output by the feature extraction network. 10.The hyperspectral remote sensing image classification method based on spatial topology and inter-class features according to claim 1, characterized in that: Step S3 specifically comprises the following steps: inputting a pair of source domain sub-images and a pair of target domain sub-images into the hyperspectral remote sensing image classification network, calculating the total loss of the hyperspectral remote sensing image classification network, then optimizing the gradient and performing reverse propagation, updating the model parameters of the hyperspectral remote sensing image classification network, and completing one epoch of training; repeating the training for 500 epochs to complete one training section of training, after one training section is completed, the classifier outputs a classification category prediction result and a classification accuracy; repeating the training of the training section until the classification accuracy output by the next training section is greater than the classification accuracy of the current training section, then saving the parameters of the hyperspectral remote sensing image classification network in the last epoch training process of the next training section as the final model parameters, and obtaining the hyperspectral remote sensing image classification network model.
Citation Information
Patent Citations
Federal domain adaptation method and system based on knowledge distillation
CN115761408A
Cross-domain remote sensing image scene classification method based on rotation robust feature subclass center alignment
CN116152671A