Hyperspectral image cross-scene classification method based on bidirectional attention mechanism
By combining a bidirectional attention mechanism and knowledge distillation technology, the spectral shift problem in cross-scene classification of hyperspectral remote sensing images was solved, achieving efficient cross-scene land cover classification and feature alignment, and improving the accuracy and efficiency of land cover feature extraction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING INST OF TECH
- Filing Date
- 2024-05-29
- Publication Date
- 2026-07-24
AI Technical Summary
Existing hyperspectral remote sensing image classification models suffer from spectral shift issues in cross-scene applications, causing training and test data to not satisfy the independent and identically distributed assumption, making it difficult to achieve accurate cross-scene land cover classification.
We employ a hyperspectral image cross-scene classification method based on a bidirectional attention mechanism. By constructing a semantic token parser and a transformer framework, we design a bidirectional attention mechanism and knowledge distillation technique to achieve information interaction and feature alignment between the source and target domains, thereby reducing distribution differences.
It improves the accuracy and extraction efficiency of cross-scene land cover classification, breaks through the learning capacity limit of traditional attention mechanisms, and achieves bidirectional domain adaptation of the feature layer, making it suitable for extracting land cover features at both coarse and fine granular levels.
Smart Images

Figure CN118552853B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of image processing technology, specifically relating to a hyperspectral image cross-scene classification method based on a bidirectional attention mechanism. Background Technology
[0002] Hyperspectral remote sensing images are images with nanometer-level spectral resolution. They are created by sampling in the visible to short-wave infrared bands, with each band having a spectral resolution of only a few nanometers, simultaneously imaging ground features in tens to hundreds of bands. This allows for the acquisition of rich spectral information while obtaining spatial information about ground features. Hyperspectral remote sensing image classification technology achieves accurate classification of ground features by fully utilizing both spatial and spectral information.
[0003] Compared to the deterministic nature of a single scene in hyperspectral image classification, the evaluation area in real-world tasks often exhibits scene uncertainty, limiting the construction of features for land cover attribute detection within the context of the current scene. For example, investigators conduct field surveys over large areas and collect airborne images using airborne imaging systems. Typically, airborne pushbroom hyperspectral imagers acquire hyperspectral images. Data acquisition over large areas often takes days or weeks, meaning the acquired data may vary depending on lighting conditions (i.e., sunny or partially cloudy), leading to significant differences in spectral characteristics for the same land cover category—a phenomenon known as spectral shift. Because training and test data differ in acquisition area, capture time, and sensor platform, it's difficult to satisfy the independent and identically distributed assumption, resulting in high generalization errors and poor interpretation performance for traditional models across different scenes.
[0004] To solve the problem of cross-scene land cover classification, it is necessary to design a feature alignment strategy suitable for hyperspectral images, reduce the distribution difference between the source and target domains, realize the transformation and utilization of source domain information to target domain information, accurately capture the feature information of land cover in the target scene, and thus achieve accurate land cover classification and complete fine mapping. Summary of the Invention
[0005] In order to solve the technical problems existing in the background art, the present invention aims to provide a hyperspectral image cross-scene classification method based on a bidirectional attention mechanism, which is applicable to both coarse-grained and fine-grained cross-domain classification tasks, and maintains high extraction accuracy and low computational complexity in cross-domain prediction.
[0006] To solve the technical problem, the technical solution of the present invention is as follows:
[0007] A hyperspectral image cross-scene classification method based on a bidirectional attention mechanism, the method comprising:
[0008] S1: Select source scene data and labels, as well as target scene data, to construct a training set;
[0009] S2: Construct a semantic token parser, input spatial-spectral projection to obtain semantic tokens for the source and target domains;
[0010] S3: Construct source domain and target domain branches, and input the semantic token to obtain semantic token representations and classification token representations of the source domain and target domain;
[0011] S4: Merge the semantic tokens of the source and target domains, and obtain the coupled token representation from the input coupling branch;
[0012] S5: Calculate the loss function using the source domain, target domain, and coupled semantic token representation and classification token representation, which is then used to train the network model;
[0013] S6: The trained network is used in the target scene to perform panoramic reasoning and achieve fine recognition of ground features in the target scene.
[0014] Furthermore, step S1 includes:
[0015] Step 101: Select two hyperspectral remote sensing images of a large forest area at different times;
[0016] Step 102: Use one image as the source domain and the other image as the target domain, and select all labeled samples in the source domain and unlabeled samples in the target domain to construct a training set.
[0017] Furthermore, step S2 includes:
[0018] Step 201: Construct a semantic token parser, which consists of a 3D convolution, two 2D convolutions, and a spatial-spectral projection operation;
[0019] Step 202: Input the training set, obtain the spatial-spectral projection matrix through a 3D convolution and a 2D convolution, and obtain the semantic tokens of the source domain and the target domain through projection and a 2D convolution;
[0020] Furthermore, step S3 includes:
[0021] Step 301: Construct source domain and target domain feature extraction branches. The source domain branch and target domain branch have the same structure and are both built based on the transformer framework. The self-attention mechanism is used to complete the information interaction within the domain.
[0022] Step 302: Input the semantic token, construct a self-learning category token and merge it with the semantic token, and obtain the semantic token representation and category token representation of the source domain and target domain respectively through the source domain branch and the target domain branch.
[0023] Furthermore, step S4 includes:
[0024] Step 401: Construct a coupled feature extraction branch, which is built based on the transformer framework, in which a bidirectional attention mechanism is designed to complete bidirectional information interaction between domains;
[0025] Step 402: Input the semantic token, merge the semantic tokens of the source domain and the target domain, and obtain the coupled semantic token representation and the coupled classification token representation through the coupling branch.
[0026] Furthermore, step S5 includes:
[0027] Step 501: Input the source domain, target domain, and coupled semantic token representation and classification token representation. Update the weights by backpropagating the gradient through the loss function. The overall network loss function is as follows:
[0028] L total =L ce +λ1(L LMMD +L Bi-distill (1)
[0029] Among them, L ce The cross-entropy loss, L, is calculated from the source domain classification token representation and label. LMMD L represents the local maximum mean difference loss, calculated from the semantic token representations of the source and target domains described above. Bi-distill The bidirectional distillation loss is represented by the source domain, target domain, and coupled classification token characterization described above.
[0030] Step 502: After training is complete, save the network parameters that have been debugged.
[0031] Furthermore, step S6 includes:
[0032] Step 601: All labeled samples in the target domain data are used as the test dataset and input into the trained network to obtain the hyperspectral image land cover feature classification results;
[0033] Step 602: Input the full target scene map into the trained network to obtain the complete ground feature extraction results.
[0034] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the hyperspectral image cross-scene classification method based on the bidirectional attention mechanism described above.
[0035] A computer-readable storage medium storing a computer program that, when executed by a processor, implements any of the above-described hyperspectral image cross-scene classification methods based on a bidirectional attention mechanism.
[0036] This invention proposes a hyperspectral image cross-scene classification method based on a bidirectional attention mechanism; it designs a bidirectional attention mechanism and a spatial-spectral semantic token parser, and employs knowledge distillation technology. Compared with existing technologies, the advantages of this invention are:
[0037] (1) This invention fully considers the differences between single elements and multiple elements in cross-domain classification tasks, and proposes a complete hyperspectral image cross-scene ground feature recognition model. The purpose of this method is to alleviate the multi-dimensional differences of similar species under cross-temporal conditions. It can perform coarse-grained or fine-grained ground feature extraction work on hyperspectral images of different regions or different temporal phases, which greatly improves the efficiency of ground feature extraction in large scenes.
[0038] (2) Compared with the traditional attention mechanism, the bidirectional attention mechanism proposed in this invention fully considers the information interaction between different domains in cross-domain classification, breaks through the upper limit of the traditional attention mechanism's ability to learn inter-domain invariant representations, and realizes bidirectional domain adaptation of the feature layer;
[0039] (3) The bidirectional distillation loss proposed in this invention is more suitable for multi-branch domain adaptive models than existing knowledge distillation techniques. It treats the predicted probability distribution of coupled branches as soft labels, realizes bidirectional supervision of source branches and target branches, and strengthens the extraction of domain-invariant representations. Attached Figure Description
[0040] Figure 1 Flowchart of the hyperspectral image cross-scene classification method based on bidirectional attention mechanism of the present invention;
[0041] Figure 2 A diagram of the semantic token parser constructed in this invention;
[0042] Figure 3 Flowchart of the semantic token parser designed in this invention;
[0043] Figure 4 The source domain branch structure diagram designed in this invention;
[0044] Figure 5 The coupled branch structure diagram constructed in this invention;
[0045] Figure 6 1. Schematic diagram of the input and output for loss calculation in this invention;
[0046] Figure 7 HyRANK dataset color maps and ground truth maps;
[0047] Figure 8 The training model in the example demonstrates the detailed identification results of ground feature information in the target scene. Detailed Implementation
[0048] The specific implementation of the present invention is described below with reference to embodiments:
[0049] It should be noted that the structures, proportions, sizes, etc. shown in this specification are only used to complement the content disclosed in the specification for those skilled in the art to understand and read, and are not intended to limit the conditions under which the present invention can be implemented. Any modifications to the structure, changes in the proportions, or adjustments to the size, without affecting the effects and objectives that the present invention can produce, should still fall within the scope of the technical content disclosed in the present invention.
[0050] Furthermore, the terms such as "upper," "lower," "left," "right," "middle," and "one" used in this specification are merely for clarity of description and are not intended to limit the scope of the invention. Any changes or adjustments to their relative relationships, without substantially altering the technical content, should also be considered within the scope of the invention.
[0051] Example 1:
[0052] like Figure 1 As shown, a hyperspectral image cross-scene classification method based on a bidirectional attention mechanism includes the following steps:
[0053] Step 1: Select source scene data and labels, as well as target scene data, to construct a training set;
[0054] Step 2: Construct a semantic token parser, and obtain the semantic token from the input spatial-spectral projection;
[0055] Step 3: Construct source and target domain branches, and obtain token representations by inputting semantic tokens;
[0056] Step 4: Merge the semantic tokens of the source and target domains, and obtain the coupled token representation from the input coupling branch;
[0057] Step 5: Calculate the loss function using source and target domain token representations, as well as coupled token representations, for training the model;
[0058] Step 6: Apply the trained network to the target scene to perform panoramic reasoning and achieve fine recognition of the target scene's ground feature information.
[0059] Specifically, step 1 includes the following steps:
[0060] Step 1.1: Select two images from different regions and time phases from a large-area hyperspectral image of a forest farm;
[0061] Step 1.2: Use one image as the source domain and the other image as the target domain. Select all labeled samples from the source domain and unlabeled samples from the target domain to construct a training set, where the sample size is set to 13×13.
[0062] Specifically, step 2 includes the following steps:
[0063] Step 2.1: Construct a semantic token parser. This involves extracting the spatial-spectral projection matrix through a sequential concatenation of 3D and 2D convolutions. The 3D convolution model the correlation of the spectral dimension to obtain depth spectral features, while the 2D convolution mines semantic information from the spatial dimension to obtain the spatial-spectral projection matrix. A softmax function is then used on the projection matrix to compute a spatial-spectral attention map, which is applied to each pixel in the sample. Finally, the input is fed into a 1×1 2D convolution module to complete the dimension mapping, resulting in a semantic token T of size L. s / t The semantic token parser structure diagram is as follows: Figure 2 As shown;
[0064] Step 2.2: Input the training set samples from Step 1.2 to obtain semantic tokens for the source and target domains. The flowchart of the semantic token parser is as follows. Figure 3 As shown;
[0065] Specifically, step 3 includes the following steps:
[0066] Step 3.1: Construct the source domain and target domain feature extraction branches, as shown in the specific structure diagram below. Figure 4 As shown. This feature extraction branch is based on the transformer and consists of a linear projection layer, a multi-head self-attention module, an addition & normalization module, and a feedforward network, according to... Figure 4 The order of the modules in the middle is as follows: linear projection layer - multi-head self-attention module - summation & normalization module - feedforward network - summation & normalization module;
[0067] Step 3.2: Semantic tokens T for the source and target domains in Step 2.2 s / t With self-learning category token T cls The tokens are then merged, with separate inputs for the source and target domain branches. First, the tokens are fed into three linear projection layers to compute the triplet set (Q, K, and V). Then, a multi-head self-attention module mines the intra-domain correlations within the token sequence to obtain semantic token representations for the source and target domains. and classification token representation
[0068] Specifically, step 4 includes the following steps:
[0069] Step 4.1: Construct the coupled feature extraction branch, the specific structure diagram is as follows. Figure 5As shown. This feature extraction branch is based on the transformer and consists of a linear projection layer, a multi-head bidirectional attention module, an addition & normalization module, and a feedforward network, according to... Figure 5 The order of the modules in the middle is as follows: linear projection layer - multi-head bidirectional attention module - source domain and target domain splitting - summation & normalization module (×2) - feedforward network (×2) - summation & normalization module (×2);
[0070] Step 4.2: Combine the semantic tokens from the source and target domains from Step 2.2 and input them into three linear projection layers to compute the triplet set (Q). st K st and V st The coupled semantic token representation is obtained through the coupled branch. and and coupled classification token representation and
[0071] Specifically, step 5 includes the following steps:
[0072] Step 5.1: Input / output diagram for loss calculation is shown below. Figure 6 As shown, the classification tokens output from the source domain branch in step 3.2 are represented by a fully connected layer. To the label space, this fully connected layer consists of another fully connected layer and a one-dimensional batch normalization layer, with the output dimension set to the number of classes. The input softmax is used to obtain the predicted probabilities, and the cross-entropy loss is calculated.
[0073]
[0074] Where y s,i It is x s,i The one-hot tag encoding, where c is the category index, q s,i It is the predicted probability, n s This indicates the number of samples in the source domain.
[0075] Step 5.2: Input the semantic token representations of the source and target domains, as well as the coupled semantic token representations, from Steps 3.2 and 4.2, and calculate the local maximum mean difference loss:
[0076]
[0077] in and
[0078] They are and The i-th and j-th vectors and It belongs to category c. and The weight is calculated using the following formula:
[0079]
[0080] Where y ic It is a vector y i The c-th element. Here, the one-hot truth label vector of the source domain is used as y. i This is used to calculate the weights. However, in unsupervised domain adaptation training, due to the lack of available target domain labels, it is necessary to treat the predicted probability of the target branch output as y. i Calculate the local maximum mean difference loss among the source branch, target branch, and coupled branches:
[0081]
[0082] Step 5.3: Design a bidirectional distillation loss based on the idea of distillation learning. Input the source domain, target domain, and coupled classification token representation from steps 3.2 and 4.2, and then... and probability distribution and This is considered a soft label. The distillation loss of the source domain is calculated as follows:
[0083]
[0084] The distillation loss in the target domain is calculated as follows:
[0085]
[0086] Calculate the losses during two-way distillation:
[0087]
[0088] Step 5.4: Integrate the above loss functions and calculate the overall network loss function as follows:
[0089] L total =L ce +λ1(L LMMD +L Bi-distill (8)
[0090] Step 5.5: Begin training the network model. At the beginning of each training round, all training images are input into the network. The network adjusts its parameters according to the direction that minimizes the loss function value until the loss value is minimized, at which point the best training effect can be obtained.
[0091] Step 5.6: Save the network model parameters after training is complete.
[0092] Specifically, step 6 includes the following sub-steps:
[0093] Step 6.1: Load the network model parameters, take all the label samples in the target domain data divided in Step 1.2 as the test dataset, input them into the network to obtain the classification results of the hyperspectral image test dataset;
[0094] Step 5.2: Create 13×13 samples pixel by pixel from the entire target scene image, input them into the network to finally obtain the complete and detailed recognition results of the target scene's ground feature information.
[0095] Example 2:
[0096] The HyRANK hyperspectral image dataset was used, which consists of satellite hyperspectral images collected by the Hyperion sensor (EO-1, USGS) with 176 spectral bands. Two labeled scenes, Dioni and Loukia, are included, each consisting of 250×1376 pixels and 249×945 pixels respectively, with twelve common categories. Dioni serves as the source domain and Loukia as the target domain. The HyRANK dataset color images and ground truth images are shown below. Figure 7 As shown. The results of the fully trained network model for detailed identification of ground features in the target scene are as follows. Figure 8 As shown.
[0097] Example 3:
[0098] This invention provides a terminal device, which includes a processor and a memory. The memory stores a computer program, which includes program instructions. The processor executes the program instructions stored in the computer storage medium. The processor may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing and control core of the terminal, suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions to achieve a corresponding method flow or function. The processor described in this embodiment can be used for the operation of a hyperspectral image cross-scene classification method based on a bidirectional attention mechanism, including the following steps:
[0099] Step 1: Select source scene data and labels, as well as target scene data, to construct a training set;
[0100] Step 2: Construct a semantic token parser, and obtain the semantic token from the input spatial-spectral projection;
[0101] Step 3: Construct source and target domain branches, and obtain token representations by inputting semantic tokens;
[0102] Step 4: Merge the semantic tokens of the source and target domains, and obtain the coupled token representation from the input coupling branch;
[0103] Step 5: Calculate the loss function using source and target domain token representations, as well as coupled token representations, for training the model;
[0104] Step 6: Apply the trained network to the target scene to perform panoramic reasoning and achieve fine recognition of the target scene's ground feature information.
[0105] Example 4:
[0106] This invention also provides a storage medium, specifically a computer-readable storage medium (Memory), which is a memory device in a terminal device used to store programs and data. It is understood that the computer-readable storage medium here can include both the built-in storage medium in the terminal device and extended storage media supported by the terminal device. The computer-readable storage medium provides storage space that stores the terminal's operating system. Furthermore, this storage space also stores one or more instructions suitable for loading and execution by a processor; these instructions can be one or more computer programs (including program code). It should be noted that the computer-readable storage medium here can be high-speed RAM or non-volatile memory, such as at least one disk storage device.
[0107] One or more instructions stored in a computer-readable storage medium can be loaded and executed by a processor to implement the corresponding steps of the hyperspectral image cross-scene classification method based on the bidirectional attention mechanism in the above embodiments; one or more instructions in the computer-readable storage medium are loaded and executed by the processor in the following steps:
[0108] Step 1: Select source scene data and labels, as well as target scene data, to construct a training set;
[0109] Step 2: Construct a semantic token parser, and obtain the semantic token from the input spatial-spectral projection;
[0110] Step 3: Construct source and target domain branches, and obtain token representations by inputting semantic tokens;
[0111] Step 4: Merge the semantic tokens of the source and target domains, and obtain the coupled token representation from the input coupling branch;
[0112] Step 5: Calculate the loss function using source and target domain token representations, as well as coupled token representations, for training the model;
[0113] Step 6: Apply the trained network to the target scene to perform panoramic reasoning and achieve fine recognition of the target scene's ground feature information.
[0114] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0115] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0116] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0117] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0118] Those skilled in the art will recognize that the embodiments described herein are intended to help the reader understand the implementation methods of the present invention, and should be understood that the scope of protection of the present invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific modifications and combinations based on the technical teachings disclosed in this invention without departing from the spirit of the invention, and these modifications and combinations are still within the scope of protection of the present invention.
[0119] The preferred embodiments of the present invention have been described in detail above. However, the present invention is not limited to the above embodiments. Within the scope of knowledge possessed by those skilled in the art, various changes can be made without departing from the spirit of the present invention.
[0120] Many other changes and modifications can be made without departing from the concept and scope of this invention. It should be understood that this invention is not limited to the specific embodiments, and the scope of this invention is defined by the appended claims.
Claims
1. A hyperspectral image cross-scene classification method based on a bidirectional attention mechanism, characterized in that, The method includes: S1: Select source scene data and labels, as well as target scene data, to construct a training set; S2: Construct a semantic token parser, input spatial-spectral projection to obtain semantic tokens for the source and target domains; S3: Construct source domain and target domain branches, and input the semantic token to obtain semantic token representations and classification token representations of the source domain and target domain; S4: Merge the semantic tokens of the source and target domains, and obtain the coupled token representation from the input coupling branch; S5: Calculate the loss function using the source domain, target domain, and coupled semantic token representation and classification token representation, which is then used to train the network model; S6: Use the trained network for the target scene to perform panoramic reasoning and achieve fine recognition of ground features in the target scene. Step S3 includes: Step 301: Construct source domain and target domain feature extraction branches. The source domain branch and target domain branch have the same structure and are both built based on the transformer framework. The self-attention mechanism is used to complete the information interaction within the domain. Step 302: Input the semantic token, construct a self-learning category token and merge it with the semantic token, and obtain the semantic token representation and category token representation of the source domain and target domain respectively through the source domain branch and the target domain branch; Step S4 includes: Step 401: Construct a coupled feature extraction branch, which is built based on the transformer framework, in which a bidirectional attention mechanism is designed to complete bidirectional information interaction between domains; Step 402: Input the semantic token, merge the semantic tokens of the source domain and the target domain, and obtain the coupled semantic token representation and the coupled classification token representation through the coupling branch; Step S5 includes: Step 501: Input the source domain, target domain, and coupled semantic token representation and classification token representation. Update the weights by backpropagating the gradient through the loss function. The overall network loss function is as follows: (1) in, The cross-entropy loss is calculated from the source domain classification token representation and label. This represents the local maximum mean difference loss, calculated from the semantic token representations of the source and target domains described above. The bidirectional distillation loss is represented by the source domain, target domain, and coupled classification token characterization described above. Step 502: After training is complete, save the network parameters that have been debugged.
2. The hyperspectral image cross-scene classification method based on bidirectional attention mechanism according to claim 1, characterized in that, Step S1 includes: Step 101: Select two hyperspectral remote sensing images of a large forest area at different times; Step 102: Use one image as the source domain and the other image as the target domain, and select all labeled samples in the source domain and unlabeled samples in the target domain to construct a training set.
3. The hyperspectral image cross-scene classification method based on bidirectional attention mechanism according to claim 1, characterized in that, Step S2 includes: Step 201: Construct a semantic token parser, which consists of a 3D convolution, two 2D convolutions, and a spatial-spectral projection operation; Step 202: Input the training set, obtain the spatial-spectral projection matrix through a 3D convolution and a 2D convolution, and obtain the semantic tokens of the source and target domains through projection and a 2D convolution.
4. The hyperspectral image cross-scene classification method based on bidirectional attention mechanism according to claim 1, characterized in that, Step S6 includes: Step 601: All labeled samples in the target domain data are used as the test dataset and input into the trained network to obtain the hyperspectral image land cover feature classification results; Step 602: Input the full target scene map into the trained network to obtain the complete ground feature extraction results.
5. A computer device, characterized in that, The method includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the hyperspectral image cross-scene classification method based on the bidirectional attention mechanism as described in any one of claims 1 to 4.
6. A computer-readable storage medium, characterized in that, A computer program is stored on a computer-readable storage medium, which, when executed by a processor, implements the hyperspectral image cross-scene classification method based on a bidirectional attention mechanism as described in any one of claims 1-4.