A hyperspectral image classification method based on a dynamic spectrum-space dual-gating fusion network

By using a dynamic spectral-spatial dual-gated fusion network, the problem of fusion of spectral and spatial information in hyperspectral image classification is solved, achieving efficient feature extraction and classification, improving classification accuracy and model efficiency, and generating classification maps with clear and consistent boundaries, which are suitable for accurate interpretation of hyperspectral images.

CN122115965APending Publication Date: 2026-05-29DALIAN NATIONALITIES UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
DALIAN NATIONALITIES UNIVERSITY
Filing Date
2026-02-12
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing hyperspectral image classification methods struggle to effectively fuse spectral and spatial information, adaptively suppress noise and redundancy, and suffer from heavy computational burdens, resulting in limited classification accuracy.

Method used

A method based on dynamic spectral-spatial dual-gated fusion network is adopted. Principal component analysis is used for dimensionality reduction. Spectral features are extracted by combining a dynamic gated 3D convolution module and a dynamic basis vector generation module. Spatial features are extracted by a dynamic gated 2D convolution module and a dynamic gated multi-head attention module. Cross-modal feature interaction is achieved through a Transformer encoder. Finally, classification is completed by a multilayer perceptron.

Benefits of technology

It effectively suppresses noise interference, adaptively enhances discriminative features, achieves precise focusing, improves classification accuracy and model efficiency, generates classification maps with clear boundaries and strong regional consistency, and reduces misclassification phenomena such as different objects with the same spectrum or different spectra of the same object.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122115965A_ABST
    Figure CN122115965A_ABST
Patent Text Reader

Abstract

The present application significantly improves the comprehensive performance of hyperspectral image classification. By effectively suppressing the noise and redundant information in the spectral and spatial dimensions, the method adaptively focuses on the wavebands and texture regions with strong discriminability, significantly enhancing the feature selection and representation ability of the model. The method achieves leading overall accuracy, average accuracy and Kappa coefficient on multiple public datasets, especially in scenes with unbalanced sample classes and complex ground object distribution, showing superior robustness and generalization ability. The generated classification map has clearer class boundaries and higher regional consistency, significantly reducing the misclassification caused by the "same object different spectrum" and "same spectrum different object" phenomenon, and the classification result is closer to the real ground object distribution. At the same time, the model has moderate computational complexity while maintaining high accuracy, achieving a good balance between performance and efficiency, providing reliable support for the accurate interpretation and practical deployment of hyperspectral images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of hyperspectral image classification, and more specifically to a hyperspectral image classification method based on a dynamic spectral-spatial dual-gated fusion network. Background Technology

[0002] Hyperspectral images, created by imaging spectrometers that image ground features across continuous and narrow bands, acquire continuous spectral information for each pixel, offering the unique advantage of "image-spectrum integration." This rich spectral feature set it apart in fields such as precision agriculture, environmental monitoring, mineral exploration, and military reconnaissance. However, the high dimensionality, strong correlation, and massive data volume of hyperspectral images also present significant challenges for their automatic interpretation and classification. On one hand, a large amount of redundant information exists within dozens to hundreds of bands, and some bands are susceptible to sensor noise and atmospheric scattering interference. On the other hand, the reflectance characteristics of ground features vary subtly across different bands, with common phenomena of different spectra for the same object and different objects with the same spectrum, making robust classification difficult to achieve solely based on spectral information. Therefore, how to adaptively extract highly discriminative features from high-dimensional, redundant, and noisy data, and effectively fuse spectral and spatial context information, has long been a core issue of concern in the field of hyperspectral image classification.

[0003] Early classification methods primarily relied on spectral features, such as spectral angle and spectral similarity metrics, as well as traditional machine learning models like support vector machines. While these methods utilized the shape of spectral curves to some extent, they failed to fully exploit the spatial relationships between pixels, were sensitive to noise and outliers, and had limited classification accuracy. With the development of deep learning technology, convolutional neural networks (CNNs) were introduced into the field of hyperspectral classification. Two-dimensional CNNs can effectively extract local spatial texture features but ignore crucial spectral dimensional information. Three-dimensional CNNs attempt to model both spatial and spectral features simultaneously, but their fixed convolutional kernels struggle to adapt to the complex and varied spectral response patterns of different ground features, and their equal treatment of all bands fails to effectively suppress interference from noise bands, resulting in a heavy computational burden. To improve feature representation capabilities, some studies have begun to introduce attention mechanisms, such as channel attention or spatial attention modules, to emphasize important features.

[0004] However, these methods mostly employ static or single-scale attention weights, lacking the ability to coordinate, dynamically, and finely modulate the spectral and spatial dimensions, making it difficult to achieve optimal fusion of effective spectral information and spatial context structure in complex scenarios. Furthermore, how to design a lightweight and efficient mechanism to compress high-dimensional spectral features into low-dimensional representations with clear physical meaning while retaining their discriminative power remains an unresolved issue in current model design. In summary, existing methods still have significant shortcomings in dynamically fusing spectral and spatial information from hyperspectral images, adaptively suppressing noise and redundancy, and constructing lightweight and efficient networks, thus hindering further improvements in classification accuracy and practicality. Summary of the Invention

[0005] To address the technical problems mentioned above, this invention provides a hyperspectral image classification method based on a dynamic spectral-spatial dual-gated fusion network, comprising the following steps: S1. Based on the original hyperspectral cubic data, dimensionality reduction is performed through principal component analysis to obtain simplified three-dimensional data blocks; S2. Based on the simplified 3D data block, spectral features are extracted using a dynamic gated 3D convolution module and a dynamic basis vector generation module to obtain spectral features. S3. Based on the spectral features, spatial features are extracted by a dynamic gated 2D convolution module and a dynamic gated multi-head attention module to obtain spatial features; S4. Based on the spectral features and the spatial features, the data is stitched together in the channel dimension and then input into the Transformer encoder. Cross-modal feature interaction is achieved through a multi-head attention mechanism, and finally, classification is completed by a multilayer perceptron.

[0006] Preferably, S1 includes: based on the original hyperspectral cubic data Principal component analysis was used to reduce dimensionality, extract discriminative spectral principal components, and obtain simplified three-dimensional data blocks. .

[0007] Preferably, S2 includes: Based on the simplified 3D data block, spectral features are first extracted through a dynamically gated 3D convolution module to obtain a 3D feature map. Based on the three-dimensional feature map, a low-dimensional spectral token is obtained by performing spectral compression and semantic representation through a dynamic basis vector generation module.

[0008] Preferably, the dynamically gated 3D convolution module performs the following operations: Based on simplified 3D data blocks, cross-band correlation features are extracted by sliding a 3D convolution kernel along the spectral dimension. Based on the 3D convolution output, the features are dynamically modulated through a channel-band dual-channel gating mechanism to obtain the optimized 3D feature map.

[0009] Preferably, S3 includes: Based on the spectral features, local spatial texture features are extracted using a dynamically gated two-dimensional convolution module. Based on the local spatial texture features, global spatial association modeling is performed through a dynamic gated multi-head attention module to obtain spatial features.

[0010] Preferably, the dynamically gated two-dimensional convolution module performs the following operations: Based on the input spectral features, basic spatial features are extracted through depthwise separable convolution; Based on the aforementioned basic spatial features, enhanced local spatial texture features are obtained by modulating the features through a channel-level dynamic gating mechanism.

[0011] Preferably, the dynamic gating multi-head attention module performs the following operations: Based on the local spatial texture features of the input, global statistical features and local multi-scale convolutional features are extracted; Based on the global statistical features and local multi-scale convolutional features, dynamic gating weights are generated. Based on the dynamic gating weights, the multi-head attention is modulated to obtain the spatial features.

[0012] Preferably, the Transformer encoder in S4 includes residual connections and layer normalization operations to stabilize training and preserve higher-order correlations between spectral and spatial features. Compared with the prior art, the beneficial effects of the present invention are as follows: This invention effectively suppresses noise interference from spectral and spatial dimensions, adaptively enhances discriminative features, and achieves precise focusing on key bands and texture regions. Through a dynamic fusion mechanism, the model achieves leading overall classification accuracy, average accuracy, and Kappa coefficient on multiple public datasets while maintaining moderate model complexity. The generated classification maps have clear boundaries, strong regional consistency, and more closely resemble real-world object distribution, significantly reducing misclassification caused by different objects with the same spectrum or different spectra of the same object, providing reliable technical support for the accurate interpretation of hyperspectral images. Attached Figure Description

[0013] To more clearly illustrate the technical solution of the present invention, the drawings used in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0014] Figure 1 This is a schematic diagram of the model framework of an embodiment of the present invention; Figure 2 This is a schematic diagram of dynamic cross-dimensional gated convolution according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the dynamic basis vector generation module according to an embodiment of the present invention; Figure 4 This is a schematic diagram of the dynamic gating multi-head attention module according to an embodiment of the present invention. Detailed Implementation

[0015] 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.

[0016] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0017] Example 1 S1. Based on the original hyperspectral cubic data, dimensionality reduction is performed through principal component analysis to obtain a simplified three-dimensional data block.

[0018] This embodiment uses the original dataset hyperspectral cube data. As the initial input, where h and w These represent the spatial dimensions of the image: height and width, respectively. d Represents the number of spectral bands. R This represents the set of all real numbers. Principal component analysis (PCA) is used for dimensionality reduction to extract spectral principal components with significant discriminative power, thereby generating a simplified three-dimensional data block. As input for feature extraction, where This indicates the number of bands after dimensionality reduction.

[0019] S2. Based on the simplified 3D data block, spectral features are extracted through a dynamic gated 3D convolution module and a dynamic basis vector generation module to obtain spectral features.

[0020] In the feature extraction stage, the dimensionality-reduced data first enters the spectral feature extraction branch. Within this branch, the dynamically gated 3D convolution module filters key spectral dimensions using band attention gating and captures cross-band correlated features using a 3D convolution kernel moving along the spectral axis. Simultaneously, a channel-band dual-gating system effectively suppresses noisy bands and enhances key spectral features. Subsequently, the dynamic basis vector generation module further modulates features through a dual-gating mechanism. Global spectral gating generates channel weights through band compression, while local spatial gating extracts spatial correlations of spectral curves using 1×3 convolution. These two mechanisms work together to modulate the features and calculate similarity with learnable basis vectors, compressing the high-dimensional data into a low-dimensional semantic token.

[0021] Spectral feature extraction refers to mining cross-band physical response patterns and semantic discriminative information in hyperspectral images to enhance the model's ability to distinguish spectral types of ground objects. Hyperspectral data is characterized by high dimensionality, high redundancy, and sensitivity to noise. How to suppress interference signals while retaining effective bands is crucial for achieving accurate identification. To address this, this embodiment proposes a dynamic gated spectral feature extraction mechanism, which includes two innovative modules: a dynamic gated 3D convolution module and a dynamic basis vector generation module.

[0022] (1) Constructing a dynamically gated 3D convolution module Figure 2 This is a schematic diagram of dynamic cross-dimensional gated convolution. This embodiment uses dynamic gated 3D convolution, which jointly models spectral and spatial local features through 3D convolution kernels, and introduces a channel-band dual-path gating mechanism. Combined with global average pooling and spectral convolution to dynamically adjust the feature response, it effectively enhances the discrimination of spectral bands and suppresses noise interference.

[0023] The dynamically gated 3D convolution module directly processes the original hyperspectral cubic input H. The core of this module lies in the combined effect of the cross-dimensional sliding of the 3D convolution kernel and dual-path dynamic gating. The 3D convolution kernel slides synchronously along both the spectral and spatial dimensions, modeling cross-band spectral correlations within a local neighborhood, such as the abrupt changes in the red-edge band of vegetation or subtle differences in the absorption bands of minerals. Its mathematical expression is: in, This represents the feature map after three-dimensional convolution. This represents a 3D convolution operation. For the weights of the 3D convolution kernel, Indicates the size of the spectral convolution kernel. and The output feature map represents the size of the spatial convolution kernel. Preserve the multidimensional properties of the original data, where B represents the batch. Indicates the number of output channels. This indicates the magnitude of the spectral and spatial dimensions after convolution.

[0024] To overcome the problem of feature distortion caused by the inability of traditional 3D convolution to suppress noise band interference in the spectral dimension, the module introduces a channel-band dual-path dynamic gating mechanism. This mechanism achieves joint spectral-spatial optimization through channel-level redundant feature suppression and band-level noise signal attenuation. Channel gating compresses the spectral and spatial dimensions using global average pooling, extracts channel-level statistics, and then generates channel weight vectors via a multilayer perceptron. , c Indicates the first c One channel, This represents channel gating in the dynamic 3D convolution module.

[0025] .

[0026] This weight vector is used to suppress redundant feature channels. The sigmoid function is used as a gate factor, and the output is mapped to the interval [0,1]. MLP stands for Multi-Layer Perceptron. The channel-gated normalization factor represents the average of the bands and spatial locations within that channel. b Representing the b One sample, d This represents the direction of spectral movement of the 3D convolution kernel. Image coordinates representing spatial location (vertical and horizontal). Band gating slides a one-dimensional convolution kernel along the spectral dimension to analyze local band correlation patterns and dynamically assess the importance of each band. in, The band-gated normalization factor represents the normalization factor for the th band. d The values ​​of each band are averaged across all spatial locations. This embodiment innovatively designs a dual-gating mechanism. This mechanism extracts feature importance weights of different dimensions through channel gating and band gating respectively, and then efficiently fuses the two to collaboratively modulate the feature map. To this end, the module uses the Hadamard product, an element-wise multiplication operation, to jointly apply the dual weights to the three-dimensional feature map.

[0027] Specifically, channel gating weights Broadcasting extends to feature maps Apply global scaling to each channel within the same dimension, and apply band-gated weights. This extends along the spectral dimension, suppressing noise bands and enhancing key spectral responses. The joint modulation formula for both is: in, This represents the output feature map. This indicates that after element-wise multiplication to optimize the spectral features, the output features are flattened into a two-dimensional form. Its channel dimensions implicitly contain spectral discriminative information, providing rich information input for subsequent spatial analysis.

[0028] (2) Constructing a dynamic basis vector generation module This embodiment also introduces learnable spectral basis vectors for spectral dimension compression, improves the physical interpretability of basis vectors through L2 normalization, and integrates global statistics and local gradient generation gating weights. Finally, it extracts high-response spectral bands through an attention mechanism to achieve spectral dimension reduction and focused representation, providing a more compact and effective input for subsequent spatial modeling.

[0029] To address the issues of high band redundancy and sensitivity to local noise in hyperspectral data, this embodiment proposes a dynamic basis vector generation module that integrates learnable basis vectors and a dynamic gating mechanism, such as... Figure 3 As shown, the input to this module is the two-dimensional intermediate feature representation output by a dynamically gated convolutional network, which has been fused with preliminary spatial-spectral semantic enhancement. Physically interpretable spectral pattern primitives are constructed through dynamic basis vector learning and normalization constraints. A set of learnable basis vectors is defined. ,in L The number of basis vectors. C denoted as the number of spectral bands. The basis vectors are initialized using a Xavier orthogonal distribution to ensure initial diversity, and their orientations are dynamically optimized through backpropagation. To enhance the physical meaning of the basis vectors, L2 normalization constraints are periodically applied during training. in, l Indicates the first l There are learnable spectral basis vectors, with variables ranging from 1 to all integers L. for Bl The L2 norm represents Bl The length of the mold, This is the assignment operator.

[0030] This constraint forces the basis vectors to converge to the unit direction, thus characterizing typical spectral patterns such as the red-edge reflection peak of vegetation. To construct a dynamic gating mechanism, the module models global statistical features and local spectral gradient changes through two branches. The global channel branch calculates the band mean along the spatial dimension to characterize the overall band reflection intensity.

[0031] in, This represents the band mean vector output by the global channel branch, where N represents the total number of pixels in the spatial dimension. Indicates the first nFeature vectors of spatial locations.

[0032] Meanwhile, the local spectral mode branch uses one-dimensional depthwise separable convolution to slide along the spectral dimension to extract gradient features from neighboring bands. It captures regions of abrupt change. Global statistical features are encoded using MLP and then fused with local convolutional features to generate dynamic gating weights, emphasizing important bands and suppressing noise disturbances.

[0033] in, Indicates the gating weight, This means that the global statistical vector is input into the multilayer perceptron to extract the importance score of each band under the global structure. For averaging operations, spectral feature dimensionality reduction is then achieved through basis vector attention compression. The gated enhanced features are then... Calculate the dot product similarity with the basis vectors: in, Indicates the first n The feature vector of the i-th spatial location and the i-th l Similarity scores between basis vectors Indicates the first n A feature vector at a spatial location that has undergone gating enhancement. Indicates the first l The transpose of the learnable basis vectors is then used. Attention weights are then generated through Softmax normalization along the spatial dimension. in, Indicates the first l Among the attention weights corresponding to the basis vectors, the first... n The weight value of each spatial location, This means using an exponential function to make the integral of the points positive and widen the gap, so that high-match values ​​receive higher weights. Represents all spatial locations for the first... l The exponents of the fractions of each basis vector are summed. Finally, a weighted aggregation is performed to generate a low-dimensional token. Indicates the first l Vector Tokens: .

[0034] S3. Based on spectral features, spatial features are extracted by using a dynamic gated 2D convolution module and a dynamic gated multi-head attention module.

[0035] In the spatial feature extraction branch, the dynamically gated 2D convolutional module extracts local spatial texture features through depthwise separable convolution. Its channel attention gating mechanism generates spatial feature weights based on global average pooling, suppressing invalid regions while enhancing boundary responses. This feature is then processed by a dynamically gated multi-head attention module (such as...). Figure 4 As shown in the figure, the processing involves a dual-path fusion of global average pooling to extract global features and 3×3 depthwise separable convolution to capture local neighborhood correlations, generating a head-level gating weight matrix that dynamically suppresses redundant attention heads and enhances feature dependencies in different spaces that are sensitive to classification.

[0036] Global spatial feature extraction, by modeling large-scale spatial distribution patterns and cross-regional semantic relationships, provides a basis for understanding the macroscopic layout of land cover categories. Local spatial feature extraction, on the other hand, focuses on pixel-level texture differences and geometric changes within a neighborhood, which is crucial for identifying morphological detail differences among similar land cover types. The dynamic gating spatial feature joint mechanism proposed in this embodiment achieves adaptive fusion of multi-level spatial features by establishing cross-scale interaction between global statistics and local convolutional responses. For example... Figure 2 As shown, the framework comprises two core components. The dynamically gated 2D convolution module extracts local spatial texture features through depthwise separable 2D convolutions and introduces a channel-level gating mechanism. It generates channel weights based on global average pooling, dynamically enhancing the response intensity of the discriminative feature map. The dynamically gated multi-head attention module fuses global spatial statistical features with local depthwise convolutional features, dynamically adjusting the focusing intensity of different attention heads on discriminative spatial regions such as road intersections and building edges through lightweight gating weights. To balance global context modeling and local detail preservation, a cross-layer residual connection is designed to add the original input and the fused features, and adaptively fuses the local convolutional output and gating attention features through learnable dynamic weight parameters.

[0037] (1) Innovative construction of dynamic gated two-dimensional convolution module The Dynamically Gated 2D Convolutional Module (DG2DConv) takes the flattened features output from the 3D module as input and focuses on refined feature optimization in the spatial dimension. The module extracts basic spatial features through depthwise separable convolutions, with each channel's spatial features processed independently to extract geometric details such as edges and corners. in, This represents the output feature map. This indicates a depthwise convolution operation, where convolution is performed independently on each channel. The input 2D feature map is derived from the dynamically gated 3D convolutional module. This represents the learnable weight parameters of a depthwise convolution.

[0038] Pointwise convolution reconstructs cross-channel correlations using a 1×1 convolution kernel: in, Represents a 1×1 convolution. This represents the weights of the pointwise convolution.

[0039] To overcome the insufficient ability of 2D convolution to discriminate spatial textures of objects with different spectral characteristics in complex scenes, the module introduces channel-level dynamic gating to modulate the feature map.

[0040] in, Indicates the first c The gating weight of each channel, This indicates the height and width after flattening. Indicates channel c exist Activation values ​​at spatial locations. Channel weights are multiplied channel-by-channel by the feature map to enhance key discriminative texture channels and suppress noise-interfering channels. The resulting gated enhanced spatial feature map is as follows: .

[0041] (2) Constructing a dynamic gating multi-head attention module The dynamic gating multi-head attention module proposed in this embodiment achieves dynamic optimization of spatial attention by fusing global statistical features with local multi-scale details. Its workflow first extracts the mean and variance of the channel dimension from the input features as global statistics to characterize the overall pattern of spatial distribution.

[0042] in, Indicates spatial location Eigenvalues, spatial feature tensor Where B is the batch size. This represents the spatial dimension, and C is the number of channels. Then, global statistics are concatenated: .

[0043] To ensure the modeling capability of ground textures at different scales, the module employs depthwise separable convolutions with kernel sizes of 3×3, 5×5, and 7×7 to extract spatial features in parallel. in, This represents a depthwise separable convolution with a kernel size of . Using global max pooling operation Compression in the spatial dimension and pooling yield the maximum activation value of each channel at the k-th scale, i.e., the most significant spatial response: in, This represents a global pooling operation. The local response features after pooling at each scale are weighted and fused according to the channel dimension to obtain a multi-scale spatial feature aggregation result. .

[0044] Next, global statistics are concatenated with local features to guide the attention gating mechanism: .

[0045] Features are obtained by splicing data F The input is a lightweight multilayer perceptron, which generates dynamic gating weights corresponding to the number of attention heads. These weights are normalized to the [0,1] interval by the Sigmoid function to quantify the importance of each attention head to different spatial regions.

[0046] in, For activation function, This represents the activated gate vector. This represents the normalized gating weights. This represents the gating weights involved in attention scaling after the data has been reshaped. and This represents the weights of the first and second layer fully connected layers. and Represents the bias vectors of the first and second layers, is the dimensionality compression factor of the intermediate layer, and Heads is the total number of attention heads.

[0047] Subsequently, during the attention calculation process, the input features are projected into query (Q), key (K), and value (V), and processed separately: .

[0048] Then, based on the number of attention heads, the space is divided into multiple subspaces: Where N = H × W represents the number of spatial locations, d =C / Heads represents the number of channels per attention head. It indicates that the Q, K, and V channel dimensions are split into Heads subspaces, each with dimensions of... d , h Indicates the first h One point of attention.

[0049] Calculate the attention score for the i-th head and apply gating. Broadcast the dynamic gating weights to each attention head. Scale the similarity matrix using element-wise multiplication. Multiply the scaled attention weight matrix with the value matrix to generate a weighted aggregated value vector. in, Represented as an attention weight matrix, This is a scaling factor to prevent the dot product result from becoming too large. The similarity matrix between each location is calculated as follows: in, Indicates the first h Attention output based on size This indicates that attention weights are applied to each spatial location.

[0050] S4. Based on the spectral features and the spatial features, the data is concatenated along the channel dimension and then input into the Transformer encoder. Cross-modal feature interaction is achieved through a multi-head attention mechanism, and finally, classification is completed by a multilayer perceptron.

[0051] Spatial and spectral features are concatenated along the channel dimension and input into the Transformer encoder. Cross-modal feature interaction is achieved through a multi-head attention mechanism, and finally, a multilayer perceptron completes classification based on the category label features. The modulated attention output is added to the original input features through residual connections, and layer normalization is used to stabilize the training process, introducing higher-order spatial correlations while preserving low-level spectral information.

[0052] in, Y For module output, This indicates that the channel dimension is normalized.

[0053] Example 2 To demonstrate the effectiveness and reliability of this invention, this embodiment selected five publicly available hyperspectral datasets for experiments, including the Kennedy Space Center (KSC), Pavia Center (PaviaC), Salinas Valley, Botswana Wetlands, and Houston13 datasets.

[0054] (1) Dataset description and evaluation metrics The KSC dataset, acquired in 1996 by the AVIRIS sensor at the Kennedy Space Center in Florida, USA, contains 224 spectral bands with a wavelength range of 0.4–0.45 micrometers, a spatial resolution of 18 meters, and an image size of 512×614 pixels. It covers 13 types of land features, such as swamps and pine forests. After preprocessing, 176 valid bands were retained. The PaviaC dataset, acquired in 2003 by the ROSIS-03 sensor in downtown Pavia, Italy, contains 115 spectral bands with a wavelength range of 0.43–0.86 micrometers, a spatial resolution of up to 1.3 meters, and an image size of 1096×715 pixels. It covers 9 types of urban land features, such as asphalt pavements and bricks. After noise removal, 102 bands were used.

[0055] The Salinas dataset was collected in 1998 by the AVIRIS sensor in agricultural areas of California, USA. It contains 224 bands with a wavelength range of 0.4–2.5 micrometers, a spatial resolution of 3.7 meters, and an image size of 512×217 pixels. It includes 16 types of crops such as vineyards and lettuce. After preprocessing, 204 bands were retained.

[0056] The Botswana dataset was acquired by the Hyperion sensor in the Okavango Delta, Botswana in 2001. It contains 242 bands with a wavelength range of 0.4–2.5 micrometers, a spatial resolution of 30 meters, and an image size of 1476×256 pixels. It covers 14 ecological types, such as wetlands and shrublands. After denoising, 145 bands were used.

[0057] The Houston13 dataset is from the 2013 IEEE GRSS data fusion competition. It was collected in 2012 in downtown Houston, USA, by a CASI-1500 sensor. It contains 144 bands with a wavelength range of 0.38–1.05 micrometers, a spatial resolution of 2.5 meters, and an image size of 349×1905 pixels. It covers 15 types of natural and man-made features, such as roads and buildings. The entire band was normalized in the experiment.

[0058] Each dataset uses a band combination: KSC:(85,52,30); PaviaC:(63,42,19); Salinas:(180,100,25); Botswana:(110,65,38); Houston13:(95,63,42).

[0059] Because the size of the available labeled samples varies across the five datasets, different proportions of samples were used for training, validation, and testing. Specifically, for the PaviaC, Salinas, and HU13 datasets, this example uses 1% and 99% of the samples for training and testing, respectively. For the Botswana dataset, 5% and 95% were used for the same purpose. Furthermore, the KSC dataset uses 10% for training and 90% for testing.

[0060] In the following experiments, this embodiment uses three metrics to evaluate classification performance: overall accuracy (OA), average accuracy (AA), and the Kappa coefficient (K). OA reflects the approximate accuracy of classification by the proportion of correctly classified labeled samples in the test set to the total number of samples. AA measures the precision of a single class by the ratio of the classification accuracy of each class to the total number of classes in the dataset, using the mean AA of all classes as the evaluation criterion. The Kappa coefficient provides a comprehensive assessment of the consistency between the classification results and the true situation. Generally, the higher the value of these metrics, the better the classification performance.

[0061] (2) Experimental setup To ensure consistency in the experiments, all tests in this embodiment were conducted on a desktop computer equipped with an i9-10940X CPU @ 3.30GHz processor, 32GB of RAM, and an NVIDIA GeForce RTX 2080Ti. The software environment included the Ubuntu operating system, Python 3.9, and the PyTorch 1.12 deep learning framework.

[0062] (3) Parameter settings In the preprocessing stage, this embodiment systematically processes the hyperspectral dataset: First, the original data is dimensionality reduced using Principal Component Analysis (PCA). This involves normalizing the data to a mean of 0 and a variance of 1, ensuring that each principal component has zero mean and unit variance, eliminating dimensional differences between features, enhancing model stability, and reducing noise sensitivity. In this way, the present invention eliminates dimensional differences between different features, enhancing the model's stability and generalization ability to the input data.

[0063] Furthermore, this preprocessing step reduces sensitivity to noise variations, making the data easier to process and compare using algorithms. Subsequently, this embodiment performs PCA dimensionality reduction on the preprocessed data. For the Salinas, HU13, Botswana, KSC, and PC datasets, this embodiment reduces the dimensionality to 30. This step not only reduces the data dimensionality but also effectively extracts the essential patterns of spectral features and removes redundant noise information. In the proposed deep network training framework, after multiple verifications in this embodiment, the training batch size is fixed at 64, and the number of training iterations is set to 100. The Adam algorithm is used as the optimizer to update gradients, and cross-entropy is used for network optimization as the loss function. Regarding the learning rate setting, this embodiment has verified through multiple rounds of experiments that the model's training performance is best on average when the learning rate is set to 0.001. When the learning rate is below 0.001, the model's training speed slows down significantly and may not converge completely, while when the learning rate is above 0.001, the model's training process becomes unstable, resulting in large fluctuations in the loss function and even divergence in some cases. Therefore, considering both the model's convergence speed and classification performance, this embodiment sets the learning rate to 0.001 to achieve better training results.

[0064] (4) Comparative experiment To reasonably evaluate the performance and efficiency of the proposed model, it was compared with seven representative deep learning models: SSFTT, GSF, DHCRGCFN, MASSFORMER, CNN3D, RSSAN, and SPEFORMER. To ensure fair testing, all algorithms were trained and tested on the same sample set. Furthermore, both the proposed algorithm DGFN and the comparison algorithms were validated using the same experimental setup, including data preprocessing and parameter settings, fully guaranteeing the comparability of the results.

[0065] To improve the accuracy of classification comparisons, the experimental results were averaged across ten runs. Detailed information on the accuracy, OA, AA, and Kappa coefficients of each algorithm on the Botswana, KSC, PC, Salinas, and HU13 datasets, along with their corresponding means, is summarized. Best and second-best results are highlighted in bold and underlined. The data clearly demonstrate that the proposed algorithm achieves the highest values ​​in all three evaluation metrics—OA, AA, and Kappa coefficients—outperforming other algorithms. On the HU13 dataset, compared to the second-best algorithm, DHCRGCFN, the proposed DSS-DGFN improves performance on the three evaluation metrics by 0.394%, 1.151%, and 0.342%, respectively. Similarly, on the KSC dataset, the proposed algorithm outperforms the second-best algorithm by 0.789%, 0.897%, and 0.917% in OA, AA, and Kappa, respectively. Although the improvement on the PC dataset is not statistically significant, the proposed algorithm achieves the highest accuracy across all evaluation metrics. The proposed algorithm demonstrates superior classification performance on the challenging HU13 dataset.

[0066] The results also show that the proposed algorithm DSS-DGFN outperforms the other seven comparison algorithms on the KSC, PC, and HU13 datasets. On the Botswana dataset, it ranks second only to the best algorithm Massformer in AA (average accuracy) at 0.155%, and on the Slinas dataset, it ranks second only to Massformer in OA (average accuracy) at 0.064%. The proposed DSS-DGFN achieves superior classification results on multiple datasets, indicating the positive impact of using the dynamic gating fusion mechanism. The improvement in AA on imbalanced datasets demonstrates enhanced overall discriminative power for each class, enabling more accurate identification and classification of minority group samples. Notably, the proposed algorithm achieves more significant improvements on the challenging KSC dataset, suggesting that its structure may be more suitable for such challenging datasets. Taking the HU13 dataset as an example, the method of this invention exhibits superior performance, particularly achieving a maximum improvement of 98.441 ± 0.03% in AA. This further validates the effectiveness of the method in handling minority samples.

[0067] Experimental results show that although the classification maps generated by SSFTT, Massformer, SpectralMamba, DHCRGCFN, and the proposed DGFN algorithm are similar, DGFN obtains the clearest classification map and is most similar to the real world. In the "4-week-old romaine lettuce" category of the Salinas dataset, the classification is very close to the actual land cover map. Furthermore, on the KSC dataset, Scrub's recognition is very close to the actual land cover map, while other algorithms exhibit varying degrees of misclassification in pixel classification in this area. In contrast, the classification map generated by DBSSN is the most accurate and smooth, especially at the boundaries between different categories. The PC dataset presents a more challenging classification task due to the heterogeneous and fragmented distribution of land cover. Observing the Self-Blocking Bricks section in the lower center of the classification map generated by the algorithm, it is clear that the category classification of the proposed algorithm is the most accurate.

[0068] This example records the runtime, model complexity, and computational cost of different algorithms. The algorithm with the best training time is highlighted in bold, while the testing time is indicated by underscores. The results show that DGFN's training time is slightly slower than MASSFORMER and SPEFORMER. SSFTT has superior training and testing speeds, which can be attributed to its single-branch structure, while DGFN uses a spatial-spectral dual-branch structure, resulting in a relative slower speed. However, DGFN's model complexity is at a moderate level, which is commendable. Although CNN3D has the shortest training time, experimental results show that its accuracy is not particularly high. In contrast, DGFN's dynamically gated cross-domain convolutions are superior in capturing spatial and spectral features. Although DGFN's model training time is slightly longer than MASSFORMER, this small sacrifice is worthwhile considering its acceptable accuracy performance.

[0069] This balance between computational efficiency and performance makes DGFN particularly attractive in practical applications, especially in scenarios with limited resources or high computational efficiency requirements. Overall, while DGFN may not be the optimal choice in terms of runtime, model complexity, and computational cost, its outstanding high accuracy compensates for this.

[0070] (5) Ablation test To further explore and verify the effectiveness of the proposed dynamic cross-dimensional gated convolution model, this embodiment mainly discusses the dynamic cross-dimensional gated convolution and the impact of each module on classification performance. The experiment was repeated ten times under the same conditions, and the results are presented as the mean. To examine the impact of the proposed dynamic cross-dimensional gated convolution on feature degradation and noise reduction when handling long-range dependencies, this invention compares the proposed dynamic cross-dimensional gated convolution with CNN2D and 3D hybrid convolution using the same algorithmic framework. The results show that the proposed convolution has superior performance, especially on the KSC dataset, where the OA index shows a significant accuracy improvement of approximately 2.432%.

[0071] When comparing convolutions with and without dynamic cross-dimensional gating, it is clear that the use of dynamic cross-dimensional gating significantly improves experimental evaluation metrics.

[0072] This indicates that dynamic gating enables convolutional operations to adaptively focus on effective feature regions, thereby enhancing feature extraction. It is worth noting that the KSC and HU13 datasets exhibit class imbalance, and OA represents the overall classification accuracy. For imbalanced datasets, an increase in OA indicates improved overall classification performance, reflecting the model's improved ability to balance majority and minority class recognition. Therefore, this algorithm significantly improves overall classification accuracy while maintaining class balance. In summary, the dynamic cross-domain gating proposed in this invention better handles the complexity of hyperspectral data and the relationships between features, leading to improved accuracy and stability in classification tasks. When examining the impact of the dynamic gating attention mechanism, this invention uses the basic Transformer as a replacement. The results show that the lack of dynamic gating attention reduces OA by 1.303%, 0.399%, 0.266%, 0.513%, and 0.265% on the KSC, HU13, PC, Botswana, and Salinas datasets, respectively. As mentioned earlier, OA represents the overall classification performance of the model, demonstrating the optimization effect of the dynamic gating attention mechanism in comprehensively distinguishing all classes. When the dynamic gating basis vector generation module is omitted, the model performance degrades. This degradation can be attributed to the feature compression and reconstruction achieved by the dynamic gating basis vector generation module, which transforms high-dimensional features into compact token representations, effectively addressing the spatial redundancy problem. Particularly on the KSC dataset, the OA, AA, and Kappa coefficients are improved by 1.824%, 1.59%, and 1.76%, respectively. This highlights the importance of transforming high-dimensional features into compact token representations.

[0073] The embodiments described above are merely preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Various modifications and improvements made to the technical solutions of the present invention by those skilled in the art without departing from the spirit of the present invention should fall within the protection scope defined by the claims of the present invention.

Claims

1. A hyperspectral image classification method based on a dynamic spectral-spatial dual-gated fusion network, characterized in that, Includes the following steps: S1. Based on the original hyperspectral cubic data, dimensionality reduction is performed through principal component analysis to obtain simplified three-dimensional data blocks; S2. Based on the simplified 3D data block, spectral features are extracted using a dynamic gated 3D convolution module and a dynamic basis vector generation module to obtain spectral features. S3. Based on the spectral features, spatial features are extracted by a dynamic gated 2D convolution module and a dynamic gated multi-head attention module to obtain spatial features; S4. Based on the spectral features and the spatial features, the data is stitched together in the channel dimension and then input into the Transformer encoder. Cross-modal feature interaction is achieved through a multi-head attention mechanism, and finally, classification is completed by a multilayer perceptron.

2. The hyperspectral image classification method based on a dynamic spectral-spatial dual-gated fusion network as described in claim 1, characterized in that, S1 includes: based on raw hyperspectral cubic data Principal component analysis was used to reduce dimensionality, extract discriminative spectral principal components, and obtain simplified three-dimensional data blocks. .

3. The hyperspectral image classification method based on a dynamic spectral-spatial dual-gated fusion network as described in claim 1, characterized in that, S2 includes: Based on the simplified 3D data block, spectral features are first extracted through a dynamically gated 3D convolution module to obtain a 3D feature map. Based on the three-dimensional feature map, a low-dimensional spectral token is obtained by performing spectral compression and semantic representation through a dynamic basis vector generation module.

4. The hyperspectral image classification method based on a dynamic spectral-spatial dual-gated fusion network as described in claim 3, characterized in that, The dynamically gated 3D convolution module performs the following operations: Based on simplified 3D data blocks, cross-band correlation features are extracted by sliding a 3D convolution kernel along the spectral dimension. Based on the 3D convolution output, the features are dynamically modulated through a channel-band dual-channel gating mechanism to obtain the optimized 3D feature map.

5. The hyperspectral image classification method based on a dynamic spectral-spatial dual-gated fusion network as described in claim 1, characterized in that, S3 includes: Based on the spectral features, local spatial texture features are extracted using a dynamically gated 2D convolution module. Based on the local spatial texture features, global spatial association modeling is performed through a dynamic gated multi-head attention module to obtain spatial features.

6. The hyperspectral image classification method based on a dynamic spectral-spatial dual-gated fusion network as described in claim 5, characterized in that, The dynamically gated 2D convolution module performs the following operations: Based on the input spectral features, basic spatial features are extracted through depthwise separable convolution; Based on the aforementioned basic spatial features, enhanced local spatial texture features are obtained by modulating the features through a channel-level dynamic gating mechanism.

7. The hyperspectral image classification method based on a dynamic spectral-spatial dual-gated fusion network as described in claim 5, characterized in that, The dynamic gating multi-head attention module performs the following operations: Based on the local spatial texture features of the input, global statistical features and local multi-scale convolutional features are extracted; Based on the global statistical features and local multi-scale convolutional features, dynamic gating weights are generated. Based on the dynamic gating weights, the multi-head attention is modulated to obtain the spatial features.

8. The hyperspectral image classification method based on a dynamic spectral-spatial dual-gated fusion network as described in claim 1, characterized in that, The Transformer encoder in S4 includes residual connections and layer normalization operations to stabilize training and preserve high-order correlations between spectral and spatial features.