Hyperspectral image land coverage classification method based on spectrum-space joint modeling
By employing a joint spectral-spatial modeling approach, utilizing a dynamic grouped void spatial pyramid and a spectral self-attention mechanism, combined with a cross-layer convolutional Transformer, the problem of insufficient cross-band feature modeling and limited spatial multi-scale representation capabilities in hyperspectral image land cover classification was solved, achieving high-precision land cover classification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- YANGZHOU UNIV
- Filing Date
- 2026-02-06
- Publication Date
- 2026-05-12
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing hyperspectral image land cover classification methods suffer from insufficient cross-band feature modeling, limited spatial multi-scale expression capabilities, and poor multi-level feature fusion effects, making it difficult to effectively characterize the spectral and spatial feature relationships of complex land features.
A spectral-spatial joint modeling approach is adopted, which combines a dynamically grouped void spatial pyramid and a spectral self-attention mechanism with a cross-layer convolutional Transformer to achieve parallel modeling and fusion of spatial multi-scale contextual features and spectral long-range dependency features.
It improves the ability to identify the spatial structure and subtle spectral differences of complex land features, achieves high-precision land cover classification, and enhances the stability and generalization ability of the model.
Smart Images

Figure CN122023929A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing, and in particular to a method for land cover classification of hyperspectral images based on spectral-spatial joint modeling. Background Technology
[0002] Hyperspectral remote sensing imagery, due to its continuous and detailed spectral information, is widely used in fields such as land cover classification, resource surveys, and environmental monitoring. Land cover classification is a key task in the application of hyperspectral imagery, and its purpose is to distinguish and identify different land surface types in the imagery based on the spectral and spatial characteristics of land features.
[0003] Existing land cover classification methods mainly include those based on traditional machine learning and those based on deep learning. Traditional methods typically rely on manually designed spectral or statistical features, making it difficult to fully extract the complex spectral correlations and spatial structure information in hyperspectral imagery. Convolutional neural network-based methods extract spatial features through local convolution operations, improving classification performance to some extent, but their receptive field is limited, making it difficult to simultaneously consider global dependencies and multi-scale spatial information.
[0004] In recent years, models based on self-attention mechanisms have been introduced into the field of hyperspectral image processing to model long-range dependencies. However, existing methods mostly focus on modeling at a single scale or a single feature dimension, and generally suffer from the following shortcomings: First, they do not adequately model the correlation between different spectral bands, making it difficult to effectively characterize cross-band feature relationships; second, their ability to extract spatial multi-scale features is limited, making it difficult to adapt to scale variations of complex ground features; and third, they lack an effective fusion mechanism for features at different levels, affecting the stability and generalization ability of classification results. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides a hyperspectral image land cover classification method based on spectral-spatial joint modeling. This method can effectively combine spectral and spatial information, and take into account cross-band feature interaction, multi-scale spatial modeling, and cross-layer feature fusion. It solves the problems of insufficient cross-band feature modeling, limited spatial multi-scale expression ability, and poor multi-level feature fusion effect in existing technologies.
[0006] The objective of this invention is achieved as follows: a land cover classification method based on hyperspectral imagery using spectral-spatial joint modeling, comprising the following steps:
[0007] Step 1) Obtain the hyperspectral remote sensing image data to be classified, and perform preprocessing operations on the original hyperspectral image; crop a fixed-size spatial neighborhood image block with the pixel to be classified as the center to construct sample data containing spatial and spectral information for subsequent model training and testing.
[0008] Step 2) Construct a hyperspectral image land cover classification model based on spectral-spatial joint modeling, and use the training set obtained in Step 1) to conduct supervised training on the model to obtain the target model for hyperspectral image land cover classification.
[0009] Step 3) Input the hyperspectral image to be classified into the classification model trained in Step 2), output the corresponding land cover category prediction results, and generate a land cover classification map.
[0010] Furthermore, step 1) includes the following steps:
[0011] Step 1.1) Preprocessing includes normalizing each spectral band to eliminate the impact of differences between different bands on model training;
[0012] Step 1.2) Using the pixel to be classified in the image as the center, crop the local image block according to the preset spatial neighborhood size of 9×9 to construct the model input sample containing spatial and spectral dimension information;
[0013] Step 1.3) Label the sample data and divide it into training set, validation set and test set according to the ratio of 1%, 1% and 98%.
[0014] Furthermore, step 2) includes the following steps:
[0015] Step 2.1) Spectral dimension reduction sampling and construction of initial spatial-spectral features;
[0016] Step 2.2) Modeling spatial multi-scale contextual features based on the dynamic grouped void spatial pyramid;
[0017] Step 2.3) Model spectral discrimination features based on the spectral self-attention mechanism;
[0018] Step 2.4) The spatial multi-scale context features obtained in Step 2.2 and the spectral discriminant features obtained in Step 2.3) are fused in parallel. The features are spliced in the channel dimension and feature compression and scale alignment are achieved through linear mapping to obtain the spatial-spectral fusion feature representation.
[0019] Step 2.5) Perform deep feature enhancement based on cross-layer convolutional Transformer to obtain enhanced features;
[0020] Step 2.6) Perform global average pooling on the enhanced features obtained in Step 2.5) to obtain a global feature vector, and output the corresponding land cover category prediction results through the classification layer.
[0021] Furthermore, step 2.1) includes the following steps:
[0022] Step 2.1.1) Represent the hyperspectral image sample obtained in step 1) as follows:
[0023]
[0024] In the formula, B represents the sample batch size. The size of the spatial domain is represented by S, and the number of spectral bands is represented by S.
[0025] The input samples are convolved along the spectral dimension, and the calculation process is as follows:
[0026]
[0027] In the formula, the kernel size is This is used to fuse information from adjacent spectral bands and compress spectral dimensions.
[0028] Step 2.1.2) Through the spectral dimension convolution operation in Step 2.1.1), the initial spatial-spectral joint feature representation is obtained while preserving the spatial structure information:
[0029]
[0030] In the formula, C represents the number of channels.
[0031] Furthermore, step 2.2) includes the following steps:
[0032] Step 2.2.1) Divide the initial spatial-spectral feature F0 into g channel subgroups along the channel dimension:
[0033]
[0034] In the formula, each channel subgroup contains the same number of feature channels. By grouping channels, different channel subgroups can focus on different types of spatial structural features, thereby improving the diversity of spatial feature expression.
[0035] Step 2.2.2) Each channel subgroup Multiple dilated convolutional branches are set up in parallel to extract spatial context features. The kernel size is fixed at 3×3. The calculation process is as follows:
[0036]
[0037] In the formula, d i This represents the dilation rate corresponding to the i-th convolutional branch. By setting different dilation rates, the model can simultaneously capture local spatial details and large-scale contextual structure information in the same layer.
[0038] Step 2.2.3) Perform global average pooling on the input features of each channel subgroup to obtain a global semantic description vector, and predict the weight coefficients of different hole rate branches based on this semantic description vector:
[0039]
[0040] In the formula, This represents the weight coefficient corresponding to the i-th dilated convolution branch within the g-th channel subgroup; This represents the weight coefficient corresponding to the j-th dilated convolution branch within the g-th channel subgroup;
[0041] Subsequently, the outputs of each void ratio branch are weighted and fused to obtain spatial multi-scale context features:
[0042]
[0043] In the formula, This represents the attention score corresponding to the i-th dilated convolution branch within the g-th channel subgroup;
[0044] This dynamic weighting method enables the model to adaptively adjust the size of the spatial receptive field based on the complexity of the spatial structure of ground features in the image.
[0045] Step 2.2.4) The fusion result is compressed to the original number of channels by 1×1 convolution, batch normalization and ReLU6.
[0046] Furthermore, step 2.3) includes the following steps:
[0047] Step 2.3.1) Unfold the initial spatial-spectral features in the spatial dimension so that each spatial location corresponds to a spectral feature sequence, so that the model focuses on the spectral sequence itself and is not affected by space;
[0048] Step 2.3.2) Perform LayerNorm normalization on the spectral dimension S to alleviate the numerical scale difference between bands; the normalized spectral sequence is further divided into three fields: low frequency S1, mid frequency S2 and high frequency S3.
[0049] Step 2.3.3) For each field, the module introduces a shift-window self-attention mechanism, using sliding windows of different scales to generate local subsequences and performing single-head self-attention within the window; based on the self-attention mechanism, the query matrix Q, key matrix K, and value matrix V are generated, and the calculation process is expressed as follows:
[0050] , ,
[0051] In the formula, W Q W KW V represents the learnable weight matrices used to map input features to the query space, key space, and value space, respectively.
[0052] The spectral attention weights are calculated as follows:
[0053]
[0054] In the formula, d represents the feature dimension, and the long-range dependency between different spectral bands is modeled through the above attention calculation; T represents the transpose operation of the bond matrix K.
[0055] Step 2.3.4) The attention output is nonlinearly mapped through residual connections and a feedforward network to obtain a spectral feature representation with strong discriminative ability.
[0056] Furthermore, step 2.5) includes the following steps:
[0057] Step 2.5.1) The input features are processed through a 3×3×3 convolution operation to generate the query, key, and value in the attention mechanism to preserve spatial structure information; the calculation process is represented as follows:
[0058] , ,
[0059] And calculate the attention output based on the query, key, and value;
[0060] Step 2.5.2) Introduce dilated convolutional structures into the feedforward network and gradually increase the porosity with the number of network layers to model spatial-spectral context information at different scales layer by layer;
[0061] Step 2.5.3) The features from the previous layer are fused with the features from the current layer using a gating mechanism. The expression is as follows:
[0062]
[0063] In the formula, σ(·) represents the gating function. This represents a gated feature used to control the fusion ratio between features from the previous layer and features from the current layer; This represents the features extracted from the current layer by the l-th layer of the network; This indicates that features from the previous layer are fused through a gating mechanism. With current layer features The output features obtained afterward.
[0064] Compared with existing technologies, the advantages of this invention are as follows: This invention proposes a hyperspectral image land cover classification method based on spectral-spatial joint modeling. By modeling spatial multi-scale contextual features and spectral long-range dependence features in parallel within a unified framework, it effectively overcomes the shortcomings of traditional methods in terms of insufficient spatial structure representation and limited spectral discrimination ability. By introducing a spatial feature modeling method based on a dynamically grouped void spatial pyramid and a spectral self-attention mechanism, it enhances the model's ability to identify complex land cover spatial structures and subtle spectral differences. At the same time, by using cross-layer convolutional Transformers to deeply enhance the fused features, it improves the model's comprehensive representation ability of multi-scale spatial-spectral features, thereby achieving high-precision classification of hyperspectral image land cover types. Attached Figure Description
[0065] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0066] Figure 1 This is a flowchart of an embodiment of the present invention.
[0067] Figure 2 This is a structural diagram of the model of the present invention. Detailed Implementation
[0068] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0069] like Figure 1 The method for land cover classification based on hyperspectral imagery using spectral-spatial joint modeling, as shown, includes the following steps:
[0070] Step 1) Obtain the hyperspectral remote sensing image data to be classified, and perform preprocessing operations on the original hyperspectral image; crop a fixed-size spatial neighborhood image block with the pixel to be classified as the center to construct sample data containing spatial and spectral information for subsequent model training and testing.
[0071] Step 1.1) Preprocessing includes normalizing each spectral band to eliminate the impact of differences between different bands on model training;
[0072] Step 1.2) Using the pixel to be classified in the image as the center, crop the local image block according to the preset spatial neighborhood size of 9×9 to construct the model input sample containing spatial and spectral dimension information;
[0073] Step 1.3) Label the sample data and divide it into training set, validation set and test set according to the ratio of 1%, 1% and 98%.
[0074] Step 2) Construct a hyperspectral image land cover classification model based on spectral-spatial joint modeling, and use the training set obtained in Step 1) to conduct supervised training on the model to obtain the target model for hyperspectral image land cover classification.
[0075] Step 2.1) Spectral dimension reduction sampling and construction of initial spatial-spectral features;
[0076] Step 2.1.1) Represent the hyperspectral image sample obtained in step 1) as follows:
[0077]
[0078] In the formula, B represents the sample batch size. The size of the spatial domain is represented by S, and the number of spectral bands is represented by S.
[0079] The input samples are convolved along the spectral dimension, and the calculation process is as follows:
[0080]
[0081] In the formula, the kernel size is This is used to fuse information from adjacent spectral bands and compress spectral dimensions.
[0082] Step 2.1.2) Through the spectral dimension convolution operation in Step 2.1.1), the initial spatial-spectral joint feature representation is obtained while preserving the spatial structure information:
[0083]
[0084] In the formula, C represents the number of channels.
[0085] Step 2.2) Modeling spatial multi-scale contextual features based on the dynamic grouped void spatial pyramid;
[0086] Step 2.2.1) Divide the initial spatial-spectral feature F0 into g channel subgroups along the channel dimension:
[0087]
[0088] In the formula, each channel subgroup contains the same number of feature channels. By grouping channels, different channel subgroups can focus on different types of spatial structural features, thereby improving the diversity of spatial feature expression.
[0089] Step 2.2.2) Each channel subgroup Multiple dilated convolutional branches are set up in parallel to extract spatial context features. The kernel size is fixed at 3×3. The calculation process is as follows:
[0090]
[0091] In the formula, d i This represents the dilation rate corresponding to the i-th convolutional branch. By setting different dilation rates, the model can simultaneously capture local spatial details and large-scale contextual structure information in the same layer.
[0092] Step 2.2.3) Perform global average pooling on the input features of each channel subgroup to obtain a global semantic description vector, and predict the weight coefficients of different hole rate branches based on this semantic description vector:
[0093]
[0094] In the formula, This represents the weight coefficient corresponding to the i-th dilated convolution branch within the g-th channel subgroup; This represents the weight coefficient corresponding to the j-th dilated convolution branch within the g-th channel subgroup;
[0095] Subsequently, the outputs of each void ratio branch are weighted and fused to obtain spatial multi-scale context features:
[0096]
[0097] In the formula, This represents the attention score corresponding to the i-th dilated convolution branch within the g-th channel subgroup;
[0098] This dynamic weighting method enables the model to adaptively adjust the size of the spatial receptive field based on the complexity of the spatial structure of ground features in the image.
[0099] Step 2.2.4) The fusion result is compressed to the original number of channels by 1×1 convolution, batch normalization and ReLU6.
[0100] Step 2.3) Model spectral discrimination features based on the spectral self-attention mechanism;
[0101] Step 2.3.1) Unfold the initial spatial-spectral features in the spatial dimension so that each spatial location corresponds to a spectral feature sequence, so that the model focuses on the spectral sequence itself and is not affected by space;
[0102] Step 2.3.2) Perform LayerNorm normalization on the spectral dimension S to alleviate the numerical scale difference between bands; the normalized spectral sequence is further divided into three fields: low frequency S1, mid frequency S2 and high frequency S3.
[0103] Step 2.3.3) For each field, the module introduces a shift-window self-attention mechanism, using sliding windows of different scales to generate local subsequences and performing single-head self-attention within the window; based on the self-attention mechanism, the query matrix Q, key matrix K, and value matrix V are generated, and the calculation process is expressed as follows:
[0104] , ,
[0105] In the formula, W Q W K W V These represent the learnable weight matrices used to map input features to the query space, key space, and value space, respectively.
[0106] The spectral attention weights are calculated as follows:
[0107]
[0108] In the formula, d represents the feature dimension, and the long-range dependency between different spectral bands is modeled through the above attention calculation; T represents the transpose operation of the bond matrix K.
[0109] Step 2.3.4) The attention output is nonlinearly mapped through residual connections and a feedforward network to obtain a spectral feature representation with strong discriminative ability.
[0110] Step 2.4) The spatial multi-scale context features obtained in Step 2.2 and the spectral discriminant features obtained in Step 2.3) are fused in parallel. The features are spliced in the channel dimension and feature compression and scale alignment are achieved through linear mapping to obtain the spatial-spectral fusion feature representation.
[0111] Step 2.5) Perform deep feature enhancement based on cross-layer convolutional Transformer to obtain enhanced features;
[0112] Step 2.5.1) The input features are processed through a 3×3×3 convolution operation to generate the query, key, and value in the attention mechanism to preserve spatial structure information; the calculation process is represented as follows:
[0113] , ,
[0114] And calculate the attention output based on the query, key, and value;
[0115] Step 2.5.2) Introduce dilated convolutional structures into the feedforward network and gradually increase the porosity with the number of network layers to model spatial-spectral context information at different scales layer by layer;
[0116] Step 2.5.3) The features from the previous layer are fused with the features from the current layer using a gating mechanism. The expression is as follows:
[0117]
[0118] In the formula, σ(·) represents the gating function. This represents a gated feature used to control the fusion ratio between features from the previous layer and features from the current layer; This represents the features extracted from the current layer by the l-th layer of the network; This indicates that features from the previous layer are fused through a gating mechanism. With current layer features The output features obtained afterward.
[0119] Step 2.6) Perform global average pooling on the enhanced features obtained in Step 2.5) to obtain a global feature vector, and output the corresponding land cover category prediction results through the classification layer.
[0120] Step 3) Input the hyperspectral image to be classified into the classification model trained in Step 2), output the corresponding land cover category prediction result, generate a land cover classification map, and map the prediction result back to the original hyperspectral image space to generate a land cover classification map.
[0121] A hyperspectral image land cover classification model based on spectral-spatial joint modeling includes a dynamic spatial multi-scale context feature modeling module, a spectral discriminant feature modeling module, and a spatial-spectral parallel feature fusion module.
[0122] The Dynamic Spatial Multi-Scale Context Feature Modeling Module (DGASPP) extracts multi-scale spatial context features based on a dynamically grouped void spatial pyramid structure to enhance the model's ability to represent spatial structure information of ground features at different scales.
[0123] The Swin-CBATT spectral discrimination feature modeling module, based on the spectral self-attention mechanism, models the correlation between different spectral bands in hyperspectral images to obtain spectral feature representations with discriminative capabilities.
[0124] The spatial-spectral parallel feature fusion module CL-ConvTE is used to perform parallel fusion of the spatial multi-scale context features and spectral discriminative features to form a spatial-spectral joint feature representation and enhanced modeling, and outputs the land cover category results corresponding to each pixel in the hyperspectral image through the classification layer.
[0125] To verify the effectiveness and advancement of the method of this invention, five publicly available hyperspectral remote sensing image datasets, namely Paiva University (PU), Salinas (SA), KSC, Xuzhou (XZ), and WHU-HI-Longkou (LK), were selected for experimental verification. The method was also compared with nine Deep Learning models, namely 2DCNN, 3DCNN, SSRN, VIT, CTMixer, HIT, SpectralFormer, Morphformer, and HybrifFormer. The experimental results are shown below. Under the same experimental conditions, the method of this invention achieves the best performance in overall classification accuracy (OA), average accuracy (AA), and Kappa coefficient evaluation indicators. It performs best in the PU dataset across 6 classes, with a minimum class accuracy of 97.212%. It performs best in the SA dataset across 7 classes, with a minimum class accuracy of 95.425%. It performs best in the XZ dataset across 4 classes, with a minimum class accuracy of 98.371%. It performs best in the KSC dataset across 7 classes, with OA reaching 100% in 6 classes and a minimum class accuracy of 70.707%. It performs best in the LK dataset across 3 classes, with a minimum class accuracy of 96.140%. The experiments fully verify the effectiveness and practical value of the method of this invention in hyperspectral image land cover classification tasks.
[0126]
[0127]
[0128]
[0129]
[0130]
[0131] This invention provides a land cover classification method for hyperspectral imagery based on spectral-spatial joint modeling. By modeling spatial multi-scale contextual features and long-range spectral dependence features in parallel within a unified framework, it effectively overcomes the shortcomings of traditional methods in terms of insufficient spatial structure representation and limited spectral discrimination capabilities. By introducing a spatial feature modeling method based on a dynamically grouped void spatial pyramid and a spectral self-attention mechanism, the model's ability to identify complex land cover spatial structures and subtle spectral differences is enhanced. Simultaneously, by utilizing cross-layer convolutional Transformers to deeply enhance the fused features, the model's comprehensive representation capability of multi-scale spatial-spectral features is improved, thereby achieving high-precision classification of land cover types in hyperspectral imagery.
[0132] The above description of the embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. It should be noted that those skilled in the art can make several improvements and modifications to the present invention without departing from the principles of the present invention, and these improvements and modifications also fall within the protection scope of the claims of the present invention.
Claims
1. A land cover classification method based on hyperspectral imagery using spectral-spatial joint modeling, characterized in that, Includes the following steps: Step 1) Obtain the hyperspectral remote sensing image data to be classified and perform preprocessing operations on the original hyperspectral image; A fixed-size spatial neighborhood image patch is cropped centered on the pixel to be classified to construct sample data containing spatial and spectral information for subsequent model training and testing. Step 2) Construct a hyperspectral image land cover classification model based on spectral-spatial joint modeling, and use the training set obtained in Step 1) to conduct supervised training on the model to obtain the target model for hyperspectral image land cover classification. Step 3) Input the hyperspectral image to be classified into the classification model trained in Step 2), output the corresponding land cover category prediction results, and generate a land cover classification map.
2. The hyperspectral image land cover classification method based on spectral-spatial joint modeling according to claim 1, characterized in that, Step 1) includes the following steps: Step 1.1) Preprocessing includes normalizing each spectral band to eliminate the impact of differences between different bands on model training; Step 1.2) Using the pixel to be classified in the image as the center, crop the local image block according to the preset spatial neighborhood size of 9×9 to construct the model input sample containing spatial and spectral dimension information; Step 1.3) Label the sample data and divide it into training set, validation set and test set according to the ratio of 1%, 1% and 98%.
3. The hyperspectral imagery land cover classification method based on spectral-spatial joint modeling according to claim 1, characterized in that, Step 2) includes the following steps: Step 2.1) Spectral dimension reduction sampling and construction of initial spatial-spectral features; Step 2.2) Modeling spatial multi-scale contextual features based on the dynamic grouped void spatial pyramid; Step 2.3) Model spectral discrimination features based on the spectral self-attention mechanism; Step 2.4) The spatial multi-scale context features obtained in Step 2.2 and the spectral discriminant features obtained in Step 2.3) are fused in parallel. The features are spliced in the channel dimension and feature compression and scale alignment are achieved through linear mapping to obtain the spatial-spectral fusion feature representation. Step 2.5) Perform deep feature enhancement based on cross-layer convolutional Transformer to obtain enhanced features; Step 2.6) Perform global average pooling on the enhanced features obtained in Step 2.5) to obtain a global feature vector, and output the corresponding land cover category prediction results through the classification layer.
4. The hyperspectral imagery land cover classification method based on spectral-spatial joint modeling according to claim 3, characterized in that, Step 2.1) includes the following steps: Step 2.1.1) Represent the hyperspectral image sample obtained in step 1) as follows: ; In the formula, B represents the sample batch size. The space domain size is represented by S, and the number of spectral bands is represented by S. The input samples are convolved along the spectral dimension, and the calculation process is as follows: ; In the formula, the kernel size is This is used to fuse information from adjacent spectral bands and compress spectral dimensions. Step 2.1.2) Through the spectral dimension convolution operation in Step 2.1.1), the initial spatial-spectral joint feature representation is obtained while preserving the spatial structure information: ; In the formula, C represents the number of channels.
5. The hyperspectral imagery land cover classification method based on spectral-spatial joint modeling according to claim 3, characterized in that, Step 2.2) includes the following steps: Step 2.2.1) Divide the initial spatial-spectral feature F0 into g channel subgroups along the channel dimension: ; In the formula, each channel subgroup contains the same number of feature channels. By grouping channels, different channel subgroups can focus on different types of spatial structural features, thereby improving the diversity of spatial feature expression. Step 2.2.2) Each channel subgroup Multiple dilated convolutional branches are set up in parallel to extract spatial context features. The kernel size is fixed at 3×3. The calculation process is as follows: ; In the formula, d i This represents the dilation rate corresponding to the i-th convolutional branch. By setting different dilation rates, the model can simultaneously capture local spatial details and large-scale contextual structure information in the same layer. Step 2.2.3) Perform global average pooling on the input features of each channel subgroup to obtain a global semantic description vector, and predict the weight coefficients of different hole rate branches based on this semantic description vector: ; In the formula, This represents the weight coefficient corresponding to the i-th dilated convolution branch within the g-th channel subgroup; This represents the weight coefficient corresponding to the j-th dilated convolution branch within the g-th channel subgroup; Subsequently, the outputs of each void ratio branch are weighted and fused to obtain spatial multi-scale context features: ; In the formula, This represents the attention score corresponding to the i-th dilated convolution branch within the g-th channel subgroup; This dynamic weighting method enables the model to adaptively adjust the size of the spatial receptive field based on the complexity of the spatial structure of ground features in the image. Step 2.2.4) The fusion result is compressed to the original number of channels by 1×1 convolution, batch normalization and ReLU6.
6. The hyperspectral imagery land cover classification method based on spectral-spatial joint modeling according to claim 3, characterized in that, Step 2.3) includes the following steps: Step 2.3.1) Unfold the initial spatial-spectral features in the spatial dimension so that each spatial location corresponds to a spectral feature sequence, so that the model focuses on the spectral sequence itself and is not affected by space; Step 2.3.2) Perform LayerNorm normalization on the spectral dimension S to alleviate the numerical scale difference between bands; the normalized spectral sequence is further divided into three fields: low frequency S1, mid frequency S2 and high frequency S3. Step 2.3.3) For each field, the module introduces a shift-window self-attention mechanism, using sliding windows of different scales to generate local subsequences and performing single-head self-attention within the window; based on the self-attention mechanism, the query matrix Q, key matrix K, and value matrix V are generated, and the calculation process is expressed as follows: , , ; In the formula, W Q W K W V These represent the learnable weight matrices used to map input features to the query space, key space, and value space, respectively. The spectral attention weights are calculated as follows: ; In the formula, d represents the feature dimension, and the long-range dependency between different spectral bands is modeled through the above attention calculation; T represents the transpose operation of the bond matrix K. Step 2.3.4) The attention output is nonlinearly mapped through residual connections and a feedforward network to obtain a spectral feature representation with strong discriminative ability.
7. The hyperspectral imagery land cover classification method based on spectral-spatial joint modeling according to claim 3, characterized in that, Step 2.5) includes the following steps: Step 2.5.1) The input features are processed through a 3×3×3 convolution operation to generate the query, key, and value in the attention mechanism to preserve spatial structure information; the calculation process is represented as follows: , , ; And calculate the attention output based on the query, key, and value; Step 2.5.2) Introduce dilated convolutional structures into the feedforward network and gradually increase the porosity with the number of network layers to model spatial-spectral context information at different scales layer by layer; Step 2.5.3) The features from the previous layer are fused with the features from the current layer using a gating mechanism. The expression is as follows: ; In the formula, σ(·) represents the gating function. This represents a gated feature used to control the fusion ratio between features from the previous layer and features from the current layer; This represents the features extracted from the current layer by the l-th layer of the network; This indicates that features from the previous layer are fused through a gating mechanism. With current layer features The output features obtained afterward.