Hyperspectral image classification method and system based on MSST model, and storage medium

By using the MSST model's encoding and decoding modules to extract spatial and spectral features of hyperspectral images in parallel, and leveraging the Transformer's global spectral spatial self-attention mechanism, the problem of insufficient information utilization in hyperspectral image classification is solved, achieving higher classification accuracy and accurate extraction of edge information.

CN120808169AInactive Publication Date: 2025-10-17QINGDAO AGRI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510999286.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-21
Publication Date
2025-10-17
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing technologies struggle to fully utilize global information in hyperspectral image classification, especially detailed information in edge regions, and lack effective extraction and utilization of spectral information, resulting in low classification accuracy.

Method used

A method based on the MSST model is adopted, which extracts spatial and spectral features of hyperspectral images in parallel through the encoding and decoding modules, and integrates multi-layer features through the decoder. It utilizes the global spectral spatial self-attention mechanism of Transformer, which is more comprehensive, especially in the extraction of edge information, and avoids information distortion.

Benefits of technology

It improves the classification accuracy of hyperspectral images, achieves full fusion of spectral spatial information, significantly enhances the ability to identify the boundaries of complex images and the model's sensitivity to subtle spectral differences, and solves the problem of insufficient information utilization in traditional methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120808169A_ABST
    Figure CN120808169A_ABST
Patent Text Reader

Abstract

The invention discloses a hyperspectral image classification method and system based on an MSST model, and a storage medium, and belongs to the field of image processing. The invention discloses a hyperspectral image classification method based on an MSST model. The method comprises the following steps: S1, obtaining a hyperspectral remote sensing image; s2, constructing an MSST network, and training the MSST network by using the acquired hyperspectral remote sensing image to obtain an MSST model; and S3, obtaining a classification result of the to-be-classified hyperspectral image. The hyperspectral image processing method solves the problems that in the prior art, spectral information in an image cannot be extracted and utilized, and a hyperspectral image containing rich spectral information is difficult to process, the coding and decoding module based on Transform extracts spatial features and spectral features of the hyperspectral image in parallel, multiple layers of features are integrated through a decoder, and the processing efficiency of the hyperspectral image is improved. Rich spectral domain information of the hyperspectral image is fully utilized, and classification precision of the hyperspectral image is improved while classification of the hyperspectral image is realized.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application relates to the technical field of image processing, and particularly relates to a hyperspectral image classification method and system based on an MSST model and a storage medium. BACKGROUND

[0002] Remote sensing images are widely used in natural resource management, urban planning and other fields. Compared with multispectral and ordinary RGB images, hyperspectral images provide more abundant spatial information and spectral information. In the remote sensing image classification task, the hyperspectral image can provide more fine ground feature information and ground object spectral information, and therefore is more and more welcomed by researchers.

[0003] Traditional algorithms for classification such as support vector machines and K-nearest neighbor algorithms can achieve good classification effects in most tasks, but important information is often lost when facing high-dimensional data such as hyperspectral images. Meanwhile, the traditional methods have the shortcomings of insufficient feature extraction and difficulty in migrating to new scenes, which directly affect the final classification result. In order to solve these problems, classification methods based on deep learning emerge as the times require. Among them, the convolutional neural network (CNN) is widely used in image classification due to its excellent feature extraction ability and strong model generalization ability. Although the CNN achieves better classification effect than the traditional algorithm, when the image is input into the network, the CNN only extracts local information and does not fully utilize the global information, especially the details of the edge region. In view of this shortcoming, the Transformer is found by researchers and used in the image classification task due to its strong global feature information extraction ability, and various methods based on the Transformer emerge as the times require, but most of them are for the analysis of image spatial information, lack of extraction and utilization of spectral information in the image, and are difficult to process the hyperspectral image containing rich spectral information. Therefore, the existing demands are not met, and the hyperspectral image classification method and system based on the MSST model and the storage medium are proposed. SUMMARY

[0004] The application aims to provide a hyperspectral image classification method and system based on an MSST model and a storage medium. The spatial features and spectral features of the hyperspectral image are extracted through an encoding and decoding module, and the multi-layer features are integrated through a decoder. The rich spectral domain information of the hyperspectral image is fully utilized, the classification of the hyperspectral image is realized, and the classification precision is improved. By using the multi-layer Transformer-based encoder, the global spectral spatial self-attention mechanism is adopted, the spatial information extraction, especially the edge information, is more comprehensive, the edge region information distortion problem is avoided, the classification precision is improved, the hyperspectral image classification task of spectral spatial information fusion is realized, and the problems in the above background technology are solved.

[0005] To achieve the above object, the application provides the following technical scheme: a hyperspectral image classification method based on an MSST model, comprising the following steps:

[0006] S1: obtaining a hyperspectral remote sensing image from the hyperspectral data sets disclosed by IndiaPines and PaviaUniversity;

[0007] S2: constructing an MSST network, training the MSST network by using the obtained hyperspectral remote sensing image, and obtaining an MSST model;

[0008] S3: inputting a hyperspectral image to be classified into the MSST model to obtain a classification result of the hyperspectral image to be classified.

[0009] Preferably, the MSST network is constructed, the MSST network is trained by using the obtained hyperspectral remote sensing image, and the MSST model is obtained, and specifically comprises the following steps:

[0010] The principal component analysis algorithm is used to perform dimension reduction processing on the hyperspectral remote sensing image, and the simple linear iterative algorithm is used to perform superpixel segmentation processing on the dimension-reduced hyperspectral remote sensing image;

[0011] 30% of the processed hyperspectral remote sensing image is used as a training set, 10% is used as a validation set, and the remaining 60% is used as a test set;

[0012] The MSST network is constructed by using the PyTorch framework, the training set is input into the MSST network, the spatial features and spectral features of the hyperspectral image are extracted in parallel based on the encoding and decoding modules of the Transformer, and the multi-layer features are integrated through the decoder;

[0013] The feature map is flattened into a sequence, each pixel position is input into the Transformer encoder as a Token, the spectral multi-head self-attention of the global feature is extracted, and the global pixel dependency relationship is obtained;

[0014] The global pixel dependency relationship is added with sinusoidal position encoding to reserve spatial information, and layer normalization is used to stabilize the training process;

[0015] After the training is completed, an MSST model initial model is obtained, and the MSST model initial model is verified by using the validation set;

[0016] After the verification is completed, the MSST model initial model is tested by using the test set, and the MSST model is obtained.

[0017] Preferably, the number of the extracted global feature spectral multi-head self-attention heads is k, the dimension of the head is dk=C / k, the self-attention of the Kth head is calculated, and the calculation formula is as follows:

[0018] X = {X 1 , X 2 , …, X 1}, N = HW / M 2

[0019]

[0020] wherein X and respectively represent the query of the Kth head and the projection matrix of the key and value, represents the output of the kth head;

[0021] The outputs of all heads {1, 2, …, k} are spliced, and then linearly projected to obtain the self-attention calculation result of the final Kth head.

[0022] The hyperspectral image classification system based on the MSST model is applied in the hyperspectral image classification method based on the MSST model, and comprises:

[0023] A data acquisition module is configured to acquire hyperspectral remote sensing images from hyperspectral data sets disclosed by IndiaPines and PaviaUniversity;

[0024] An encoding and decoding module is configured to extract spatial attention and spectral attention in the MSST, learn nonlinear features of input data by processing data in a feedforward manner, and integrate multi-layer features;

[0025] A result output module is configured to input the hyperspectral image to be classified into the MSST model to obtain a classification result of the hyperspectral image to be classified.

[0026] Preferably, the encoding and decoding module comprises:

[0027] An encoding unit is configured to extract spatial attention and spectral attention in the MSST network by using an encoder;

[0028] A decoding unit is configured to learn nonlinear features of input data by processing data in a feedforward manner, and integrate multi-layer features by using a decoder.

[0029] Preferably, the encoding unit comprises:

[0030] A spatial information extraction unit is configured to extract spatial attention in the MSST by using a spatial attention matrix;

[0031] A spectral information extraction unit is configured to extract spectral attention in the MSST by using a spectral attention matrix. Preferably, the calculation formula of input and output of the encoding and decoding module is as follows:

[0032] X' l = W-MSA(LN(Xl-1 ))+X l-1

[0033] X l =FEN(LN(X' l ))+X' l

[0034] Among them, X' l is the output of the attention mechanism module, X l is the output of the feedforward network module, and LN represents the normalization layer.

[0035] Preferably, the spatial attention matrix is ​​calculated as follows:

[0036]

[0037] For Q1, K1, V1 in the spatial self-attention in the spatial information extraction module, we can use X l Multiply by the weight matrix Get, then multiply by V1 after bias processing and normalization to get the result of the spatial attention matrix;

[0038] The calculation formula of the spectral attention matrix is ​​as follows:

[0039]

[0040] The final output spectral attention X l+1 , X l+1 Obtained by bias processing and normalization and then multiplied by V2.

[0041] Preferably, the calculation formula of the encoding unit is as follows:

[0042]

[0043] Among them, B is the correlation bias processing;

[0044] At the output X of the feedforward network module l Additional transposition and weight embedding are performed on the spectral multi-head self-attention structure Q2, K2, and V2 to obtain the calculation results.

[0045] A computer storage medium stores a computer program, which can implement the steps of a hyperspectral image classification method based on an MSST model when executed by a processor.

[0046] Compared with the prior art, the present invention has the following beneficial effects:

[0047] The application is based on the encoding and decoding module of the Transformer, which extracts the spatial features and spectral features of the hyperspectral image in parallel, and integrates the multi-layer features through the decoder, fully utilizes the rich spectral domain information of the hyperspectral image, realizes the classification of the hyperspectral image, and improves the classification accuracy, by using the multi-layer Transformer-based encoder, the global spectral spatial self-attention mechanism is adopted, the spatial information extraction is more comprehensive, especially the edge information, avoids the distortion problem of the edge area information, in addition, in order to adapt to the characteristics that the hyperspectral image contains rich spectral information, the method adopts the method of parallel extraction of spectral spatial information, which provides additional spectral domain information for the subsequent feature learning of the encoder, improves the classification accuracy, and realizes the hyperspectral image classification task of spectral spatial information fusion. BRIEF DESCRIPTION OF DRAWINGS

[0048] Figure 1 The training method flowchart of the MSST network model of the application is shown in the figure.

[0049] Figure 2 The architecture diagram of the MSST network of the application is shown in the figure.

[0050] Figure 3 The flowchart of the hyperspectral image classification of the application is shown in the figure.

[0051] Figure 4 The encoding and decoding module schematic diagram of the application is shown in the figure.

[0052] Figure 5 The difference between the two types of Transformers of the application is shown in the figure.

[0053] Figure 6 The hyperspectral image classification system based on the MSST model of the application is shown in the figure. DETAILED DESCRIPTION

[0054] The technical solutions in the embodiments of the application will be described clearly and completely below with reference to the drawings in the embodiments of the application. Obviously, the described embodiments are only part of the embodiments of the application, not all. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the application.

[0055] In order to solve the problem that most of the prior art is for image spatial information analysis, lacking extraction and utilization of spectral information in the image, and difficult to process hyperspectral image containing rich spectral information, please refer to Figures 1-6 The technical solutions of the embodiments are as follows:

[0056] The hyperspectral image classification method based on the MSST model comprises the following steps:

[0057] S1: Obtain a hyperspectral remote sensing image from a hyperspectral dataset disclosed by IndiaPines and Pavia University, the IndiaPines dataset contains 16 vegetation types, a spatial resolution of 145*145, contains 224 spectral bands, and the wavelength range is 400nm to 2500nm; the Pavia University dataset contains 9 ground object types, a spatial resolution of 610*340, and has 103 spectral bands in the wavelength range of 430-860nm;

[0058] S2: Construct an MSST network, train the MSST network using the obtained hyperspectral remote sensing image, and obtain an MSST model;

[0059] S3: Input the hyperspectral image to be classified into the MSST model to obtain the classification result of the hyperspectral image to be classified;

[0060] By inputting the processed hyperspectral image into the training set: validation set: test set=3:1:6 ratio, inputting the training set and the validation set, processing the input image by calling the encoding and decoding module in the MSST network, and finally outputting the corresponding classification diagram and precision evaluation index, the encoding and decoding module based on the Transformer extracts the spatial features and spectral features of the hyperspectral image in parallel, and integrates the multi-layer features through the decoder, fully utilizes the rich spectral domain information of the hyperspectral image, and realizes the classification of the hyperspectral image while improving the classification accuracy.

[0061] Constructing an MSST network, training the MSST network using the obtained hyperspectral remote sensing image, and obtaining an MSST model, specifically including:

[0062] The principal component analysis algorithm is used to process the dimensionality reduction of the hyperspectral remote sensing image, the simple linear iterative algorithm is used to perform superpixel segmentation processing on the dimensionally reduced hyperspectral remote sensing image, and the image is cropped, black and white corrected, band selected and filtered and denoised;

[0063] 30% of the processed hyperspectral remote sensing image is used as the training set, 10% is used as the validation set, and the remaining 60% is used as the test set;

[0064] An MSST network is constructed using the PyTorch framework, the training set is input into the MSST network, and the spatial features and spectral features of the hyperspectral image are extracted in parallel based on the encoding and decoding module of the Transformer, and the multi-layer features are integrated through the decoder;

[0065] The feature map is flattened into a sequence, and each pixel position is input into the Transformer encoder as a Token to extract the global feature spectral multi-head self-attention to obtain the global pixel dependency relationship.

[0066] According to the global pixel dependency relationship, the sinusoidal position coding is added to reserve the spatial information, and the layer normalization is used to stabilize the training process.

[0067] After the training is completed, the MSST model initial model is obtained, and the validation set is used to verify the MSST model initial model to determine whether the MSST model initial model converges. If it does not converge, the data set is expanded, the training parameters are adjusted, and the MSST model initial model is continuously trained.

[0068] If it is determined that the MSST model initial model has converged, the generalization ability of the MSST model initial model is verified using the public data set.

[0069] After the verification is completed, the test set is used to test the MSST model initial model to obtain the MSST model.

[0070] The MSST model is built using the PyTorch framework, the training graphics card uses the NVIDIA TX3060 16G, the proportions of the training set, the validation set and the test set are 30%, 10% and 60% respectively, the learning rate is set to 0.001, the learning rate is kept unchanged in the first 50 rounds of training, and the learning rate is gradually reduced to 0 in the last 50 rounds of training, and a total of 100 epochs are trained.

[0071] Finally, the MSST network model obtained by the above training method is applied to the hyperspectral image classification, and the classification effect diagram and the related evaluation index can be obtained.

[0072] The number of extracted global feature spectral multi-head self-attention heads is set to k, and the dimension of the head is dk=C / k. Then, the self-attention of the Kth head is calculated, and the calculation formula is as follows:

[0073] X={X 1 , X 2 , …, X 1 ), N=HW / M 2

[0074]

[0075] Where X and represent the projection matrix of the Kth head query and key and value respectively, represents the output of the Kth head;

[0076] The outputs of all heads {1, 2, …, k} are spliced, and then linearly projected to obtain the final self-attention calculation result of the Kth head.

[0077] The hyperspectral image classification system based on the MSST model is applied in the hyperspectral image classification method based on the MSST model, and comprises:

[0078] A data acquisition module is configured to acquire hyperspectral remote sensing images from the hyperspectral data sets disclosed by IndiaPines and PaviaUniversity;

[0079] An encoding and decoding module is configured to extract spatial attention and spectral attention in the MSST, learn nonlinear features of input data through feedforward processing of data, and integrate multi-layer features;

[0080] A result output module is configured to input the hyperspectral image to be classified into the MSST model to obtain a classification result of the hyperspectral image to be classified.

[0081] The multi-layer features are integrated through the decoder, the encoding unit and the decoding unit are used to capture local to global spatial context information in parallel, the problem that the traditional model is difficult to associate spectral and spatial features is effectively solved, the recognition ability for complex picture boundaries is significantly improved, the key spectral and spatial feature nodes are screened through the attention weight, the interference of redundant information is suppressed, the sensitivity of the model to subtle spectral differences is improved, the decoder adopts a pyramid structure, and the multi-scale features of the encoder are gradually upsampled and fused. For example, after the low-resolution feature map is restored in size through transposed convolution, it is spliced with the high-resolution feature map, and then refined through the Transformer layer. In the anomaly detection task, the decoder output is optimized through the adaptive weighted loss function, the interference of abnormal features on background reconstruction is suppressed, the robustness of feature integration is improved, the encoding and decoding module and the decoder are trained in an end-to-end manner, and the loss function combines the classification loss and the reconstruction loss (such as mean, to ensure the collaborative optimization of feature extraction and integration.

[0082] The encoding and decoding module comprises:

[0083] The encoding unit is configured to extract spatial attention and spectral attention in the MSST network by using the encoder;

[0084] The decoding unit is configured to learn nonlinear features of input data through feedforward processing of data, integrate multi-layer features by using the decoder, and enhance information interaction through multi-layer feature integration, so that the classification precision exceeds that of traditional methods. The decoder adopts a mask self-attention layer to prevent information leakage, and integrates multi-layer coding features through the attention layers of the encoder and the decoder, to realize accurate sequence generation.

[0085] The decoding unit is composed of two fully connected layers and a GELU activation function layer, can process data in a feedforward manner, can learn the nonlinear features of the input data, and output the learning results to the next module, after the learning and processing of multiple layers of encoders, the information is input into the decoder; the decoder has the same structure as the encoder, after the decoder receives the feature results from the encoder, the multiple layers of features are cascaded to generate fusion features, and the fusion features are upsampled to restore the original spatial resolution, and finally the classification results are output.

[0086] The encoding unit comprises:

[0087] The spatial information extraction unit is configured to extract spatial attention in the MSST by using a spatial attention matrix.

[0088] The spectral information extraction unit is configured to extract spectral attention in the MSST by using a spectral attention matrix. The calculation formula of the input and output of the encoding and decoding module is as follows:

[0089] X' l =W-MSA9LN(X l-1 ))+X l-1

[0090] X l =FEN9LN(X' l ))+X' l

[0091] Wherein, X' l is the output of the attention mechanism module, X l is the output of the feedforward network module, and LN represents a normalization layer. In the spatial information extraction transformer block, the attention mechanism uses spatial global self-attention to ensure the sufficiency of feature extraction.

[0092] The calculation formula of the spatial attention matrix is as follows:

[0093]

[0094] For Q1, K1, and V1 in the spatial self-attention in the spatial information extraction module, X l is multiplied by the weight matrix , and then multiplied by V1 after bias processing and normalization to obtain the result of the spatial attention matrix.

[0095] The calculation formula of the spectral attention matrix is as follows:

[0096]

[0097] The final output spectral attention X l+1 , X l+1Obtained by bias processing and normalization and then multiplied by V2.

[0098] The calculation formula of the coding unit is as follows:

[0099]

[0100] Among them, B is the correlation bias processing;

[0101] At the output X of the feedforward network module l Additional transposition and weight embedding are performed on the spectral multi-head self-attention structure Q2, K2, and V2 to obtain the calculation results.

[0102] A computer storage medium stores a computer program, which, when executed by a processor, can implement the steps of a hyperspectral image classification method based on an MSST model.

[0103] In summary, the application inputs the training set and the verification set in the ratio of 3:1:6 of the processed hyperspectral image, processes the input image by calling the encoding and decoding module in the MSST network, and finally outputs the corresponding classification diagram and precision evaluation index. The encoding and decoding module based on the Transformer extracts the spatial features and spectral features of the hyperspectral image in parallel, integrates the multi-layer features through the decoder, fully utilizes the rich spectral domain information of the hyperspectral image, realizes the classification of the hyperspectral image, and improves the classification accuracy. By using the multi-layer encoder based on the Transformer, the global spectral spatial self-attention mechanism is adopted, the spatial information extraction is more comprehensive, especially the edge information, the edge area information distortion problem is avoided, in addition, in order to adapt to the characteristics that the hyperspectral image contains rich spectral information, the method adopts the method of parallel extraction of spectral spatial information, which provides additional spectral domain information for subsequent feature learning of the encoder, improves the classification accuracy, realizes the hyperspectral image classification task of spectral spatial information fusion, integrates the multi-layer features through the decoder, uses the encoding unit and the decoding unit to capture the local to global spatial context information in parallel, effectively solves the problem that the traditional model is difficult to associate the spectral and spatial features, significantly improves the recognition ability of the complex picture boundary, selects the key spectral spatial feature nodes through the attention weight, suppresses the interference of redundant information, improves the sensitivity of the model to subtle spectral differences, and the decoder adopts the pyramid structure, gradually up-samples and fuses the multi-scale features of the encoder. For example, the low-resolution feature map is restored in size through transposed convolution, spliced with the high-resolution feature map, refined through the Transformer layer, and in the anomaly detection task, the decoder output is optimized through the adaptive weighted loss function, the interference of abnormal features on background reconstruction is suppressed, the feature integration robustness is improved, the encoding and decoding module and the decoder are trained in an end-to-end manner, the loss function combines the classification loss and the reconstruction loss, and the collaborative optimization of feature extraction and integration is ensured.

[0104] It should be noted that, in this text, relational terms such as first and second and the like can only be used to distinguish one entity or operation from another entity or operation, without necessarily requiring or implying any such actual relationship or order between these entities or operations. Moreover, the terms "comprising", "including" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or equipment including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such a process, method, article or equipment.

[0105] While embodiments of the application have been shown and described, it is to be understood that the embodiments described are merely exemplary of the principles and application of the present application. Numerous modifications and changes can be made by those skilled in the art without departing from the spirit and principles of the present application.

Claims

1. Hyperspectral image classification method based on MSST model, characterized by: The following steps are involved: S1: Obtain hyperspectral remote sensing images from the public hyperspectral datasets of IndiaPines and PaviaUniversity; S2: Construct an MSST network and use the acquired hyperspectral remote sensing images to train the MSST network to obtain an MSST model; S3: Input the hyperspectral image to be classified into the MSST model to obtain the classification result of the hyperspectral image to be classified.

2. The hyperspectral image classification method based on the MSST model according to claim 1, characterized in that: The MSST network is constructed and the MSST network is trained using the acquired hyperspectral remote sensing images to obtain the MSST model, specifically including: The principal component analysis algorithm is used to reduce the dimension of the hyperspectral remote sensing image, and a simple linear iterative algorithm is used to perform superpixel segmentation on the hyperspectral remote sensing image after dimension reduction. 30% of the processed hyperspectral remote sensing images are used as training sets, 10% as validation sets, and the remaining 60% as test sets; The feature map is flattened into a sequence, and each pixel position is input into the Transformer encoder as a token. The spectral multi-head self-attention of the global feature is extracted to obtain the global pixel dependency. Adding sinusoidal position encoding based on global pixel dependencies preserves spatial information, and layer normalization stabilizes the training process; After the training is completed, the initial model of the MSST model is obtained, and the validation set is used to verify the initial model of the MSST model; After the verification is completed, the initial model of the MSST model is tested using the test set to obtain the MSST model.

3. The hyperspectral image classification method based on the MSST model according to claim 2 is characterized in that: The number of multi-head self-attention heads of the extracted global feature spectrum is set to k, the dimension of the head is dk=C / k, and then the self-attention of the K-th head is calculated as follows: Among them, X and Represents the query of the K-th head and the projection matrix of the key and value, respectively, represents the output of the k-th head; The outputs of all heads {1, 2, ..., k} are concatenated and then linearly projected to obtain the final self-attention calculation result of the K-th head.

4. A hyperspectral image classification system based on the MSST model, applied to the hyperspectral image classification method based on the MSST model according to claim 3, characterized in that: include: Data acquisition module, used to obtain hyperspectral remote sensing images from the public hyperspectral datasets of IndiaPines and PaviaUniversity; The encoding and decoding module is used to extract spatial attention and spectral attention in MSST, learn the nonlinear features of the input data through feedforward processing, and integrate multi-layer features; The result output module is used to input the hyperspectral image to be classified into the MSST model to obtain the classification result of the hyperspectral image to be classified.

5. The hyperspectral image classification system based on the MSST model according to claim 4 is characterized in that: The encoding and decoding module includes: The encoding unit is used to extract the spatial attention and spectral attention in the MSST network using the encoder; The decoding unit is used to process data in a feedforward manner to learn the nonlinear features of the input data and integrate multi-layer features using the decoder.

6. The hyperspectral image classification system based on the MSST model according to claim 5, characterized in that: The encoding unit includes: A spatial information extraction unit, used to extract spatial attention in MSST using a spatial attention matrix; The spectral information extraction unit is used to extract the spectral attention in MSST using the spectral attention matrix.

7. The hyperspectral image classification system based on the MSST model according to claim 5, characterized in that: The calculation formula of the input and output of the encoding and decoding module is as follows: X′ l =W-MSA(LN(X l-1 ))+X l-1 X l =FEN(LN(X′ l ))+X′ l Among them, X' l is the output of the attention mechanism module, X l is the output of the feedforward network module, and LN represents the normalization layer.

8. The hyperspectral image classification system based on the MSST model according to claim 5, characterized in that: The spatial attention matrix is ​​calculated as follows: For Q1, K1, V1 in the spatial self-attention in the spatial information extraction module, we can use X l Multiply by the weight matrix Get, then multiply by V1 after bias processing and normalization to get the result of the spatial attention matrix; The calculation formula of the spectral attention matrix is ​​as follows: The final output spectral attention X l+1 , X l+1 Obtained by bias processing and normalization and then multiplied by V2.

9. The hyperspectral image classification system based on the MSST model according to claim 6, characterized in that: The calculation formula of the encoding unit is as follows: Among them, B is the correlation bias processing; At the output X of the feedforward network module l Additional transposition and weight embedding are performed on the spectral multi-head self-attention structure Q2, K2, and V2 to obtain the calculation results.

10. A computer storage medium, characterized in that The computer storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the hyperspectral image classification method based on the MSST model according to any one of claims 1 to 3 can be implemented.