Next Article in Journal
Quantitative Inversion of Multiantenna Ground-Penetrating Radar Data with Modeling Error Correction Based on Long Short-Term Memory Cells
Next Article in Special Issue
DDSR: Degradation-Aware Diffusion Model for Spectral Reconstruction from RGB Images
Previous Article in Journal
Vegetation Influences on Cloud Cover in Typical Plain and Plateau Regions of Eurasia: 2001–2021
Previous Article in Special Issue
Spectral Reconstruction from Thermal Infrared Multispectral Image Using Convolutional Neural Network and Transformer Joint Network
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Hyperspectral Image Classification Based on Double-Branch Multi-Scale Dual-Attention Network

1
School of Geography and Planning, Chengdu University of Technology, Chengdu 610059, China
2
School of Earth Sciences, Chengdu University of Technology, Chengdu 610059, China
*
Author to whom correspondence should be addressed.
Remote Sens. 2024, 16(12), 2051; https://doi.org/10.3390/rs16122051
Submission received: 21 April 2024 / Revised: 25 May 2024 / Accepted: 4 June 2024 / Published: 7 June 2024

Abstract

:
Although extensive research shows that CNNs achieve good classification results in HSI classification, they still struggle to effectively extract spectral sequence information from HSIs. Additionally, the high-dimensional features of HSIs, the limited number of labeled samples, and the common sample imbalance significantly restrict classification performance improvement. To address these issues, this article proposes a double-branch multi-scale dual-attention (DBMSDA) network that fully extracts spectral and spatial information from HSIs and fuses them for classification. The designed multi-scale spectral residual self-attention (MSeRA), as a fundamental component of dense connections, can fully extract high-dimensional and intricate spectral information from HSIs, even with limited labeled samples and imbalanced distributions. Additionally, this article adopts a dataset partitioning strategy to prevent information leakage. Finally, this article introduces a hyperspectral geological lithology dataset to evaluate the accuracy and applicability of deep learning methods in geology. Experimental results on the geological lithology hyperspectral dataset and three other public datasets demonstrate that the DBMSDA method exhibits superior classification performance and robust generalization ability compared to existing methods.

1. Introduction

Since its emergence in the 1980s, hyperspectral remote sensing technology has rapidly developed and is considered a major technological breakthrough alongside radar technology [1]. Hyperspectral images have garnered widespread attention due to their unique spectral information, becoming a research hotspot and a distinctive frontier field. Hyperspectral remote sensing images differ from ordinary panchromatic images (single band), color images (three bands), and multispectral images (more than 3 but less than 10 bands) as they consist of dozens or even hundreds of bands. Each pixel in a hyperspectral image can yield a complete spectral curve. The spectral curve contains rich spectral information, and the image features contain abundant spatial information. Therefore, hyperspectral images can store and acquire comprehensive and in-depth feature information. This characteristic allows hyperspectral images to be effectively applied in various fields, such as resources [2,3], environment [4], urban planning [5], ecology [6], and geology [7,8]. Especially in geology, the identification and classification of surface lithology is fundamental. Traditionally, this relied on geologists conducting field surveys to sample and identify rock outcrops. The entire cycle from field survey to sample identification is time consuming and demands significant manpower and resources [9]. With the rapid development of modern remote sensing technology, quickly identifying surface lithology using remote sensing images has become possible. With the emergence of artificial intelligence, deep learning methods have begun to replace traditional machine learning and are widely utilized in various fields. However, progress in hyperspectral lithology identification is still slow, with most approaches relying on simple convolutional networks. The improvement in recognition performance has not been significant [7,8].
Currently, many scholars are dedicated to advancing hyperspectral image classification. Hyperspectral image classification is a fundamental and critically important research area in hyperspectral technology. The general steps include dataset division [10,11], image restoration (denoising and missing data recovery) [12,13], dimensionality reduction [14], and feature extraction [15,16,17,18,19]. Among these steps, feature extraction is the most crucial stage of hyperspectral image classification. For a long time, machine learning methods have been used to classify HSI, but these methods often focus solely on HSI spectral features in classification, such as support vector machines (SVM) [20], multinomial logistic regression (MLR) [21], and dynamic subspace detection (DSD) [22]. However, relying solely on spectral information often leads to two issues:
  • High-dimensional spectral data and a small number of training samples often lead to the Hughes phenomenon, where classification accuracy first increases and then decreases as the number of participating bands increases [19].
  • Spectral variability refers to changes in the spectrum caused by atmospheric effects, shadows, instrument noise, and other factors. High spectral variability in some categories makes it challenging to classify objects of the same category into the same group (“same objects with different spectra”). Conversely, low spectral variability among certain distinct classes complicates their differentiation (“different objects with the same spectra”) [23].
In summary, traditional machine learning classification methods based on single-pixel spectral features are no longer applicable. Deep learning (DL), developed from machine learning, can create abstract high-level features by combining low-level features, thus representing attribute categories or information features. In recent years, deep learning methods have been utilized in hyperspectral imaging (HSI) classification, demonstrating distinct advantages. For example, Song et al. [24] utilized the Long Short-Term Memory (LSTM) method to extract spectral–spatial information in six directions from the original hyperspectral imaging (HSI) data. This approach captures spectral–spatial dependencies in various directions, enabling comprehensive information extraction and precise classification of hyperspectral images. Hong et al. [19] proposed two methods: group intelligence spectral embedding (GSE) and cross-layer adaptive fusion (CAF), utilizing ViT as the backbone network. The results showed that using only the Transformer structure can yield good outcomes in HSI classification. Although deep neural network frameworks have achieved good classification results in HSI classification, their ability to represent spatial and spectral information is still insufficient, and they lack an effective dataset partitioning strategy. The summary is as follows:
  • The convolution-based backbone network demonstrates strong capabilities in extracting spatial structure and local context information from HSI. However, simple convolutional neural networks cannot capture global information, and hyperspectral data often yields poor classification results due to excessive redundancy. Even with the addition of an attention mechanism, extracting diagnostic spectral and spatial characteristics remains ineffective. Additionally, most current convolution-based networks focus excessively on spatial information. This focus can distort the learned spectral features, complicating the extraction of diagnostic spectral attributes [19].
  • The Transformer-based backbone network has a strong capability to extract spectral information and sequence features from HSI. Despite numerous attempts to improve local information extraction by incorporating various modules [19,25,26,27,28], the linear projection operation of Transformers still interferes with local spectral-spatial information, resulting in the loss of crucial information during classification. Additionally, the utilization of spatial information is inadequate, making it challenging to distinguish and categorize cases of “same objects with different spectra” and “different objects with the same spectra”.
  • Currently, most neural networks employ a patch-wise dataset division method. This approach involves selecting a center pixel and combining it with its neighboring pixels to form a patch. The network then predicts the center pixel by extracting and analyzing information from the entire patch. A sliding window strategy is subsequently used to predict the labels of all patch center pixels. While this method is simple and practical, it has drawbacks. Random sampling can cause overlap and information leakage between the training and test sets, potentially leading to overly optimistic results [29].
The MSeRA structure in this article and the attention-guided feature pyramid module from the Attention Pyramid Network with Bidirectional Multilevel Multigranularity Feature Aggregation and Gated Fusion in satellite imagery have similar effects. Both enhance diagnostic features and suppress irrelevant ones [30]. Leveraging PSNet’s ability to aggregate local and global features, a self-attention mechanism is incorporated into 3D-CNN to further enhance feature representation [31]. Although many researchers recognize the significance of multi-scale features in images and incorporate them into various network models, most networks merely use multi-scale structures to extract diverse semantic features. They often fail to focus on extracting crucial features, resulting in redundant feature information. Moreover, they do not adequately extract and integrate the complex spectral–spatial features in hyperspectral data, leading to insufficient spectral–spatial information [15,29,32,33,34,35]. This article presents a network framework that integrates a convolution-based network model with a self-attention mechanism, combining the advantages of convolutional networks in extracting local information and self-attention mechanisms in extracting global information. This approach better captures diverse information from HSI data. Additionally, this article considers the issue of information leakage from overlap between the training set and the test set [36], as well as the challenge of achieving high classification accuracy for hyperspectral images with small sample sizes and imbalanced samples. This article introduces a double-branch multi-scale dual-attention (DBMSDA) network for HSI classification. The network framework comprises two branches: the spectral branch and the spatial branch. In the spectral branch, the MSeRA structure combines multi-scale and self-attention mechanisms to extract diagnostic multi-scale spectral information from hyperspectral images. This structure is used in dense connections to enhance the reusability and sharing capabilities of multi-dimensional spectral information. Spectral self-attention mechanisms are employed to filter the extracted spectral information to obtain diagnostic spectral information suitable for classification. In the spatial branch, dense connections are used to fully extract spatial information. Subsequently, spatial self-attention mechanisms refine the extracted spatial information, obtaining diagnostic spatial information suitable for classification. Finally, the two are fused for classification. Combining multi-scale, self-attention mechanisms and dense connections comprehensively extracts complex spectral information in hyperspectral images, significantly improving classification accuracy. Additionally, this article adopts the dataset partitioning strategy used in [11] to prevent information leakage between the training and test sets. To demonstrate the continued effectiveness of the proposed network model for hyperspectral lithology identification, a new hyperspectral geological lithology dataset was created and compared with other networks using the same dataset partitioning strategy.
The main contributions of this article can be summarized as follows:
  • Due to the limitations of information obtained at a single scale, this article proposes a multi-scale spectral residual self-attention (MSeRA) structure. This structure combines spectral self-attention mechanisms with multi-scale integration and utilizes residual connections to prevent gradient vanishing, effectively extracting high-dimensional complex spectral information from hyperspectral images. This module serves as a fundamental dense block unit in dense connections, enabling multiple extractions and integrations of spectral features. This enhances the transmission of spectral features and more effectively utilizes valid spectral information. It ensures the acquisition of long-distance information in the network, avoiding gradient explosion and vanishing while enhancing the extraction of spectral features. Additionally, this module extracts diagnostic features from hyperspectral images to the fullest extent, even with limited samples and sample imbalances, thereby enhancing classification accuracy.
  • This article adopts a training-test set division method to prevent information leakage in the dataset. This approach enhances the utilization of limited labeled samples, ensures the accuracy of sample labels, and prevents potential information leakage between the training and test data.
  • This article introduces a new hyperspectral geological lithology dataset, showcasing the benefits of the DBMSDA network in lithology recognition. It addresses the lack of deep learning methods in hyperspectral remote sensing lithology recognition and enhances the identification performance in this field. The study highlights the significant research potential and value of deep learning methods in hyperspectral remote sensing lithology identification.

2. Related Works

2.1. HSI Classification Method Based on Deep Learning

Deep learning networks have been successfully utilized in HSI classification due to their ability to effectively extract complex diagnostic spectral and spatial information from hyperspectral images. For example, Song et al. [32] proposed the DFFN network, which uses a multi-scale feature extraction module to extract deep spectral–spatial information from original HSI data for classification. In the same year, Zhong et al. [37] proposed the SSRN network, applying residual connections to extract spectral and spatial information. The spectral residual module first extracts spectral information from the original data, while the spatial residual module extracts spatial information from the spectral residual module’s results. The SSRN network not only prevents network gradient disappearance but also connects spatial and spectral information, enabling effective information extraction from HSI data. However, these deep learning methods solely rely on convolutional neural networks for hyperspectral image classification. Extracting valuable information from hyperspectral images is challenging due to abundant redundant data, leading to subpar classification performance.
Additionally, the Transformer network framework, based on NLP, can be effectively applied to data with sequence characteristics. Therefore, some scholars have utilized Transformers in HSI classification. This relatively new network framework is primarily based on the ViT network structure. For example, Ibañez et al. [12] proposed using an auto-encoding network to reconstruct the original HSI information, performing denoising and dimensionality reduction during reconstruction. The most robust encoding features can be dynamically revealed during reconstruction, which benefits subsequent networks utilizing the SpectralFormer structure for HSI classification. However, this type of network tends to lose essential local spectral–spatial information, leading to poor classification performance.
The attention mechanism shows great potential in deep learning algorithms because it can extract useful features and suppress irrelevant ones. Therefore, combining the attention mechanism with convolutional neural networks has been widely used in hyperspectral image classification. For example, Hang et al. [38] utilized an attention mechanism based on convolution principles, such as CBAM, to design spatial and spectral attention modules. These modules were designed to extract spatial and spectral features and were ultimately integrated for HSI classification. Zhang et al. [39] designed a spectral branch structure with a multi-channel spectral attention module to extract rich multi-scale spectral features, emphasize useful ones, and suppress useless ones. They also developed a spatial branch structure with a multi-channel spatial attention module to extract rich multi-scale spatial features, emphasize useful ones, and suppress useless ones, and finally utilized a multi-scale semantic module to fuse the two for HSI classification. However, these attention mechanisms are all based on convolutional modules, which cannot capture global context information, particularly in the spectral dimension of HSI data. To address this issue, the self-attention mechanism in the Transformer structure is introduced within the convolutional neural network. The self-attention mechanism can model long-range dependencies to acquire global context information. Therefore, using the self-attention mechanism instead of the attention mechanism in the convolution module can better extract global information from HSI. For example, Zhong et al. [15] combined the CNN network and the self-attention mechanism to propose the Spectral–Spatial Transformer Network (SSTN), which can better extract spectral–spatial information from the original HSI. Li et al. [17] utilized the self-attention mechanism to create spatial and spectral attention modules for extracting spatial and spectral features, respectively. These features were then integrated for HSI classification. Although the introduction of the attention mechanism has greatly improved hyperspectral image classification accuracy, it has not enhanced the ability to extract spectral and spatial information.

2.2. HSI Classification Method Based on Double-Branch Networks

In recent years, scholars have noted that single-branch deep learning networks may inadequately extract spectral and spatial information due to interaction between the two processes [19]. To address this issue, researchers began examining double-branch networks to separately extract spectral and spatial information from hyperspectral data. They then integrated the two for classification, proposing several hyperspectral image classification models. For example, Ma et al. [40] proposed the DBMA network, designing separate spectral and spatial branches. They used a convolution-based attention mechanism to extract hyperspectral information. Li et al. [17] proposed the DBDA network, based on the DBMA network. They first used two convolutional dense networks to extract the spectral and spatial information of the HSI. They then employed spatial and spectral self-attention modules to highlight crucial features. Finally, the two sets of features were integrated for HSI classification. However, the DBDA network is insufficient for extracting both spatial and spectral information, leading to poor recognition ability in small sample categories.
Some scholars aim to enhance the network’s capacity to extract spatial and spectral information by incorporating multi-scale modules. For example, Song et al. [32] proposed the Deep Feature Fusion Network (DFFN), which combines residual and multi-scale extraction modules to extract information from hyperspectral data. This network can extract information at different scales while preventing vanishing gradients. Zou et al. [29] proposed the DA-IMRN network, which cleverly designs a multi-scale extraction method into a multi-scale spectral block (MSpeRB) and a multi-scale spatial block (MSpaRB). This approach aims to extract spectral and spatial information from hyperspectral data more accurately. However, these networks simply combine multi-scale extraction modules with convolutional networks without deeply considering how to extract hyperspectral data information more accurately.

2.3. Training–Test Set Division Method without Information Leakage

As early as 2017, Liang et al. [41] pointed out that the patch-based classification method and its corresponding data partitioning strategy, commonly adopted by most network models, may cause potential information leakage. The patch-based classification method aims to predict the label of the central pixel. However, its division strategy may lead to overlapping patches in both the training and test sets. In HSI classification, the partitioning of the training set and test set significantly impacts the accuracy of the results. Therefore, an urgent need exists for a dataset partitioning strategy that can ensure no information leakage between the training and test sets. Many scholars have already recognized this issue and have suggested several data partitioning methods that do not result in information leakage [10,11,41,42]. The dataset partitioning strategy proposed by [11] is more effective than that proposed by [10], as it helps avoid the loss of samples from certain classes in both the training and test sets. It is more reasonable to first divide the original image into training blocks, verification blocks, and test blocks, and then further subdivide these into the training set, verification set, and test set, as proposed by [11]. This article adopts the same dataset partitioning strategy as [11] to prevent information leakage between the training and test sets. Ultimately, this article opts for the pixel-wise partitioning method over the patch-wise partitioning method to prevent information leakage and capture optimal spatial context information. Additionally, this article recommends that readers interested in the issue of information leakage in datasets refer to references [41,43,44].

3. Materials and Methods

This article proposes a DBMSDA network. Its spectral branch consists mainly of three densely connected MSeRA structures and a spectral attention mechanism, used to capture diagnostic spectral features. The spatial branch consists mainly of three convolutional dense blocks and a spatial attention mechanism, used to capture diagnostic spatial features. The following sections will provide a detailed introduction to the overall structure, spectral branch structure, and spatial branch structure of the DBMSDA network.

3.1. DBMSDA Network Framework

The overall structure of the DBMSDA network is shown in Figure 1. It consists of three main parts: the spectral branch, the spatial branch, and the classification head. The spectral branch is at the top of the model diagram, and the spatial branch is at the bottom. Finally, the two branches’ features are combined for classification. The spectral branch mainly consists of the MSeRA dense connection module and spectral attention module, while the spatial branch comprises the spatial dense connection module and spatial attention module. The overall framework adopts a “parallel form” double-branch structure, differing from the “series form” single-branch network framework used by FDSSC [45] (where spectral information is first extracted, followed by spatial information). A single-branch network may cause spectral and spatial features of HSI data to be in different domains, potentially leading to the destruction of spatial features extracted later [40]. Since HSI data are stored as a three-dimensional cube, traditional 1D-CNN can only capture spectral information, while 2D-CNN can only capture spatial information to some extent [37]. Neither can effectively extract both spectral and spatial information simultaneously. However, 3D-CNN can extract both types of information concurrently, providing clear advantages in processing three-dimensional structural data like HSI. Therefore, this article uses 3D-CNN as the fundamental convolutional structure of the DBMSDA network to extract HSI features. The network input size is P R p 0 × p 0 × b 0 . To prevent data explosion and gradient disappearance, BN + Mish [17] is used to standardize the results after each convolution in dense connections. To extract as many useful features as possible, a self-attention mechanism is added after dense connections to emphasize important features. Then, the dropout layer and global average pooling layer are used to convert the cubic feature maps from the two branches into one-dimensional vector features. Finally, the two one-dimensional vector features are combined, and the linear layer is used for classification.

3.2. Spectral Feature Extraction Module Based on MSeRA Structure

3.2.1. MSeRA Structure

Although deep learning algorithms have achieved remarkable results in HSI classification, most methods only consider features on a single scale. Many experiments have confirmed that multi-scale features play a crucial role in HSI classification [29,32,46].
Based on the concepts of multi-scale and attention, this article introduces a multi-scale residual self-attention (MSeRA) structure, as illustrated in Figure 2. The MSeRA structure is a branching structure containing three convolution kernels of different sizes. This article uses a 1 × 1 × 1 convolutional layer as the initial component of the MSeRA structure to increase the input size. Then, a multi-scale convolution group is used for feature extraction. A convolutional group with three convolution kernels of different sizes (1 × 1 × b, where b1 = 3, b2 = 5, b3 = 7) is selected to construct feature representations at different scales. By utilizing multi-scale spectral dense blocks, the network can capture various levels of spectral features aligned with multiple receptive fields in each channel. This approach enables the network to gather more comprehensive spectral information, enhancing classification performance. The different output feature maps obtained at the three scales are then combined to obtain the fused feature. To address the issue of vanishing network gradients, this article uses skip connections to generate residual maps. This connection links the initial input features with the fused features to prevent gradient vanishing and information loss, enhancing the network’s expressive power. The spectral self-attention mechanism is then utilized to highlight valuable multi-scale spectral information and mitigate the impact of redundant data. The spectral self-attention mechanism here is consistent with the spectral attention block in Section 3.4.1 of the Spectral Attention Module. Finally, all feature maps are passed through a 1 × 1 × 1 convolutional layer to ensure consistent dimensions. The MSeRA structure can effectively extract spectral information from hyperspectral images, which contain rich features at various scales. It can also learn adequate and diagnostic spectral features from a small number of samples, enabling the network to achieve good results even with limited training samples.

3.2.2. Dense Block Based on MSeRA

Generally, according to the architectural principles of deep convolutional neural networks, increasing the number of convolutional layers and the stacking depth improves network performance. However, experiments show that having too many convolutional layers can result in gradient disappearance and gradient explosion. Dense connections [47] are an effective approach to address these issues.
Dense connections differ from residual connections [48]. Residual connections can be viewed as a mapping that allows input data to pass directly through the network [17], as illustrated in Figure 3a. Dense connections, proposed based on residual connections, directly link each layer to ensure a maximum information exchange between network layers, as illustrated in Figure 3b. The denser the connections, the more information flows through them. Specifically, a dense connection with N layers has N(N + 1)/2 connections, while a traditional convolutional network with the same number of layers has only N direct connections [17].
The residual block is the fundamental unit of a residual connection, and the output of the i-th residual block is represented as
x i = N i x i 1 + x i 1
Dense blocks are the fundamental components of dense connections. Traditional residual connections combine features by summing or connecting adjacent (two) features, while dense connections combine features by connecting across multiple channel dimensions. The output of the i-th dense block is represented as
x i = N i x 0 , x 1 ,   ,   x i 1
Among them, N i is the module containing the convolution layer, activation layer, and BN layer; x 0 , x 1 ,   ,   x i 1 is the feature map generated by the above dense block.
The dense connection module, based on the MSeRA structure proposed in this article, facilitates information flow between layers by densely connecting the MSeRA modules. It helps obtain spectral information from the original HSI data to the fullest extent and prevents gradient disappearance and explosion.

3.3. Spatial Feature Extraction Module

Due to the high-dimensional features of HSI data, shallow neural networks struggle to extract deep spatial features from hyperspectral images. Dense connections are also utilized here to establish information flow between different layers, preventing the loss of spatial information.
The structure of the densely connected modules in the spatial branch is similar to that in the spectral branch. However, the dense block unit in the spatial branch does not utilize a multi-scale residual self-attention structure like MSeRA. Instead, it comprises a simple 3D-CNN, BN layer, and Mish activation function. This design avoids distorting the learned spectral features with excessive spatial information. HSI classification primarily relies on spectral information, with spatial information playing a supporting role. Excessive spatial information can increase the difficulty of extracting spectral information [19].

3.4. Attention Mechanism

The attention mechanism automatically learns and selectively focuses on important information in the input, enhancing the model’s performance and generalization ability. Although 3D-CNN can effectively extract spectral and spatial information in HSI, convolution has a common flaw: invariance. This flaw is evident in that all spatial pixels are assigned equal weights in the spatial domain, and all spectral bands are given equal weights in the spectral domain. However, HSI involves a large number of spatial pixels and spectral bands, and it is important to note that different spatial pixels and spectral bands do not make the same contribution. The attention mechanism effectively addresses this problem. Its main function is to emphasize important information areas and ignore unimportant ones. Currently, the attention mechanism is widely used in various fields. To address various issues, researchers have developed a variety of attention modules. In DANet [49], the spectral attention block and spatial attention block, based on the self-attention mechanism, enhance the weight of important spectral and spatial information. The self-attention mechanism was first proposed and used in NLP [50]. Its main function is to model remote dependencies. Subsequently, the CV field recognized the significant potential of the self-attention mechanism and began extensive research and applications [19,50,51]. These two modules will be introduced in detail below.

3.4.1. Spectral Attention Module

Research shows that spectral information is the basis of HSI processing and determines the final classification performance [43,52]. Different ground object categories can be represented by corresponding high-level features. High-level features in the spectral of HSI data are often represented by channels, and different channels of HSI data often exhibit certain correlations. We can utilize their correlations to highlight interdependence [49]. As shown in Figure 4a, the channel attention map X R c × c is directly calculated from the original feature A R c × p × p , where the number of input channels is represented by c, The size of the input patch is expressed as p × p. Specifically, we need to first perform matrix multiplication of A in the form of R c × n with AT, where n = p × p, and then use the SoftMax operation to obtain the channel attention mapping in the form of X R c × c :
x j i = e x p A i × A j i = 1 c e x p A i × A j
where xji represents the influence of the i-th channel on the j-th channel. Then, perform matrix multiplication of XT with A and reshape the result into E R c × p × p :
E j = α i = 1 c x j i A j + A j
where α is initialized to 0 and can be learned to change values in the network. The final mapping E contains the weighted sum of all channel features and original features. This reflects the long-term semantic dependence between feature maps, enhancing the discriminability of features. Compared to the traditional channel attention mechanism (CAM), the spectral attention mechanism discussed in this article falls under self-attention mechanisms. This self-attention mechanism enables the extraction of dependency relationships among different spectra, facilitating the acquisition of global spectral context information. CAM only determines the significance of each channel by utilizing global maximum pooling and global average pooling across the spatial dimensions. Moreover, the strong correlation between hyperspectral image spectra cannot be captured by CAM.

3.4.2. Spatial Attention Module

Research shows that spatial features also play an important auxiliary role in HSI classification [43,52]. The spatial attention module can enhance the contextual relationship of local features. As shown in Figure 4b, two convolutional layers are used to perform a convolution operation on the input feature map A R c × p × p to obtain new feature maps B and C, where B , C R c × p × p . Then reshape B and C into R c × n and R n × c , where n = p × p represents the number of pixels. Then perform matrix multiplication on B and C, and use the SoftMax operation to calculate the spatial attention feature map S R n × n :
s j i = e x p B i × C j i = 1 n e x p B i × C j
where sji represents the influence of the i-th pixel on the j-th pixel. The stronger the correlation, the closer the feature representations of two pixels.
At the same time, a convolution layer is used to perform a convolution operation on the initial input feature A to obtain a new feature map and reshape it into R n × c . Then matrix multiplication is performed on D and ST, and the result is reshaped into R c × p × p . Finally, we multiply it by the scale parameter β and perform a summation operation with the initial feature A to obtain the final output E R c × p × p :
E j = β i = 1 n s j i D j + A j
where β is initialized to 0 and learns to assign more weights in the network. The obtained result E is the weighted sum of all location features and original features, which can reflect the spatial global context information. Compared to the traditional spatial attention mechanism (SAM), the spatial attention mechanism discussed in this article is a self-attention mechanism. This self-attention mechanism captures the dependency relationships between various spatial locations, enabling the extraction of comprehensive global spatial context information. While SAM captures the significance of spatial regions using global max-pooling and global average pooling in the channel dimension, it overlooks the impact of global contextual information on classification.

4. Results

In this section, we evaluate the effectiveness of the proposed DBMSDA network model on multiple datasets. We compare the proposed method with several typical and state-of-the-art HSI classification algorithms while ensuring no information leakage.

4.1. Datasets Description

To validate the effectiveness of our proposed method and enable fair comparison with existing approaches, we conducted performance evaluations on a self-constructed lithology dataset and three widely recognized public datasets: KY, Houston_2018 (Hu), Indian Pines (IN), and Salinas Valley (SV). These datasets are outlined as follows:
  • KY dataset: This hyperspectral lithology dataset was created using ENVI 5.3 software, MATLAB R2021b software, manual interpretation, and field surveys with data from the Zhiyuan-1 remote sensing satellite. The data were collected in the eastern part of Luolong County, Changdu City, Tibet Autonomous Region, China (Figure 5). The image has a spatial resolution of 30 m. The original remote sensing image covers an area of 147 square kilometers, situated between latitudes 30°33′–30°40′N and longitudes 96°07′–96°14′E. The terrain is predominantly bare mountains. The image has spatial dimensions of 300 × 300 and consists of 166 bands. Excluding background pixels, the number of spatial pixels used for the experiment is 89,981. There are six types of real ground objects, mainly consisting of various surface lithologies such as sand and gravel, mudstone, sandstone, quartz sandstone, slate, schist, and phyllite. These represent different surface outcrop lithologies, with detailed information provided in Figure 6. There is a clear imbalance in the number of samples from different categories. The average training pixels account for 4.5% of the labeled pixels.
  • Houston_2018 (Hu) dataset: This dataset was collected using an airborne hyperspectral sensor over the University of Houston campus and adjacent urban areas in 2018. The image has spatial dimensions of 601 × 2384 and consists of 50 bands. Excluding background pixels, there are 504,856 spatial pixels used for experiments. There are 20 types of ground objects, mainly buildings, vegetation, and urban ground objects. Detailed information is provided in Figure 6. There is a noticeable imbalance in the number of samples among different classes. The average training pixels account for 1% of labeled pixels.
  • Indian Pines (IN) dataset: This dataset was collected using the AVIRIS sensor in the Indian Pines region of northwest India in 1992. The image has spatial dimensions of 145 × 145, consists of 220 bands, and covers a wavelength range of 200–400 nm. The spectral and spatial resolutions are 10 nm and 20 m, respectively. Excluding background pixels, there are 10,249 spatial pixels used for experiments. There are 16 types of ground objects, primarily crops and vegetation, with a small number of buildings and other objects. Detailed information is provided in Figure 6. Due to the unavailability of 20 bands, the experiment only utilizes the remaining 200 bands out of the total 220 for research. There is a noticeable imbalance in the number of samples among different classes. The average training pixels account for 11.59% of labeled pixels.
  • Salinas Valley (SV) dataset: This dataset was collected using the AVIRIS sensor in Salinas Valley, California, USA in 1998. The image has spatial dimensions of 512 × 217, with a total of 224 bands. However, 20 water absorption bands were excluded, leaving 204 bands for hyperspectral image classification experiments. The spatial resolution is 1.7 m. Excluding background pixels, there are 54,129 spatial pixels used for experiments. There are 16 types of ground objects, mainly including vegetables, bare soil, and vineyards. Detailed information is provided in Figure 6. There is no imbalance in the number of samples among different classes. The average training pixels account for 4.3% of labeled pixels.

4.2. Datasets Partitioning Strategy

Many studies have shown that the traditional patch-based random partitioning method of hyperspectral datasets may lead to potential information leakage between the training set and the test set [41,43,44]. To prevent this problem and ensure a fairer evaluation of the network model’s classification performance, this article adopts the information leakage-free dataset partitioning method proposed by [11]. The specific steps are as follows:
  • First, determine the α parameter and β parameter. The α parameter represents the proportion of training pixels to all pixels in the original hyperspectral image, while the β parameter indicates the number of labeled pixels in each training block. From the above two parameters, we can know that the number of training blocks in each category is F i = f i × α ÷ β . Where i represents the category of each pixel, Fi represents the number of training blocks in the corresponding pixel category F i 1 , and fi represents the total number of pixels of each category in the original hyperspectral image.
  • According to the training pixel ratio α, the original hyperspectral image can be divided into two parts. One part is the training image, and the other part is the verification–test image. There is no overlap between these two images.
  • According to the number of labeled pixels β in each training block, the training image is divided into two parts. One part is defined as the training image, which is guaranteed to have labeled pixels, while the other part is defined as the leaked image. Similarly, the verification–test image is divided into a verification image and a test image.
  • Divide the acquired training image, leaked image, verification image and test image into blocks of W × H × B size to generate training blocks, leaked blocks, verification blocks and test blocks.
  • Finally, the sliding window strategy is used to divide the training patches, verification patches, and test patches from the blocks. These patches constitute the final training set, validation set, and test set.

4.3. Experimental Settings (Evaluation Indicators, Parameter Configuration, and Networkconfiguration)

In the experiment, multiple trials were conducted to investigate the impact of different learning rates on the outcome. The learning rates selected were 0.001, 0.005, 0.0001, 0.0005, and 0.00005. The optimal learning rate for multiple datasets was found to be 0.0005. The experimental epoch was set to 100, and the batch size was set to 64. The hardware used in the experiment included an Intel(R) Core(TM) i5-13400F CPU, NVIDIA GeForce RTX 3060 Ti GPU, and 32 GB of memory. The software environment included CUDA 12.2, PyTorch 2.0.1, and Python 3.10.11. In the experiment, the method described in this article was compared with classic and newer network models, including CDCNN, SSRN, SSTN, DBMA, DBDA, DRIN, SSFTT, SpectralFormer, FactoFormer, HyperBCS, 3DCT, DBMSDA (sub-1), and DBMSDA (sub-2).
To evaluate the robustness and effectiveness of the network model, this article uses overall accuracy (OA), average accuracy (AA), and the Kappa coefficient as performance indicators, averaging the results of 10 experiments. These three evaluation metrics collectively reflect the performance of the hyperspectral image classification model. Higher values in these metrics indicate better model performance. Let M R n × n denote the confusion matrix of the classification result, where n denotes the number of categories, and the value of M at the (i, j) position denotes the number of samples of the i-th category that have been classified into the j-th category.
The overall accuracy (OA) is calculated as the ratio of the total number of correctly classified pixels (excluding the background class) to the total number of all accurately annotated pixels. This metric evaluates the model’s overall classification performance on hyperspectral images. The calculation formula is as follows:
O A = s u m ( d i a g ( M ) . / s u m ( M ) )
The average accuracy (AA) is calculated as the average ratio of the total number of correctly categorized pixels for each category (excluding the background category) to the total number of pixels of each category with true annotations. This metric reflects the model’s accuracy in categorizing pixels for each category and, when combined with OA, provides a comprehensive evaluation of the model’s performance. The calculation formula is as follows:
A A = m e a n ( d i a g ( M ) . / s u m ( M , 2 ) )
In addition to OA and AA, the Kappa coefficient is also an important index for evaluating classification accuracy. It measures the consistency between the predicted results and the true value labels. The calculation formula is as follows:
K a p p a = O A ( s u m ( M , 1 ) s u m ( M , 2 ) ) / s u m ( M ) 2 1 ( s u m ( M , 1 ) s u m ( M , 2 ) ) / s u m ( M ) 2
In the above three formulas, d i a g ( M ) R n × 1 is the vector of diagonal elements of M, s u m ( · ) R 1 is the sum of all the elements, s u m ( , 1 ) R 1 × n is the vector of sums of elements in each column, s u m ( , 2 ) R n × 1 is the vector of sums of elements in each row, m e a n ( · ) R 1 is the average of all the elements, and / denotes the division of the element dimension.
Among these factors, the size of blocks and patches used to divide the datasets significantly impacts the performance of the network model. o ensure a balance between the number of samples and spatial context information in the divided datasets, we set the block and patch sizes of the IN dataset to 6 × 6 and 4 × 4, the Hu dataset to 8 × 8 and 6 × 6, and the SV and KY datasets to 10 × 10 and 8 × 8, respectively.
The number of densely connected units in the MSeRA structure proposed in this article impacts classification accuracy. Therefore, we selected two, three, and four MSeRA modules to determine the optimal number. The experimental results are shown in Figure 7a. In the KY, Hu, IN, and SV datasets, the OA, AA, and Kappa values obtained with 2 and 4 MSeRA modules are lower than those obtained with three modules. From this, it is evident that using three MSeRA blocks more effectively extracts spectral features from hyperspectral images and achieves the best classification results.
The size of the multi-scale convolution group in the MSeRA module impacts classification accuracy. The size of various convolution kernels is related to the number and refinement of features that can be obtained. To further investigate the impact of multi-scale convolutional groups on classification performance, we selected combinations of convolution kernel sizes such as 1 × 1 × 3, 1 × 1 × 5, 1 × 1 × 7, and 1 × 1 × 5, 1 × 1 × 7, 1 × 1 × 9, and 1 × 1 × 7, 1 × 1 × 9, 1 × 1 × 11 to determine the optimal combination for convolution. The experimental results are shown in Figure 7b. Among these, the convolution kernel combinations of 1 × 1 × 3, 1 × 1 × 5, and 1 × 1 × 7 yielded better OA, AA, and Kappa scores in the KY, Hu, IN, and SV datasets than those of 1 × 1 × 5, 1 × 1 × 7, 1 × 1 × 9, and 1 × 1 × 7, 1 × 1 × 9, 1 × 1 × 11. Therefore, the best classification effect is achieved with the convolution kernel sizes of 1 × 1 × 3, 1 × 1 × 5, and 1 × 1 × 7 in the multi-scale convolution group.

4.4. Experimental Results and Analysis

This article compares the DBMSDA network with several classic and state-of-the-art networks. We used the same dataset partitioning strategy for all methods to prevent information leakage. Table 1 lists the backbone structures used for training on the KY, Hu, IN, and SV datasets. Each network maintains the same training pixel ratio: KY at 4.5%, Hu at 1%, IN at 11.6%, and SV at 4.3%. Additionally, acknowledging the importance of joint spectral and spatial information in HSI classification, we designed two separate sub-networks within the DBMSDA network: one for the spectral branch and one for the spatial branch, to evaluate performance.
CDCNN [53]: This network model is primarily based on 2D-CNN and incorporates residual connections to address the issue of overly deep networks.
SSRN [37]: This network model is mainly based on 3D-CNN and incorporates residual connections, aimed at addressing the issue of overly deep networks. Additionally, 3D-CNN more effectively extracts hyperspectral “cube” structure data than 2D-CNN.
SSTN [15]: This network model is mainly based on 3D-CNN and introduces spatial attention and spectral correlation modules. The self-attention mechanism in spatial attention is used to acquire global context information and effectively extract hyperspectral data.
DBMA [40]: This network model features a double-branch structure that extracts both spectral and spatial information.
DBDA [17]: Based on DBMA, this network model also features a double-branch structure. It replaces the CBAM attention mechanism with a self-attention mechanism for improved acquisition of global context information.
DRIN [54]: This network model employs an involution structure to replace traditional convolution.
SSFTT [25]: This network model combines a convolutional network with a Transformer. It introduces a Gaussian distribution-weighted tokenization module to convert shallow spatial spectral features into tokenized semantic features, better representing the range from low to deep semantic features in HSI data.
SpectralFormer [19]: This network integrates group-wise spectral embedding (GSE) and cross-layer adaptive fusion (CAF) modules into the Transformer framework, aiming to enhance the capture of fine spectral differences and improve interlayer information transmission.
FactoFormer [55]: This network primarily uses factorized transformers to acquire spectral and spatial representations from hyperspectral data.
HyperBCS [56]: This network features a dual-scale addition module (BSAM) and a convolutional self-attention module (CSM). The BSAM module uses two branches to extract multi-scale features, while the CSM module integrates convolution and self-attention in a parallel structure to effectively extract both local and global features.
3DCT [57]: This network combines 3D-CNN and convolutional vision transformer (ViT) to enhance image recognition performance by leveraging CNN’s strengths in local feature extraction and transformers’ ability to process long-range dependencies.
DBMSDA (sub-1): This is the spectral branch of the DBMSDA network, a single-branch serial network with parameter settings consistent with the main DBMSDA network.
DBMSDA (sub-2): This is the spatial branch of the DBMSDA network, a single-branch serial network with parameter settings consistent with the main DBMSDA network.

4.4.1. Classification Results of KY Dataset

The average classification results from 10 independent repetitions using different methods on the KY dataset are shown in Table 2. The Ground Truth of the dataset and the classification diagrams obtained by different methods are shown in Figure 8.
From Table 2, the DBMSDA network achieves state-of-the-art classification performance, with the best results being OA 85.2%, AA 84.09%, and Kappa 0.75. As shown in Figure 8, the classification image obtained by the DBMSDA network is more accurate and smoother compared to other images.
From Figure 6, it is evident that the KY dataset exhibits a significant data imbalance, with the number of samples in class C6 being much smaller than in other classes. According to Table 2, when trained with only 4.5% of training pixels, the DBMSDA network not only ensures high classification accuracy for other classes but also achieves 100% accuracy in classifying a small number of class samples. This demonstrates that the DBMSDA network can effectively extract information from a small number of class samples under conditions of sample imbalance, thereby improving classification accuracy.
Specifically, the SSTN network, due to the introduction of the self-attention mechanism, achieved better classification results compared to the SSRN. This indicates that the global information obtained by the self-attention mechanism can indeed improve classification accuracy. Additionally, the DBMA and DBDA networks, being dual-branch network frameworks, outperformed the single-branch networks SSRN and SSTN. This suggests that dual-branch networks are generally superior to single-branch networks, possibly because single-branch networks may cause spectral and spatial information to mix and interfere with each other, potentially harming classification performance. Furthermore, SSFTT, SpectralFormer, FactoFormer, and 3DCT all adopted the Transformer framework, but their classification performance was poor, indicating that the Transformer framework may struggle with handling imbalanced sample data under dataset partitioning strategies without information leakage. Comparing the classification results of the two branches of the DBMSDA network, DBMSDA (sub-1) significantly outperformed DBMSDA (sub-2), indicating that spectral information is more important than spatial information in hyperspectral classification. Moreover, the DBMSDA network outperformed these two branches, indicating that the parallel dual-branch structure enhanced the interaction between spectral and spatial data, thereby improving classification performance. Overall, the DBMSDA network improved overall accuracy by 1.37%, average accuracy by 5.2%, and the Kappa coefficient by 0.023 compared to the DBDA network. Through the comparison of various networks, it is evident that deep learning methods have broad prospects in the research and application of hyperspectral geological lithology identification. Particularly, the DBMSDA network demonstrates superior classification performance under conditions of imbalanced sample data.

4.4.2. Classification Results of Hu Dataset

The average classification results from 10 independent repetitions using different methods on the Hu dataset are shown in Table 3. The Ground Truth of the dataset and the classification diagrams obtained by different methods are shown in Figure 9.
From Table 3, it is evident that the Hu dataset includes a large amount of data across various land cover categories. However, due to the relatively small number of pixels selected for training, all networks exhibit relatively low classification performance. Despite these challenges, the DBMSDA network still achieved the highest classification performance, with the best results being OA 59.96%, AA 56.32%, and Kappa 0.52. From Figure 9, it is clear that the classification images obtained by the DBMSDA network are more accurate and smoother than those obtained by other networks.
From Figure 6, it is evident that the Hu dataset exhibits a significant data imbalance, with the sample sizes of categories C3, C7, C12, and C17 being much smaller than those of other categories. The classification results for the DBMSDA network are as follows: C3 class OA at 93.08%, C7 at 36.99%, C12 at 2.11%, and C17 at 89.7%. Specifically, the C12 class, identified as a pedestrian crossing, exhibits poor classification performance across all networks due to its narrow and short appearance compared to other objects. Overall, the DBMSDA network demonstrates relatively better classification performance for classes with small sample sizes. In Table 3, while the classification performance of the DBMSDA network for some small sample classes does not match DBMSDA (sub-1), it still ensures an overall improvement in accuracy. This suggests that the DBMSDA network’s structure, which integrates spectral and spatial information, is more versatile. Overall, compared to the DBDA network, the OA of the DBMSDA network improved by 1.01%, AA by 1.29%, and Kappa by 0.014.

4.4.3. Classification Results of IN Dataset

The average classification results from 10 independent repetitions using different methods on the IN dataset are displayed in Table 4. The average classification results from 10 independent repetitions using different methods on the IN dataset are displayed in Table 4. The Ground Truth and classification diagrams obtained by different methods are shown in Figure 10.
From Table 4, the DBMSDA network has achieved state-of-the-art classification performance, with the best results being OA 84.92%, AA 83.76%, and Kappa 0.83. From Figure 10, the classification images obtained by the DBMSDA network are noticeably more accurate and smoother than those from other networks.
Figure 6 reveals a significant data imbalance in the IN dataset, with notably fewer samples in classes C1, C7, C9, and C16 compared to other classes. According to Table 4, the DBMSDA network exhibits superior classification accuracy in the C1, C7, C9, and C16 categories compared to other networks. Specifically, the OA for class C1 is 88.33%, the highest recorded, while class C7 achieves 100% accuracy, also the highest among all classes. Class C9 reaches 79.17% accuracy, surpassed only by the DBDA network. However, the variability in classification results across classes is greater in the DBDA network than in the DBMSDA network, possibly affecting representativeness. Class C16 achieves an accuracy of 86.94%, only outperformed by the DA-IMRN network, whose overall classification accuracy remains lower than the DBMSDA network. These results demonstrate that the DBMSDA network effectively extracts information from limited class samples, even in the presence of unbalanced sample sizes. This enhances classification accuracy for smaller classes, thereby improving overall accuracy. The classification performance across networks is generally consistent with results observed in the KY dataset. Overall, the OA of the DBMSDA network has increased by 2.16%, AA by 2.1%, and Kappa by 0.026 compared to the DBDA network.

4.4.4. Classification Results of SV Dataset

The average classification results from 10 independent repetitions using different methods on the SV dataset are displayed in Table 5. The Ground Truth and classification diagrams for this dataset, obtained by various methods, are presented in Figure 11.
From Table 5, it can be seen that the DBMSDA (sub-1) network framework achieved state-of-the-art performance, with the best results being an overall accuracy (OA) of 92.3%, an average accuracy (AA) of 90.9%, and a Kappa coefficient of 0.92. We speculate that this is due to the lack of sample imbalance in the SV dataset, where each terrain type has a sufficient and similar number of labeled pixels, leading to the DBMSDA’s classification results potentially not matching those of DBMSDA (sub-1). In this case, the introduction of spatial information may contaminate spectral information, resulting in a decline in classification performance. Similarly, for this reason, the dual-branch DBMA network’s classification performance falls short of the single-branch SSRN and SSTN networks in this dataset. However, typically, samples in hyperspectral images exhibit imbalanced distributions (as seen in the KY, Hu, and IN datasets), where the DBMSDA network usually performs better. Therefore, the DBMSDA network demonstrates broader generalization capabilities compared to DBMSDA (sub-1), and overall, DBMSDA still surpasses DBMSDA (sub-1). In general, the DBMSDA network has shown improvements over the DBDA network, with an increase in OA by 1.12%, AA by 0.96%, and Kappa by 0.012.

5. Discussion

The comparisons in Section 3 demonstrate that the proposed MSeRA structural feature learning, guided by the self-attention mechanism, yielded the best HSI classification results. This superiority was evident not only in the KY dataset but also in the public Hu, IN, and SV datasets. This article explores various factors influencing network model performance. It covers the effects of different block-patch sizes, performance variations based on training pixel counts, performance with minimal sample sizes, the impact of missing network modules on performance, a discussion on the time costs associated with various networks, and the effect of having or not having a dataset segmentation strategy.

5.1. Effect of Block-Patch Size

The block-patch size is crucial in the dataset division method and significantly impacts the final classification result. Consequently, this article categorizes block-patch size combinations into several groups based on their significant impact. For the KY, Hu, and SV datasets with large spatial ranges, the block-patch sizes are divided into three types: 8-6, 10-8, and 12-10. For the IN dataset, which has a smaller spatial range, the block-patch sizes are divided into three types: 4-2, 6-4, and 8-6. The classification results, including OA and AA for these datasets, are shown in Figure 12.
Smaller block-patch sizes allocate more training samples to a single block but provide less overall spatial information, and vice versa. Therefore, optimal network performance depends on balancing the number of training samples with the amount of spatial information. For the KY, IN, and SV datasets, OA and AA values initially increase and then decrease, indicating an optimal block-patch size of 10-8 for KY. The optimal block-patch sizes are 6-4 for IN and 10-8 for SV. In the Hu dataset, with both OA and AA values decreasing, the optimal block-patch size is determined to be 8-6.

5.2. Impact of the Number of Labeled Training Pixels

The network’s performance is significantly influenced by the quantity of labeled training pixels; generally, as the number of labeled training pixels increases, so does the accuracy of network training. For the KY, Hu, IN, and SV datasets, we selected various labeled training pixel counts for comparative analysis. The selected training pixel ratios are as follows: 1%, 4.5%, 5%, and 10% for the KY dataset; 1%, 5%, 10%, and 15% for the Hu dataset; 1%, 5%, 10%, 11.6%, and 15% for the IN dataset; and 1%, 4.3%, 5%, and 10% for the SV dataset. Figure 13 displays the classification results for the four datasets using different methods at various training pixel ratios.
From Figure 13, with a low training pixel ratio of 1%, DBMSDA achieves the best classification results in the KY and Hu datasets. In the IN dataset, DBMSDA also achieves good results, but its performance in the SV dataset is less satisfactory. This underperformance in the SV dataset may be due to its relatively balanced sample distribution, which typically favors most convolutional neural networks. Therefore, the advantages of the DBMSDA network are not as apparent in this context. Additionally, networks like SpectralFormer, FactoFormer, and SSFTT, which use the Transformer framework, do not perform as well as double-branch networks such as DBMA and DBDA. This suggests that Transformer framework networks may underperform with small and unbalanced sample sizes, while double-branch networks tend to show better classification performance. Overall, the DBMSDA network proposed in this article shows the best classification performance across all four datasets. The DBMSDA network outperforms other methods in classification under conditions of small training sample sizes and sample imbalance, indicating superior generalization capabilities.

5.3. Classification Results of Networks in Minimal Sample Data

To demonstrate the classification performance of the DBMSDA network in extreme scenarios, such as with very limited sample data, we randomly selected approximately 10 pixels for each category from the KY, IN, and SV datasets as training pixels. Additionally, about 20 pixels for each category were selected from the Hu dataset as training pixels. We assessed the classification performance of the DBMSDA network and other networks using small sample data from these four datasets. The OA results for these datasets with small sample sizes are displayed in Figure 14.
From Figure 14, the DBMSDA network achieved the best classification results across all four datasets compared to other networks. Specifically, the OA results were 35.69% for the KY dataset, 26.06% for the Hu dataset, 50.17% for the IN dataset, and 74.13% for the SV dataset. Notably, the classification results for the SV and IN datasets were significantly better than those for the KY and Hu datasets. This could be because the KY dataset consists of lithology samples, which are highly similar, making accurate classification challenging with limited training samples. The Hu dataset, which contains numerous categories, shows subpar classification performance in scenarios with limited samples, likely exacerbated by the need to prevent information leakage. Even with limited training samples, the DBMSDA network’s classification results surpass those of other networks. This demonstrates the DBMSDA network’s ability to perform excellently under minimal sample conditions and to handle datasets with challenging class distinctions effectively.

5.4. Impact of Different Network Branches and Module Combinations

Furthermore, we analyze the effects of various suggested branch and module combinations. Table 6 displays the OA classification results for various branch and module combinations. The classification results show that the spectral branch alone outperforms the spatial branch alone. This suggests that spectral features are more significant than spatial features in the DBMSDA network. Integrating both spectral and spatial branches yields better classification results than using spectral branches alone, demonstrating that this combination is most effective for classifying hyperspectral data. In the SV dataset, the combined spectral and spatial branches slightly underperform compared to the spectral branch alone. This could be due to the lack of sample imbalance in the SV dataset, where incorporating spatial information may “contaminate” spectral information. The joint spectral and spatial branches perform better, indicating superior generalization capabilities. In the Hu dataset, the absence of branches and modules has minimal impact on classification accuracy. This may be attributed to the large number of categories and the small number of training samples, which contribute to overall low classification accuracy. Table 6 indicates that combining the MSeRA structure with spectral and spatial attention mechanisms yields the best classification performance. However, classification performance significantly decreases with the integration of the MSeRA and MSaRA modules, along with both spectral and spatial attention mechanisms. Excessive spatial information should be avoided as it complicates the extraction of spectral information and diminishes classification accuracy. It is important to note in particular that Columns 3 and 6 differ only in presentation; their underlying network frameworks are identical. So, the classification results obtained are the same. Column 3 denotes the impact of missing branches, and column 6 denotes the impact of missing modules.

5.5. Time Cost Comparison

The comparison of training and testing times for various network models, including our method, is presented in Table 7. Although the DBMSDA method requires longer training and testing times compared to other methods, except for HyperBCS, it is designed to fully extract complex, high-dimensional spectral information from hyperspectral data. The spectral branch (sub-1) incurs significantly longer durations than the spatial branch (sub-2). Although the DBMSDA method incurs significant time costs, its performance with small sample sizes and unbalanced datasets is robust, which we consider acceptable.

5.6. The Effect of Having or Not Having a Dataset Segmentation Strategy

To verify the impact of a dataset partitioning strategy on network classification results, this study utilizes the DBMSDA network with the same number of training samples. One approach employs a dataset partitioning strategy, while the other does not. The classification results for the KY dataset are presented in Table 8. Table 8 shows that the OA, AA, and Kappa values obtained using the dataset partitioning strategy are significantly lower than those obtained without it, by more than 10 percentage points for both OA and AA. However, the classification graphs show that the differences in results between using the dataset partitioning strategy and not using it are not significant. Notably, the result graphs without the dataset partitioning strategy show performances far from the desired classification accuracy of approximately 98%. Consequently, classification results without the dataset partitioning strategy are relatively high, leading to false positives. This discrepancy may stem from potential overlap between the training and test sets during classification. This overlap leads to information leakage. Therefore, adopting the dataset partitioning strategy ensures the credibility, fairness, and accuracy of the classification results.

6. Conclusions

Our research on previous articles has shown that the commonly used patch-wise dataset partitioning method in neural networks can lead to information leakage between the training and test sets. Therefore, we have implemented a novel dataset partitioning approach that prevents information leakage between the training and test sets. To fully extract spectral and spatial information from HSI data, we proposed the double-branch multi-scale dual-attention (DBMSDA) network, which prevents information leakage between the training and test sets. The network consists of two branches: the spectral and the spatial. The spatial branch uses convolutional dense connection modules and a spatial self-attention mechanism to extract spatial information. In the spectral branch, a multi-scale spectral residual self-attention (MSeRA) structure serves as a dense connection module, combined with a spectral self-attention mechanism to enhance dense connectivity. This integration enables a more comprehensive extraction of spectral information. We created a hyperspectral geological lithology dataset to explore the potential of deep learning methods in identifying hyperspectral geological lithologies. Experimental results show that the DBMSDA network not only outperforms other networks in hyperspectral geological lithology classification but also excels in public hyperspectral datasets. This demonstrates the promising research and application prospects of deep learning in hyperspectral geological lithology identification and highlights the superior classification performance and stronger generalization ability of the DBMSDA network compared to other networks.
Although the DBMSDA network shows good classification performance on datasets with small and unbalanced samples, it suffers from long training times and low efficiency. Therefore, future work will focus on enhancing hyperspectral image classification performance and reducing network model operation time. Additionally, future research will likely focus on integrating Transformer technology with double branch network frameworks.

Author Contributions

Conceptualization, H.Z.; Methodology, H.Z.; Validation, W.W., Q.L. and C.T.; Investigation, C.T.; Data curation, H.L., W.W. and Q.L.; Writing—original draft, H.Z.; Writing—review & editing, H.L. and R.Y.; Visualization, H.Z.; Supervision, H.L. and R.Y. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

In this paper, three public hyperspectral datasets were selected. The Indian Pines dataset is available at Attention Required! | Cloudflare (weebly.com), the Houston_2018 dataset is available at 2018 IEEE GRSS Data Fusion Challenge—Fusion of Multispectral LiDAR and Hyperspectral Data | Hyperspectral Image Analysis Lab (uh.edu), the Salinas Valley dataset is available at Hyperspectral Remote Sensing Scenes-Grupo de Inteligencia Computacional (GIC) (ehu.eus) (all accessed on 20 April 2024).

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Tong, Q.; Zhang, B.; Zhang, L. Current progress of hyperspectral remote sensing in China. J. Remote Sens. 2016, 20, 689–707. [Google Scholar]
  2. Meyer, J.; Kokaly, R.; Holley, E. Hyperspectral remote sensing of white mica: A review of imaging and point-based spectrometer studies for mineral resources, with spectrometer design considerations. Remote Sens. Environ. 2022, 275, 113000. [Google Scholar] [CrossRef]
  3. Nalepa, J.; Antoniak, M.; Myller, M.; Lorenzo, P.; Marcinkiewicz, M. Towards resource-frugal deep convolutional neural networks for hyperspectral image segmentation. Microprocess. Microsyst. 2020, 73, 102994. [Google Scholar] [CrossRef]
  4. Kuras, A.; Brell, M.; Liland, K.; Burud, I. Multitemporal Feature-Level Fusion on Hyperspectral and LiDAR Data in the Urban Environment. Remote Sens. 2023, 15, 632. [Google Scholar] [CrossRef]
  5. Yang, B.; Wang, S.; Li, S.; Zhou, B.; Zhao, F.; Ali, F.; He, H. Research and application of UAV-based hyperspectral remote sensing for smart city construction. Cogn. Robot. 2022, 2, 255–266. [Google Scholar] [CrossRef]
  6. Arroyo-Mora, J.; Kalacska, M.; Inamdar, D.; Soffer, R.; Lucanus, O.; Gorman, J.; Naprstek, T.; Schaaf, E.; Ifimov, G.; Elmer, K.; et al. Implementation of a UAV–Hyperspectral Pushbroom Imager for Ecological Monitoring. Drones 2019, 3, 12. [Google Scholar] [CrossRef]
  7. Liu, H.; Wu, K.; Xu, H.; Xu, Y. Lithology Classification Using TASI Thermal Infrared Hyperspectral Data with Convolutional Neural Networks. Remote Sens. 2021, 13, 3117. [Google Scholar] [CrossRef]
  8. Ye, B.; Tian, S.; Cheng, Q.; Ge, Y. Application of Lithological Mapping Based on Advanced Hyperspectral Imager (AHSI) Imagery Onboard Gaofen-5 (GF-5) Satellite. Remote Sens. 2020, 12, 3990. [Google Scholar] [CrossRef]
  9. Lin, N.; Fu, J.; Jiang, R.; Li, G.; Yang, Q. Lithological Classification by Hyperspectral Images Based on a Two-Layer XGBoost Model, Combined with a Greedy Algorithm. Remote Sens. 2023, 15, 3764. [Google Scholar] [CrossRef]
  10. Zou, L.; Zhu, X.; Wu, C.; Liu, Y.; Qu, L. Spectral–Spatial Exploration for Hyperspectral Image Classification via the Fusion of Fully Convolutional Networks. IEEE J. Sel. Top. Appl. Earth Obs. Remote Sens. 2020, 13, 659–674. [Google Scholar] [CrossRef]
  11. Qu, L.; Zhu, X.; Zheng, J.; Zou, L. Triple-Attention-Based Parallel Network for Hyperspectral Image Classification. Remote Sens. 2021, 13, 324. [Google Scholar] [CrossRef]
  12. Ibañez, D.; Fernandez-Beltran, R.; Pla, F.; Yokoya, N. Masked Auto-Encoding Spectral–Spatial Transformer for Hyperspectral Image Classification. IEEE Trans. Geosci. Remote Sens. 2022, 60, 5542614. [Google Scholar] [CrossRef]
  13. Li, N.; Wang, Z. Spatial Attention Guided Residual Attention Network for Hyperspectral Image Classification. IEEE Access 2022, 10, 9830–9847. [Google Scholar] [CrossRef]
  14. Tan, Y.; Lu, L.; Bruzzone, L.; Guan, R.; Chang, Z.; Yang, C. Hyperspectral Band Selection for Lithologic Discrimination and Geological Mapping. IEEE J. Sel. Top. Appl. Earth Obs. Remote Sens. 2020, 13, 471–486. [Google Scholar] [CrossRef]
  15. Zhong, Z.; Li, Y.; Ma, L.; Li, J.; Zheng, W. Spectral–Spatial Transformer Network for Hyperspectral Image Classification: A Factorized Architecture Search Framework. IEEE Trans. Geosci. Remote Sens. 2022, 60, 1–15. [Google Scholar] [CrossRef]
  16. Mei, X.; Pan, E.; Ma, Y.; Dai, X.; Huang, J.; Fan, F.; Du, Q.; Zheng, H.; Ma, J. Spectral-Spatial Attention Networks for Hyperspectral Image Classification. Remote Sens. 2019, 11, 963. [Google Scholar] [CrossRef]
  17. Li, R.; Zheng, S.; Duan, C.; Yang, Y.; Wang, X. Classification of Hyperspectral Image Based on Double-Branch Dual-Attention Mechanism Network. Remote Sens. 2020, 12, 582. [Google Scholar] [CrossRef]
  18. Liu, Q.; Xiao, L.; Yang, J.; Chan, J. Content-Guided Convolutional Neural Network for Hyperspectral Image Classification. IEEE Trans. Geosci. Remote Sens. 2020, 58, 6124–6137. [Google Scholar] [CrossRef]
  19. Hong, D.; Han, Z.; Yao, J.; Gao, L.; Zhang, B.; Plaza, A.; Chanussot, J. SpectralFormer: Rethinking Hyperspectral Image Classification with Transformers. IEEE Trans. Geosci. Remote Sens. 2022, 60, 5518615. [Google Scholar] [CrossRef]
  20. Melgani, F.; Bruzzone, L. Classification of hyperspectral remote sensing images with support vector machines. IEEE Trans. Geosci. Remote Sens. 2004, 42, 1778–1790. [Google Scholar] [CrossRef]
  21. Li, J.; Bioucas-Dias, J.; Plaza, A. Semisupervised hyperspectral image segmentation using multinomial logistic regression with active learning. IEEE Trans. Geosci. Remote Sens. 2010, 48, 4085–4098. [Google Scholar] [CrossRef]
  22. Du, B.; Zhang, L. Target detection based on a dynamic subspace. Pattern Recog. 2014, 47, 344–358. [Google Scholar] [CrossRef]
  23. He, L.; Li, J.; Liu, C.; Li, S. Recent Advances on Spectral–Spatial Hyperspectral Image Classification: An Overview and New Guidelines. IEEE Trans. Geosci. Remote Sens. 2018, 56, 1579–1597. [Google Scholar] [CrossRef]
  24. Song, T.; Wang, Y.; Gao, C.; Chen, H.; Li, J. MSLAN: A Two-Branch Multidirectional Spectral–Spatial LSTM Attention Network for Hyperspectral Image Classification. IEEE Trans. Geosci. Remote Sens. 2022, 60, 5528814. [Google Scholar] [CrossRef]
  25. Sun, L.; Zhao, G.; Zheng, Y.; Wu, Z. Spectral–Spatial Feature Tokenization Transformer for Hyperspectral Image Classification. IEEE Trans. Geosci. Remote Sens. 2022, 60, 5522214. [Google Scholar] [CrossRef]
  26. Zou, J.; He, W.; Zhang, H. LESSFormer: Local-Enhanced Spectral-Spatial Transformer for Hyperspectral Image Classification. IEEE Trans. Geosci. Remote Sens. 2022, 60, 5535416. [Google Scholar] [CrossRef]
  27. Yu, H.; Xu, Z.; Zheng, K.; Hong, D.; Yang, H.; Song, M. MSTNet: A Multilevel Spectral–Spatial Transformer Network for Hyperspectral Image Classification. IEEE Trans. Geosci. Remote Sens. 2022, 60, 5532513. [Google Scholar] [CrossRef]
  28. Peng, Y.; Ren, J.; Wang, J.; Shi, M. Spectral-Swin Transformer with Spatial Feature Extraction Enhancement for Hyperspectral Image Classification. Remote Sens 2023, 15, 2696. [Google Scholar] [CrossRef]
  29. Zou, L.; Zhang, Z.; Du, H.; Lei, M.; Xue, Y.; Wang, Z. DA-IMRN: Dual-Attention-Guided Interactive Multi-Scale Residual Network for Hyperspectral Image Classification. Remote Sens. 2022, 14, 530. [Google Scholar] [CrossRef]
  30. Tao, H. Smoke Recognition in Satellite Imagery via an Attention Pyramid Network with Bidirectional Multilevel Multigranularity Feature Aggregation and Gated Fusion. IEEE Internet Things J. 2024, 11, 14047–14057. [Google Scholar] [CrossRef]
  31. Tao, H.; Duan, Q.; Lu, M.; Hu, Z. Learning discriminative feature representation with pixel-level supervision for forest smoke recognition. Pattern Recognit. 2023, 143, 109761. [Google Scholar] [CrossRef]
  32. Song, W.; Li, S.; Fang, L.; Lu, T. Hyperspectral Image Classification with Deep Feature Fusion Network. IEEE Trans. Geosci. Remote Sens. 2018, 56, 3173–3184. [Google Scholar] [CrossRef]
  33. Ren, S.; Zhou, D.; He, S.; Feng, J.; Wang, X. Shunted self-attention via multi-scale token aggregation. In Proceedings of the IEEE/CVF Computer Vision and Pattern Recognition Conference (CVPR), New Orleans, LA, USA, 18–24 June 2022; pp. 10843–10852. [Google Scholar]
  34. Qiao, X.; Roy, S.; Huang, W. Multiscale neighborhood attention transformer with optimized spatial pattern for hyperspectral image classification. IEEE Trans. Geosci. Remote Sens. 2023, 61, 5523815. [Google Scholar] [CrossRef]
  35. Shi, C.; Yue, S.; Wang, L. A Dual-Branch Multiscale Transformer Network for Hyperspectral Image Classification. IEEE Trans. Geosci. Remote Sens. 2024, 62, 5504520. [Google Scholar] [CrossRef]
  36. Feng, H.; Wang, Y.; Li, Z.; Zhang, N.; Zhang, Y.; Gao, Y. Information Leakage in Deep Learning-Based Hyperspectral Image Classification: A Survey. Remote Sens. 2023, 15, 3793. [Google Scholar] [CrossRef]
  37. Zhong, Z.; Li, J.; Luo, Z.; Chapman, M. Spectral–Spatial Residual Network for Hyperspectral Image Classification: A 3-D Deep Learning Framework. IEEE Trans. Geosci. Remote Sens. 2018, 56, 847–858. [Google Scholar] [CrossRef]
  38. Hang, R.; Li, Z.; Liu, Q.; Ghamisi, P.; Bhattacharyya, S. Hyperspectral Image Classification with Attention-Aided CNNs. IEEE Trans. Geosci. Remote Sens. 2021, 59, 2281–2293. [Google Scholar] [CrossRef]
  39. Zhang, Z.; Liu, D.; Gao, D.; Shi, G. S³Net: Spectral–Spatial–Semantic Network for Hyperspectral Image Classification with the Multiway Attention Mechanism. IEEE Trans. Geosci. Remote Sens. 2022, 60, 5505317. [Google Scholar]
  40. Ma, W.; Yang, Q.; Wu, Y.; Zhao, W.; Zhang, X. Double-Branch Multi-Attention Mechanism Network for Hyperspectral Image Classification. Remote Sens. 2019, 11, 1307. [Google Scholar] [CrossRef]
  41. Liang, J.; Zhou, J.; Qian, Y.; Wen, L.; Bai, X.; Gao, Y. On the Sampling Strategy for Evaluation of Spectral-Spatial Methods in Hyperspectral Image Classification. IEEE Trans. Geosci. Remote Sens. 2017, 55, 862–880. [Google Scholar] [CrossRef]
  42. Li, X.; Ding, M.; Pižurica, A. Spectral Feature Fusion Networks with Dual Attention for Hyperspectral Image Classification. IEEE Trans. Geosci. Remote Sens. 2022, 60, 1–14. [Google Scholar] [CrossRef]
  43. Cao, X.; Liu, Z.; Li, X.; Xiao, Q.; Feng, J.; Jiao, L. Nonoverlapped Sampling for Hyperspectral Imagery: Performance Evaluation and a Cotraining-Based Classification Strategy. IEEE Trans. Geosci. Remote Sens. 2022, 60, 1–14. [Google Scholar] [CrossRef]
  44. Cao, X.; Lu, H.; Ren, M.; Jiao, L. Non-overlapping classification of hyperspectral imagery with superpixel segmentation. Appl. Soft Comput. 2019, 83, 105630. [Google Scholar] [CrossRef]
  45. Wang, W.; Dou, S.; Jiang, Z.; Sun, L. A Fast Dense Spectral–Spatial Convolution Network Framework for Hyperspectral Images Classification. Remote Sens. 2018, 10, 1068. [Google Scholar] [CrossRef]
  46. Shi, H.; Cao, G.; Ge, Z.; Zhang, Y.; Fu, P. Double-Branch Network with Pyramidal Convolution and Iterative Attention for Hyperspectral Image Classification. Remote Sens. 2021, 13, 1043. [Google Scholar] [CrossRef]
  47. Huang, G.; Liu, Z.; Maaten, L.; Weinberger, K. Densely Connected Convolutional Networks. In Proceedings of the 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, HI, USA, 21–26 July 2017; pp. 2261–2269. [Google Scholar]
  48. He, K.; Zhang, X.; Ren, S.; Sun, J. Deep Residual Learning for Image Recognition. In Proceedings of the 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, 27–30 June 2016; pp. 770–778. [Google Scholar]
  49. Fu, J.; Liu, J.; Tian, H.; Li, Y.; Bao, Y.; Fang, Z.; Lu, H. Dual Attention Network for Scene Segmentation. In Proceedings of the 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Long Beach, CA, USA, 15–20 June 2019; pp. 3141–3149. [Google Scholar]
  50. Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, Ł.; Polosukhin, I. Attention is all you need. In Proceedings of the Annual Conference on Neural Information Processing Systems 2017, Long Beach, CA, USA, 4–9 December 2017; Volume 30, pp. 5998–6008. [Google Scholar]
  51. Dosovitskiy, A.; Beyer, L.; Kolesnikov, A.; Weissenborn, D.; Zhai, X.; Unterthiner, T.; Dehghani, M.; Minderer, M.; Heigold, G.; Gelly, S.; et al. An image is worth 16x16 words: Transformers for image recognition at scale. arXiv 2020, arXiv:2010.11929. [Google Scholar]
  52. Li, X.; Liu, B.; Zhang, K.; Chen, H.; Cao, W.; Liu, W.; Tao, D. Multi-view learning for hyperspectral image classification: An overview. Neurocomputing 2022, 500, 499–517. [Google Scholar] [CrossRef]
  53. Lee, H.; Kwon, H. Going Deeper with Contextual CNN for Hyperspectral Image Classification. IEEE Trans. Image Process. 2017, 26, 4843–4855. [Google Scholar] [CrossRef] [PubMed]
  54. Meng, Z.; Zhao, F.; Liang, M.; Xie, W. Deep Residual Involution Network for Hyperspectral Image Classification. Remote Sens. 2021, 13, 3055. [Google Scholar] [CrossRef]
  55. Mohamed, S.; Haghighat, M.; Fernando, T.; Sridharan, S.; Fookes, C.; Moghadam, P. FactoFormer: Factorized Hyperspectral Transformers with Self-Supervised Pretraining. IEEE Trans. Geosci. Remote Sens. 2024, 62, 5501614. [Google Scholar] [CrossRef]
  56. Luo, J.; He, Z.; Lin, H.; Wu, H. Biscale Convolutional Self-Attention Network for Hyperspectral Coastal Wetlands Classification. IEEE Geosci. Remote Sens. Lett. 2024, 21, 6002705. [Google Scholar] [CrossRef]
  57. Wang, Y.; Yu, X.; Wen, X.; Li, X.; Dong, H.; Zang, S. Learning a 3-D-CNN and Convolution Transformers for Hyperspectral Image Classification. IEEE Geosci. Remote Sens. Lett. 2024, 21, 5504505. [Google Scholar] [CrossRef]
Figure 1. Overall structure of the proposed DBMSDA.
Figure 1. Overall structure of the proposed DBMSDA.
Remotesensing 16 02051 g001
Figure 2. Proposed MSeRA structure.
Figure 2. Proposed MSeRA structure.
Remotesensing 16 02051 g002
Figure 3. The architecture of residual network (ResNet) and dense convolutional network (DenseNet).
Figure 3. The architecture of residual network (ResNet) and dense convolutional network (DenseNet).
Remotesensing 16 02051 g003
Figure 4. The details of the spectral attention module and the spatial attention module.
Figure 4. The details of the spectral attention module and the spatial attention module.
Remotesensing 16 02051 g004
Figure 5. KY dataset geographical location.
Figure 5. KY dataset geographical location.
Remotesensing 16 02051 g005
Figure 6. Original remote sensing images, label information, and category information of four types of hyperspectral datasets.
Figure 6. Original remote sensing images, label information, and category information of four types of hyperspectral datasets.
Remotesensing 16 02051 g006
Figure 7. (a) Classification performance of different numbers of MSeRA densely connected units; (b) classification performance of different convolution kernel scale combinations.
Figure 7. (a) Classification performance of different numbers of MSeRA densely connected units; (b) classification performance of different convolution kernel scale combinations.
Remotesensing 16 02051 g007
Figure 8. Classification plot on KY dataset. (a) Real object map. (b) CDCNN. (c) SSRN. (d) SSTN. (e) DBMA. (f) DBDA. (g) DRIN. (h) SSFTT. (i) SpectralFormer. (j) FactoFormer. (k) HyperBCS. (l) 3DCT. (m) DBMSDA (sub-1). (n) DBMSDA (sub-2). (o) Proposed.
Figure 8. Classification plot on KY dataset. (a) Real object map. (b) CDCNN. (c) SSRN. (d) SSTN. (e) DBMA. (f) DBDA. (g) DRIN. (h) SSFTT. (i) SpectralFormer. (j) FactoFormer. (k) HyperBCS. (l) 3DCT. (m) DBMSDA (sub-1). (n) DBMSDA (sub-2). (o) Proposed.
Remotesensing 16 02051 g008
Figure 9. Classification plot on the Hu dataset. (a) Real object map. (b) CDCNN. (c) SSRN. (d) SSTN. (e) DBMA. (f) DBDA. (g) DRIN. (h) SSFTT. (i) SpectralFormer. (j) FactoFormer. (k) HyperBCS. (l) 3DCT. (m) DBMSDA (sub-1). (n) DBMSDA (sub-2). (o) Proposed.
Figure 9. Classification plot on the Hu dataset. (a) Real object map. (b) CDCNN. (c) SSRN. (d) SSTN. (e) DBMA. (f) DBDA. (g) DRIN. (h) SSFTT. (i) SpectralFormer. (j) FactoFormer. (k) HyperBCS. (l) 3DCT. (m) DBMSDA (sub-1). (n) DBMSDA (sub-2). (o) Proposed.
Remotesensing 16 02051 g009
Figure 10. Classification plot on the IN dataset. (a) Real object map. (b) CDCNN. (c) SSRN. (d) SSTN. (e) DBMA. (f) DBDA. (g) DRIN. (h) SSFTT. (i) SpectralFormer. (j) FactoFormer. (k) HyperBCS. (l) 3DCT. (m) DBMSDA (sub-1). (n) DBMSDA (sub-2). (o) Proposed.
Figure 10. Classification plot on the IN dataset. (a) Real object map. (b) CDCNN. (c) SSRN. (d) SSTN. (e) DBMA. (f) DBDA. (g) DRIN. (h) SSFTT. (i) SpectralFormer. (j) FactoFormer. (k) HyperBCS. (l) 3DCT. (m) DBMSDA (sub-1). (n) DBMSDA (sub-2). (o) Proposed.
Remotesensing 16 02051 g010
Figure 11. Classification diagram on SV dataset. (a) Real object map. (b) CDCNN. (c) SSRN. (d) SSTN. (e) DBMA. (f) DBDA. (g) DRIN. (h) SSFTT. (i) SpectralFormer. (j) FactoFormer. (k) HyperBCS. (l) 3DCT. (m) DBMSDA (sub-1). (n) DBMSDA (sub-2). (o) Proposed.
Figure 11. Classification diagram on SV dataset. (a) Real object map. (b) CDCNN. (c) SSRN. (d) SSTN. (e) DBMA. (f) DBDA. (g) DRIN. (h) SSFTT. (i) SpectralFormer. (j) FactoFormer. (k) HyperBCS. (l) 3DCT. (m) DBMSDA (sub-1). (n) DBMSDA (sub-2). (o) Proposed.
Remotesensing 16 02051 g011
Figure 12. Effects of the block-patch size on OA and AA (%): (a) KY, (b) Hu, (c) IN, and (d) SV.
Figure 12. Effects of the block-patch size on OA and AA (%): (a) KY, (b) Hu, (c) IN, and (d) SV.
Remotesensing 16 02051 g012
Figure 13. Number of labeled training pixels on OA (%): (a) KY, (b) Hu, (c) IN, and (d) SV.
Figure 13. Number of labeled training pixels on OA (%): (a) KY, (b) Hu, (c) IN, and (d) SV.
Remotesensing 16 02051 g013
Figure 14. Classification results of networks in minimal sample data.
Figure 14. Classification results of networks in minimal sample data.
Remotesensing 16 02051 g014
Table 1. Backbone structure of state-of-the-art HSI classification methods.
Table 1. Backbone structure of state-of-the-art HSI classification methods.
Network NameBackbone Structure
CDCNN2D-CNN + ResNet
SSRN3D-CNN + ResNet
SSTN3D-CNN + Transformer
DBMAParallel network + CBAM attention + DenseNet
DBDAParallel network + Self − attention + DenseNet
DRINInvolution + ResNet
SSFTT3D-CNN + Transformer + Gaussian − weighted feature tokenizer
SpectralFormerCAF + GSE + Transformer, Based on ViT
FactoFormerFactorized Transformers, Based on ViT
HyperBCS3D-CNN + BSAM + CSM
3DCT3D-CNN + ViT
DBMSDAParallel network + Self-attention + DenseNet + multi-scale feature extraction
Table 2. KY dataset: accuracy of each class, OA, AA (%), and Kappa index of classification results. Results are presented as mean.
Table 2. KY dataset: accuracy of each class, OA, AA (%), and Kappa index of classification results. Results are presented as mean.
Method
ClassCDCNNSSRNSSTNDBMADBDADRINSSFTTSpectral
Former
Facto
Former
Hyper
BCS
3DCTDBMSDA
(sub-1)
DBMSDA
(sub-2)
DBMSDA
C153.6364.4173.3372.3573.1765.5859.8354.2855.4932.3261.59 74.9271.8574.45
C269.8468.9967.7074.1373.7767.1161.9368.9268.6354.9063.31 75.5669.5676.35
C347.4653.1466.3657.7763.6256.1951.3445.6457.954.5536.36 64.3063.1767.72
C482.3989.0589.7889.7093.1992.4691.6584.1288.1383.7487.48 92.1491.5993.73
C545.5154.2166.3172.9169.6163.3654.3438.5470.5952.9447.06 62.2369.8174.07
C691.6750.0075.0066.67100.00100.0050.0050.00100.00100.00100.00 100.0075.00100.00
OA73.4478.4980.3481.7383.8380.2777.3174.0377.2365.9675.12 83.8981.5985.20
AA65.0863.3073.0872.2578.8974.1261.5156.9173.4654.7465.97 78.1873.4984.09
Kappa0.600.640.670.700.730.660.610.560.620.400.58 0.730.690.75
Table 3. Hu dataset: accuracy of each class, OA, AA (%), and Kappa index of classification results. Results are presented as mean.
Table 3. Hu dataset: accuracy of each class, OA, AA (%), and Kappa index of classification results. Results are presented as mean.
Method
ClassCDCNNSSRNSSTNDBMADBDADRINSSFTTSpectral
Former
Facto
Former
Hyper
BCS
3DCTDBMSDA
(sub-1)
DBMSDA
(sub-2)
DBMSDA
C144.0951.7946.8557.0155.9060.2555.4032.6528.3439.9552.16 52.3651.6852.40
C263.8963.2661.9067.3168.2561.3472.9068.1166.0362.5866.91 68.6060.9871.10
C388.1358.5475.2989.1793.6961.3662.2694.9184.0281.4586.39 77.6486.7093.08
C450.0146.0645.6758.6258.0167.4163.2548.0049.3837.2364.32 52.0050.5661.22
C529.4421.2831.1137.5143.8425.7036.2023.9420.4314.3935.12 35.1836.7335.28
C640.5835.7540.3241.2946.6348.2030.9333.7541.5727.1739.38 43.6342.4147.63
C733.4133.8131.6534.0934.5525.4522.0531.1932.7328.7331.93 42.7830.6336.99
C859.6941.2653.1866.2567.4063.3959.9658.6162.3350.0357.56 57.7155.4071.02
C982.1684.2183.0685.1586.8762.6879.9782.2082.9482.2584.40 86.4385.1485.96
C1025.2321.6124.8523.7424.9230.1427.2823.8722.3222.9425.47 28.4526.0529.97
C1130.7827.1829.5331.5736.6833.4731.9523.0524.9723.8829.19 32.5630.8434.53
C123.490.934.042.081.791.951.573.672.541.281.30 2.882.492.11
C1334.3638.5144.7449.2549.0960.4841.1034.6543.5743.6735.72 59.5040.5254.40
C1436.7628.5752.0448.7254.954.3539.7227.9933.3830.7636.19 51.3550.7051.25
C1547.9643.6147.2365.0364.0229.3966.4128.5143.7032.6066.78 56.4952.8970.70
C1630.2927.8536.1147.7951.7134.2628.7525.2026.3321.0637.85 48.2037.7051.08
C1755.5578.8871.8680.6676.5050.0052.9028.6755.9841.7064.05 90.3474.7389.70
C1848.7541.0458.9264.4066.0236.0024.8638.9830.0523.3630.57 64.1754.7973.65
C1940.9145.8265.5763.4462.9022.3030.8930.6941.2922.9731.95 61.7461.0957.97
C2042.5843.2851.0654.0956.8250.9237.3049.1329.4943.7041.67 57.5156.5356.40
OA52.1750.0953.3657.0158.9548.9353.1349.8351.0248.6853.30 58.1354.5359.96
AA44.4041.6647.7453.3555.0342.4543.2839.3841.0736.5845.95 53.4749.4356.32
Kappa0.420.390.440.490.510.410.440.390.410.360.43 0.500.450.52
Table 4. IN dataset: accuracy of each class, OA, AA (%), and Kappa index of classification results. Results are presented as mean.
Table 4. IN dataset: accuracy of each class, OA, AA (%), and Kappa index of classification results. Results are presented as mean.
Method
ClassCDCNNSSRNSSTNDBMADBDADRINSSFTTSpectral
Former
Facto
Former
Hyper
BCS
3DCTDBMSDA
(sub-1)
DBMSDA
(sub-2)
DBMSDA
C133.3345.1440.1433.4781.6739.4518.0615.1923.960.0011.67 77.9252.0888.33
C264.3269.7976.8772.3478.3271.3147.7465.1073.1129.4957.98 80.9069.7580.45
C363.1064.3174.5071.2875.7470.0253.0060.8466.8927.0543.74 77.8367.7879.05
C448.4831.2650.7550.3154.2950.5326.5642.5456.9817.2525.13 48.4551.7453.67
C566.7870.9472.9570.4273.2568.5668.3455.7263.5565.9864.56 75.5372.6973.60
C683.3389.3983.6286.7389.1077.9881.4380.3985.4058.5688.15 93.4183.3392.85
C725.00100.00100.00100.00100.0083.3358.3338.8937.500.0020.00 100.00100.00100.00
C890.6294.8294.3194.0997.6295.1888.6482.3696.0283.8894.29 99.0096.1899.67
C966.6770.8354.1758.3383.3375.0062.5033.4456.2530.0020.00 58.3366.6779.17
C1060.0671.5571.5874.2577.4172.5352.7168.9868.6537.7060.24 90.1173.8487.77
C1176.8778.6979.2783.9389.5967.5067.7267.2874.2655.0774.19 86.2784.8889.17
C1246.4955.0263.2164.9973.4259.1132.4253.6857.3522.6936.93 76.0166.3475.23
C1388.7985.8589.1584.7290.0887.9081.3576.6086.0155.3984.23 90.0890.0890.08
C1487.5590.6994.0491.7192.5989.4488.3182.3888.0585.0993.39 92.2092.5793.42
C1570.3071.0761.8763.9875.5063.7546.6351.1365.0217.9244.07 74.9168.0274.98
C1675.4886.6763.3774.4874.7284.1759.7270.6046.9037.2474.14 84.7266.3186.94
OA71.0175.0377.4577.7782.7672.3962.3275.0173.4047.6066.39 84.2677.7384.92
AA65.4573.5073.1173.4481.6672.2358.3466.0965.3638.9555.79 81.6075.1183.76
Kappa0.670.720.740.750.800.690.570.720.700.400.61 0.820.750.83
Table 5. SV dataset: accuracy of each class, OA, AA (%), and Kappa index of classification results. Results are presented as mean.
Table 5. SV dataset: accuracy of each class, OA, AA (%), and Kappa index of classification results. Results are presented as mean.
Method
ClassCDCNNSSRNSSTNDBMADBDADRINSSFTTSpectral
Former
Facto
Former
Hyper
BCS
3DCTDBMSDA
(sub-1)
DBMSDA
(sub-2)
DBMSDA
C185.5596.0695.8495.2595.6294.2191.8584.2182.98100.0090.05 97.9997.2197.21
C280.2188.3489.7588.7190.4285.6384.1679.4657.5472.0083.54 95.4289.9493.17
C377.9493.3894.2890.9294.4984.6877.3181.6969.9157.1482.74 96.3291.8495.09
C491.6795.4692.9397.4892.4386.3790.6690.2879.6265.7189.39 91.4292.9393.44
C586.4883.8587.8382.8886.5691.9687.9081.4785.1792.0089.27 85.1586.6184.11
C697.6697.0097.8997.4596.7798.0093.8095.8388.6381.3393.60 95.0795.1095.53
C783.2888.8788.4586.7988.6487.4584.2184.9682.1584.9389.02 93.5988.8091.09
C884.7385.5086.9986.6091.9389.2385.9184.0582.1990.4585.35 95.4688.2894.03
C990.4586.1898.9697.7098.8294.2094.5189.2988.6681.5192.97 99.5897.9099.08
C1073.5780.6082.5581.7783.4681.2579.1775.2677.6753.7379.96 82.8180.9983.07
C1171.6274.7475.4572.3478.9179.6878.6865.3171.1141.6773.80 85.2179.6281.73
C1282.9083.4181.4983.8086.8479.7187.5079.7470.1881.5884.23 89.5182.9489.49
C1382.6681.2382.0481.6683.1982.4085.7179.0384.8452.3882.37 82.4583.9082.42
C1480.0083.2184.3084.9682.4981.0971.0580.4072.1668.1881.64 84.3084.3682.16
C1558.6580.6976.6072.1882.7152.2866.9361.0466.079.3255.03 85.3769.9183.86
C1680.0088.3389.2986.9087.6287.6288.5778.2584.8984.8579.57 94.7685.7190.00
OA81.5587.7688.3086.9890.1084.3784.3981.0478.2870.7382.85 92.3087.3491.22
AA81.7187.3087.7986.7188.8084.7484.2480.6477.7369.7983.28 90.9087.2589.76
Kappa0.800.870.870.860.890.830.830.790.760.680.81 0.920.860.90
Table 6. Ablation analysis of different branches/modules (OA %).
Table 6. Ablation analysis of different branches/modules (OA %).
BranchSpectral branch
Spatial branch
ModuleMSeRA
MSaRA
Spectral attention
Spatial attention
DataKY83.981.685.283.783.785.282.6
Hu58.154.560.059.758.660.059.1
IN84.377.784.984.184.184.983.1
SV92.387.391.290.790.691.289.5
Table 7. Training time in minutes (min) and test time in second(s) between the contrast methods and the proposed method on four datasets.
Table 7. Training time in minutes (min) and test time in second(s) between the contrast methods and the proposed method on four datasets.
MethodsKYHuINSV
Train. (m)Test (s)Train. (m)Test (s)Train. (m)Test (s)Train. (m)Test (s)
CDCNN0.360.070.260.510.250.020.260.05
SSRN2.700.200.490.943.400.052.100.20
SSTN0.620.080.501.100.440.040.430.08
DBMA4.050.380.731.391.240.083.130.37
DBDA4.060.320.761.321.190.073.140.33
DRIN0.510.090.381.100.320.030.360.08
SSFTT0.480.060.310.730.260.020.350.05
SpectralFormer1.680.150.621.271.530.081.330.15
FactoFormer2.160.160.881.571.780.081.650.16
HyperBCS655.2074.0019.2066.0024.582.00656.52105.00
3DCT0.660.070.370.640.310.220.470.08
DBMSDA (sub-1)172.825.604.179.0811.660.50170.687.42
DBMSDA (sub-2)0.260.060.200.530.170.020.190.05
DBMSDA172.895.624.239.2211.640.51174.077.59
Table 8. The effect of having or not having a dataset partitioning strategy on the classification results and the corresponding classification results figure.
Table 8. The effect of having or not having a dataset partitioning strategy on the classification results and the corresponding classification results figure.
ClassDataset Segmentation StrategyNo Dataset Segmentation Strategy
C177.4498.70
C270.5998.11
C368.1893.62
C494.3999.18
C594.12100.00
C6100.00100.00
OA84.6698.61
AA84.1298.27
Kappa0.7430.978
Remotesensing 16 02051 i001Remotesensing 16 02051 i002Remotesensing 16 02051 i003
GTDataset segmentation strategyNo dataset segmentation strategy
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Zhang, H.; Liu, H.; Yang, R.; Wang, W.; Luo, Q.; Tu, C. Hyperspectral Image Classification Based on Double-Branch Multi-Scale Dual-Attention Network. Remote Sens. 2024, 16, 2051. https://doi.org/10.3390/rs16122051

AMA Style

Zhang H, Liu H, Yang R, Wang W, Luo Q, Tu C. Hyperspectral Image Classification Based on Double-Branch Multi-Scale Dual-Attention Network. Remote Sensing. 2024; 16(12):2051. https://doi.org/10.3390/rs16122051

Chicago/Turabian Style

Zhang, Heng, Hanhu Liu, Ronghao Yang, Wei Wang, Qingqu Luo, and Changda Tu. 2024. "Hyperspectral Image Classification Based on Double-Branch Multi-Scale Dual-Attention Network" Remote Sensing 16, no. 12: 2051. https://doi.org/10.3390/rs16122051

APA Style

Zhang, H., Liu, H., Yang, R., Wang, W., Luo, Q., & Tu, C. (2024). Hyperspectral Image Classification Based on Double-Branch Multi-Scale Dual-Attention Network. Remote Sensing, 16(12), 2051. https://doi.org/10.3390/rs16122051

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop