基于上下文感知调制的高光谱图像深层特征提取网络
Going Deeper with Context-Aware Modulation for Hyperspectral Image Feature Extraction
摘要: 高光谱图像(HSI)由数百个连续窄带组成,具有丰富的光谱–空间信息。然而,波段间高度相关性与复杂依赖关系使得判别性光谱特征的高效建模仍具有挑战。为此,本文提出CAM-HSNet,旨在增强光谱局部特征与长距离依赖的联合建模能力的同时提升参数利用效率。具体而言,我们引入改进的卷积调制模块和卷积前馈网络,对卷积提取的局部光谱特征进行进一步编码,并构建能够捕获长距离依赖并实现信息交互的结构。在获得更具判别力的光谱表征基础上,模型能够以更少的谱维表示完成全局语义汇聚,从而压缩原有局部至全局映射的参数规模,实现参数减少且保持分类性能。实验结果表明,与现有方法相比,所提出的CAM-HSNet在整体精度(OA)、平均精度(AA)和Kappa系数等指标上均取得了更优的分类表现。
Abstract: Hyperspectral images (HSIs) consist of hundreds of contiguous narrow spectral bands and contain rich spectral-spatial information. However, the strong inter-band correlations and complex depen- dencies pose challenges for efficiently modeling discriminative spectral features. To address this issue, we propose CAM-HSNet, which aims to enhance the joint modeling of local spectral features and long-range dependencies while improving parameter efficiency. Specifically, we introduce an improved convolutional modulation module and a convolutional feed-forward network to further encode the locally extracted spectral features and to build structures capable of capturing long-range dependencies and facilitating information interaction. Based on the resulting more discriminative spectral representations, the model is able to achieve global semantic aggregation with fewer spectral dimensions, thereby reducing the parameter scale required for local-to-global mapping while maintaining classification performance. Experimental results demonstrate that, compared with existing methods, the proposed CAM-HSNet achieves superior performance in overall accuracy (OA), average accuracy (AA), and the Kappa coefficient.
文章引用:蔡士威. 基于上下文感知调制的高光谱图像深层特征提取网络[J]. 计算机科学与应用, 2026, 16(1): 215-229. https://doi.org/10.12677/csa.2026.161018

1. 引言

高光谱图像(Hyperspectral Imaging, HSI)能够在数百个连续且窄的光谱通道上获取地物的反射信息,不仅提供了丰富的空间细节,还包含细粒度的光谱特征。这些信息赋予了HSI在地物识别与分类中更强的判别能力,因此HSI分类已成为遥感领域的重要研究方向。HSI在矿产勘查[1]、精细农业[2]、环境监测[3]、植被检测[4]、城市化分析[5]以及农作物面积估算[6]等方面展现出广阔的应用前景。然而,HSI的高维特征不可避免地引入了大量冗余信息,并导致Hughes效应[7],这在很大程度上制约了传统分类器的性能[8]-[11]

为缓解高维光谱特征冗余与Hughes效应对分类性能的制约,传统方法如PCA [12]、ICA [13]和LDA [14]-[16]通过线性投影降低波段维度,但难以捕捉复杂的光谱模式。近年来深度学习已成为主流方法[17] [18]。CNN利用一维卷积提取光谱特征[19]或二维/三维卷积捕获光谱–空间信息[20]-[24],但光谱长距离依赖建模能力仍有限[25] [26]。Transformer通过自注意力机制显式建模长距离依赖[27],如SpectralFormer [28]和SSFTT [29],但存在计算复杂度高、缺乏局部归纳偏置、对大规模数据依赖强、训练成本大且容易过拟合等问题。值得注意的是,图像领域出现的Transformer风格卷积网络,通过大核卷积、深度可分离卷积及卷积前馈网络(ConvFFN)在效率与长距离建模上取得平衡,形成了许多模型方法[30]-[34],可以为高光谱特征建模提供启发。

本文使用A2S2K-ResNe [24]作为基础模型,考虑到该模型的光谱特征提取模块能够通过局部卷积提取邻近波段模式,并通过线性映射将这些局部特征整合为全局表示。然而,该模块在跨波段长距离依赖建模及光谱特征非线性拟合方面仍存在不足。为此,在局部特征到全局特征的线性映射前引入Transformer风格卷积模块,以对局部特征进行进一步深度建模,从而增强高阶光谱特征表达并提升分类性能。具体来说,保留其模型现有光谱特征提取模块以进行局部光谱特征提取,而后使用自适应卷积重叠块嵌入(Adaptive Convolutional Overlap Patch Embedding, ACPE),接着通过轻量化注意力增强特征提取模块(LAM),即ConvFFN和卷积调制块(Convolutional Modulation Module, CMM)对局部光谱特征进一步建模,同时为了平衡参数量和计算开销,最后使用线性映射实现光谱全局特征变换。本文的贡献主要体现在以下方面:

1. 我们提出了一种改进的卷积重叠块嵌入,其可实现特征增强和选择性关注,增强模块提取特征表达能力。

2. 我们提出了一种轻量化注意力增强特征提取模块,通过光谱维度局部特征进行进一步深度建模,从而增强高阶光谱特征表达并提升分类性能。

3. 所提出的网络架构提升了特征表示能力,并在三个基准数据集(即IP、KSC和UP)上使用有限的训练样本实现了最先进的分类准确率。

2. 相关工作

2.1. 卷积神经网络

CNN凭借局部感受野和参数共享特性,在HSI分类中展现了显著成效。Hu等[19]最早利用一维卷积堆叠提取光谱特征,但未能充分利用空间信息。后续研究指出,空间信息对分类性能至关重要[35]。然而,直接对高维HSI应用二维卷积网络会导致参数量过大,从而增加过拟合风险[36]。因此,许多方法通常先进行光谱降维,再利用二维卷积网络提取空间特征[37] [38]。进一步的发展包括金字塔残差网络DPyResNet [22]、三维卷积神经网络[39] [40],它们能够在不同程度上提升光谱–空间特征的建模能力,尤其是三维卷积神经网络能够在无需预处理的情况下直接提取光谱–空间联合特征。在此基础上,研究者们提出了多种改进方法,例如基于残差学习的光谱–空间残差网络SSRN [41]、多尺度三维深度卷积神经网络MS-3DNet [23] 、利用局部空间–光谱上下文信息进行特征提取的网络ContextNet [20]、利用非局部特征捕获长程上下文信息的网络ENL-FCN [21]以及基于注意力的自适应光谱空间核改进残差网络A2S2K-ResNet [24]。尽管如此,CNN仍然存在固有限制,例如感受野有限、长距离依赖建模能力不足[25] [26]

2.2. Transformer风格卷积网络

近年来,图像领域兴起了一类引入Transformer设计理念的卷积网络,通过大核卷积(尤其是深度可分离卷积)扩展感受野,利用更大范围的空间上下文信息进行特征建模,同时保持较高的计算效率。此类网络通常结合ConvFFN与残差结构,通过多层堆叠捕获复杂的高阶空间相互作用,从而显著提升网络的表达能力与泛化性能,被称为Transformer风格卷积网络。典型代表包括ConvNeXt [30],其基于残差堆叠和大核深度可分离卷积获得类Transformer的全局建模能力;FastViT [31]通过多尺度token混合提升全局上下文表达;VAN [32]利用可变形大核卷积建模跨区域依赖;Conv2Former [33]融合卷积与Transformer样式的混合结构实现局部–全局协同建模;FocalNet [34]则通过焦点式特征聚合在较低成本下捕获长距离依赖。尽管这些模型最初应用于图像任务,其结构设计在不依赖昂贵自注意力的情况下实现高效的长距离建模,为高光谱光谱维度特征建模提供了重要启发。

3. 网络结构

图1所示,本文在A2S2K-ResNet的基础上对光谱特征提取阶段结构进行了改进,可分为两个模块:(1) ACPE;(2) LAM。

3.1. 残差块结构

本研究采用基础架构中提出的残差块结构来联合提取高光谱图像的光谱与空间特征。残差块的结构如图2所示,包括Initial-ResBlock、Middle-ResBlock和Final-ResBlock三类。每个残差块由3D卷积(Conv3D)、批归一化(BN)和ReLU激活函数组成,并均嵌入有效信道注意力(effective channel attention, ECA) [42]。ECA通过局部跨通道交互建模长距离通道间的非线性依赖,从而提升特征表达能力与分类性能。在本文的整体框架中(见图1),残差块的结构与位置均保持与基础架构一致:前两个残差块主要负责光谱特征提取,后两个残差块用于建模空间相关性,其残差块结构如图2所示。同时各残差块的卷积核配置如下表1所示。

Figure 1. Overview of the CAM-HSNet framework

1. CAM-HSNet整体框架图

Figure 2. The structure of the residual blocks

2. 残差模块结构图

Table 1. Parameters of the convolution kernel in each residual block

1. 各残差块的卷积核参数

ResBlock

Kernels

Kernels Shapes

Initial-ResBlock

24

(1,1,7)

Middle-ResBlock

24

(1,1,7)

Middle-ResBlock

24

(3,3,1)

Final-ResBlock

24

(3,3,1)

3.2. LAM

LAM由CMM与ConvFFN结构组成,通过光谱维度的自适应建模实现特征的提取。该设计保持较强的特征表达能力,具备更高的灵活性与自适应性,为模型的轻量化与复杂空间建模提供了有效支持。其中,CMM提取光谱维度上下文信息,并将其映射为调制权重,进而实现对当前输入特征进行自适应加权调整,实现对输入特征更灵活的特征增强和选择性关注,类似自注意力机制的功能。而在ConvFFN模块中,卷积操作与标准的前馈网络(Feed-Forward Network, FFN)相结合,使网络在兼顾局部空间特征的同时,仍能实现强大的非线性拟合能力。通过在FFN中嵌入卷积核,模块能够捕获复杂的高阶空间相互作用,增强模型对局部特征的表达能力。

3.2.1. CMM

为在提升特征调制能力和保持结构统一性,本研究在Conv2Former的卷积调制思想基础上,结合FastViT中的ConvFFN结构,设计了一种改进的卷积调制模块CMM。该模块旨在通过卷积操作提取光谱维度的上下文信息,并发挥FFN的强大非线性拟合能力,生成自适应调制权重,对输入特征进行自适应加权调制。如图1所示,给定输入特征 X B×C×H×W ,CMM首先通过逐通道卷积(Depthwise Convolution, DW)提取局部上下文信息,随后施加批归一化(Batch Normalization, BN)以稳定特征分布,接着由两个线性变换层和一个非线性激活函数,并使用通道扩展倍数,实现将上下文信息映射为调制权重,同时为防止权重过度放大或分布失衡,在权重生成后使用双曲正切函数进行约束,从而将权重值限制在(−1,1)范围内。最终,调制权重作用于输入特征,实现自适应增强,并通过残差连接保持特征一致性与梯度流通,同时,为了在小样本情况下保持训练过程的稳定性,并避免分支中过度复杂的结构在早期训练阶段对主干造成干扰,我们在分支输出与主干融合之前引入可学习的通道缩放系数γ,以自适应调节分支特征的贡献。即

M=BN( DW( X ) ) (1)

W=Con v 1×1×1 ( σ( Con v 1×1×1 ( M ) ) ) (2)

W ^ =tanh( W ) (3)

X =X( 1+ W ^ γ ) (4)

这种设计不仅在结构上与ConvFFN保持一致,同时融合了Conv2Former的动态卷积调制思想和FFN的高维拟合能力。

3.2.2. ConvFFN

为了在保证局部空间特征建模能力的前提下,同时保持高效计算,本研究引入ConvFFN。该模块对FFN进行了卷积化改造,能够在不显著增加参数量的情况下,有效捕获局部上下文信息。该模块已经被验证,其可以在不显著增加参数量的情况下,提取空间局部信息。如图1所示,输入特征 X B×C×H×W 首先经过一个DW以提取局部空间上下文信息;随后通过BN以稳定特征分布,接着由两个通道线性变换层和一个非线性激活函数,并使用通道扩展倍数,实现捕获局部上下文信息的同时,增强了网络对复杂特征模式的建模能力,接着为保证梯度流通与特征一致性,模块在输入与输出之间加入了残差连接,同时,也对分支引入可学习的通道缩放系数γ,保持训练的稳定性,以及避免分支中过度复杂的结构在早期训练阶段对主干造成干扰。整个过程可表示为:

Y=BN( DW( X ) ) (5)

Y=Con v 1×1×1 ( σ( Con v 1×1×1 ( Y ) ) ) (6)

Z=X+Yγ (7)

3.3. ACPE

现有的卷积重叠块嵌入通常由标准卷积和归一化组成,对输入特征的自适应调整能力有限。为了增强卷积重叠块嵌入的自适应能力和特征表达能力,我们在卷积重叠块嵌入之前引入了CMM,通过对输入特征进行调制,实现特征增强和选择性关注,使后续的卷积重叠块嵌入能够获得更加丰富和可辨识的表示。具体地,如图1所示,输入特征首先经过CMM进行调制,然后使用卷积和BN进行块嵌入。该设计不仅提升了嵌入特征的表达能力,也可以无缝集成到现有的卷积网络。整个过程可表示为:

Y=BN( Conv( CMM( X ) ) ) (8)

3.4. 损失函数

最后,本文使用的交叉熵损失函数如下:

L( y, y ^ )= i=1 C y i log( y ^ i ) (9)

其中 y i 为真实标签, y ^ i 为预测标签。C表示HSI中土地覆盖类别的数量。

4. 实验与结果分析

4.1. 实验设置

在本文中,我们对数据集IP、KSC 和 UP进行了分类实验。将提出的与流行的深度学习方法ContextNet [20]、SSRN [41]、MS-3DNet [23]、DPyResNet [22]、A2S2K-ResNet [24]和ENL-FCN [21]进行了比较。

4.1.1. 高光谱图像数据集

本研究使用的高光谱数据集涵盖农业、城市及自然湿地等多样场景,包括Indian Pines (IP)、Pavia University (UP)、Kennedy Space Center (KSC)。IP数据集采集于美国印第安纳州农业区,由AVIRIS传感器获取,空间尺寸为145 × 145像素,保留约200个光谱波段,包含16类农作物及植被类别,呈现高光谱数据稀疏和类别不平衡特性。UP数据集来自意大利帕维亚大学校园区域,采用ROSIS传感器,空间尺寸为610 × 340像素,保留103个光谱波段,覆盖城市多种地物,如草地、建筑和道路,共9类,类别分布较均衡。KSC数据集由AVIRIS传感器在美国佛罗里达州肯尼迪航天中心附近采集,空间尺寸为 512 × 614像素,包含176个有效光谱波段,地物类型更具生态多样性,涵盖湿地、植被及裸地等13类,类别分布相对均衡且光谱区分度较强。总体而言,这些数据集在波段数量、空间尺度和地物复杂性上差异显著,为高光谱图像分类模型的评估提供了多样化且具有挑战性的实验基准。

表2汇总了三个数据集。对于预处理,数据集中的图像被归一化为零均值和单位方差。从IP、KSC和UP数据集中分别提取9 × 9 × 200、9 × 9 × 176和9 × 9 × 103的三维块,且未进行降维。

Table 2. Summary of the characteristics of the IP, UP, and KSC datasets

2. IP、KSC与UP数据集特征汇总

Description

Datasets

IP

UP

KSC

Sensor

AVIRIS

ROSIS

AVIRIS

Spatial Dimension

145×145

610×340

512×614

Spectral Bands

200

103

176

Land-cover

16

9

13

Total sample pixels

10249

42776

5202

4.1.2. 评估指标

为全面评估HSI分类模型性能,本研究采用总体精度(Overall Accuracy, OA)、平均精度(Average Accuracy, AA)和Kappa系数三种指标[43]。其中,OA衡量模型对所有样本的整体分类能力,即正确分类样本占总样本的比例,值越高表明整体预测与真实标签越接近。AA则通过计算各类别准确率的平均值,反映模型在不同类别上的表现,可揭示对少数类或难分类类别的偏差。Kappa系数进一步考虑了随机因素对分类结果的一致性,其取值范围为−1至1,数值越接近1表示模型预测与真实标签高度一致,比OA更严格地评估分类效果。综合使用这三项指标,可从整体精度、类别均衡性及随机一致性三个角度对模型性能进行全面、可靠的评价。

4.1.3. 实验细节

为了确保方法间比较的公平性,我们使用了与A2S2K-ResNe中相同的实验配置。Adam [44]被用来优化和更新模型的参数。在训练时,将总epoch数设置为200,批大小为32。使用一个周期策略[45]来寻找最优学习率。它通过在训练过程中逐渐提高学习率,然后逐渐降低学习率来搜索最优值。这种策略有助于模型实现快速收敛,避免过拟合。此外,一旦找到最优学习率,就会使用余弦退火调度器来调整每个数据集超过200个epoch的学习率。整个实验重复5次,分别得到OA、AA、和Kappa的均值和标准差。最后,OA、AA、和Kappa以均数 ± 标准差表示。在我们的实验中,和A2S2K-ResNe模型训练一致,所有样本被随机划分为训练集、验证集和测试集,其中训练集和验证集各占总样本的10%,其余80%用于模型评估。所有实验均在配备24  GB显存的NVIDIA RTX 3090 GPU上进行,实验在如下表,表3汇总了三个数据集实验设置信息。

Table 3. Experimental settings

3. 实验设置信息

Parameter/Datasets

IP

UP

KSC

Total Samples

10,249

42,776

5202

Train/Val/Test

1018/1018/8213

4273/4273/34230

516/516/4179

Best_LR

3.6e-4

3e-4

1e-4

Optimizer

Adam

Epochs

200

Batch Size

32

Learning Rate Strategy

One Cycle Policy + Cosine Annealing

Runs

5

Metrics

OA, AA, Kappa (mean ± std)

4.1.4. 参数分析及设置

Figure 3. OA achieved under different contextual field sizes on the IP, UP, and KSC datasets

3. 在IP、UP和KSC数据集上,不同上下文视野大小条件下获得的OA

为研究模型如何利用光谱上下文信息,我们将光谱方向的上下文视野大小作为可调节参数,并在若干离散取值上进行实验。通过仅在光谱维度改变感受野范围,我们分析不同光谱上下文大小对特征提取和分类性能的影响。该实验不仅有助于选择适合模型评估的光谱上下文视野大小,同时也可揭示模型在不同数据集上对光谱信息的利用方式。如图3显示,UP数据集在上下文视野为11时精度最高,而IP与KSC数据集在视野为5时表现较好。原因在于UP的光谱维度局部特征模式稀疏,LAM需依赖更大上下文以增强判别能力;而IP与KSC的局部光谱特征信息丰富,LAM更侧重局部特征提取。需要指出的是,尽管模型在光谱维度上设置的上下文窗口仅为5,卷积重叠块的嵌入使得实际光谱维度的上下文视野超过20,从而不仅实现了更大视野下的建模,同时也增强了模型对光谱信息的建模能力。

4.2. 测试结果与分析

我们在IP、UP和KSC数据集上系统评估了各方法在OA、AA和Kappa指标上的表现,并对分类结果进行了可视化分析。实验结果显示,所提出的模型在三个数据集上均取得最优性能:在IP数据集上相较次优方法分别提升0.32、1.15和0.35;在UP上提升0.10、0.09和0.12;在KSC上提升0.22、0.27和0.24。分类图进一步表明,本方法在空间一致性和地物边界保持方面均优于现有模型。综上,通过深度建模局部光谱特征并结合上下文调制的策略在不同数据场景中表现出稳定优势,有效提升了高光谱图像分类效果。详细结果见表4表5表6,分类图如图4图5图6所示。

Table 4. OA, AA, and Kappa on the IP dataset with 10% of the samples used for training

4. 在IP数据集上使用10%样本作为训练集所获得OA、AA和Kappa值

Class

ContextNet [20]

MS-3DNet [23]

ENL-FCN [21]

DPyResNet [22]

SSRN [41]

A2S2K-ResNet [24]

CAM-HSNet

1

88.78 ± 0.080

66.67 ± 0.471

97.56 ± 0.000

94.59 ± 0.076

57.78 ± 0.423

97.56 ± 0.034

98.47 ± 2.014

2

98.19 ± 0.005

75.94 ± 0.080

93.15 ± 0.000

93.83 ± 0.040

98.37 ± 0.012

98.62 ± 0.010

98.85 ± 0.147

3

95.37 ± 0.028

81.39 ± 0.007

97.59 ± 0.000

89.30 ± 0.003

97.47 ± 0.010

98.58 ± 0.006

99.23 ± 0.636

4

97.04 ± 0.021

88.63 ± 0.063

91.55 ± 0.000

93.51 ± 0.055

99.12 ± 0.0099

98.29 ± 0.014

98.51 ± 1.116

5

97.78 ± 0.015

95.61 ± 0.054

97.47 ± 0.000

99.26 ± 0.004

97.79 ± 0.013

99.02 ± 0.003

96.91 ± 1.726

6

98.60 ± 0.008

96.78 ± 0.026

99.24 ± 0.000

98.52 ± 0.007

98.50 ± 0.010

98.71 ± 0.010

99.45 ± 0. 257

7

90.35 ± 0.098

100.00 ± 0.000

100.00 ± 0.000

83.08 ± 0.178

66.67 ± 0.471

93.10 ± 0.097

86.54 ±8.661

8

97.76 ± 0.026

89.51 ± 0.091

97.44 ± 0.000

97.63 ± 0.022

96.45 ± 0.029

98.83 ± 0.016

100.00 ± 0.000

9

86.90 ± 0.102

66.67 ± 0.471

72.22 ± 0.000

66.66 ± 0.471

56.25 ± 0.418

74.26 ± 0.038

95.95 ± 3.355

10

96.08 ± 0.018

87.41 ± 0.070

94.74 ± 0.000

93.77 ± 0.029

98.33 ± 0.009

98.21 ± 0.016

98.27 ± 1.132

11

97.35 ± 0.004

76.69 ± 0.096

95.61 ± 0.000

89.78 ± 0.040

99.08 ± 0.005

99.09 ± 0.001

99.62 ± 0.262

12

94.00 ± 0.012

88.65 ± 0.036

97.00 ± 0.000

83.43 ± 0.107

98.46 ± 0.009

98.37 ± 0.013

97.29 ± 1.980

13

95.01 ± 0.03

99.78 ± 0.003

97.83 ± 0.000

98.19 ± 0.021

100.00 ± 0.000

99.80 ± 0.002

99.17 ± 0.791

14

98.49 ± 0.014

90.06 ± 0.087

99.12 ± 0.000

96.00 ± 0.021

98.63 ± 0.010

99.22 ± 0.007

99.73 ± 0.218

15

94.10 ± 0.031

88.21 ± 0.044

92.80 ± 0.000

91.22 ± 0.040

99.24 ± 0.005

97.86 ± 0.013

98.96 ± 1.308

16

93.57 ± 0.046

98.53 ± 0.021

100.00 ± 0.000

70.90 ± 0.388

95.63 ± 0.062

95.93 ± 0.057

96.85 ± 1.033

OA

96.98 ± 0.006

83.44 ± 0.060

96.15 ± 0.054

91.47 ± 0.029

98.38 ± 0.004

98.66 ± 0.004

98.98 ± 0.241

AA

94.96 ± 0.003

86.91 ± 0.084

95.21 ± 0.028

94.14 ± 0.006

91.11 ± 0.080

96.59 ± 0.003

97.74 ± 0.637

Kappa

0.9655 ± 0.007

0.8082 ± 0.070

0.9560 ± 0.030

0.9020 ± 0.034

0.9815 ± 0.005

0.9848 ± 0.005

98.83 ± 0.275

Table 5. OA, AA, and Kappa on the UP dataset with 10% of the samples used for training

5. 在UP数据集上使用10%样本作为训练集所获得的OA、AA和Kappa值

Class

ContextNet [20] [31]

MS-3DNet [23]

ENL-FCN [21]

DPyResNet [22]

SSRN [41]

A2S2K-Reset [24]

CAM-HSNet

1

99.56 ± 0.002

99.36 ± 0.001

99.98 ± 0.000

98.35 ± 0.017

99.85 ± 0.001

99.91 ± 0.000

99.96 ± 0.007

2

99.85 ± 0.002

99.80 ± 0.000

100.00 ± 0.000

98.76 ± 0.008

99.98 ± 0.000

99.99 ± 0.000

99.99 ± 0.005

3

99.19 ± 0.001

98.02 ± 0.017

99.68 ± 0.000

94.22 ± 0.034

99.68 ± 0.003

99.88 ± 0.001

99.54 ± 0.282

4

99.80 ± 0.002

99.71 ± 0.001

98.94 ± 0.000

99.20 ± 0.005

99.92 ± 0.001

99.95 ± 0.001

99.90 ± 0.091

5

99.91 ± 0.001

99.94 ± 0.000

100.00 ± 0.000

99.72 ± 0.003

99.94 ± 0.000

100.00 ± 0.00

100.00 ± 0.000

6

99.75 ± 0.003

99.43 ± 0.003

99.87 ± 0.000

98.52 ± 0.006

99.95 ± 0.001

99.91 ± 0.001

99.93 ± 0.130

7

98.37 ± 0.022

99.18 ± 0.005

100.00 ± 0.000

97.37 ± 0.004

100.00 ± 0.000

100.00 ± 0.000

99.87 ± 0.164

8

98.48 ± 0.008

97.13 ± 0.005

99.69 ± 0.000

84.51 ± 0.071

98.28 ± 0.015

98.88 ± 0.006

99.95 ± 0.051

9

99.26 ± 0.005

99.74 ± 0.002

100.00 ± 0.000

99.60 ± 0.001

99.39 ± 0.003

99.78 ± 0.003

99.95 ± 0.064

OA

99.57 ± 0.001

99.35 ± 0.001

99.76 ± 0.002

97.05 ± 0.010

99.77 ± 0.001

99.85 ± 0.001

99.95 ± 0.013

AA

99.35 ± 0.002

99.15 ± 0.002

99.70 ± 0.002

96.69 ± 0.006

99.66 ± 0.001

99.81 ± 0.001

99.90 ± 0.032

Kappa

0.9943 ±0.001

0.9913 ± 0.002

0.9972 ± 0.001

0.9608 ± 0.013

0.9969 ± 0.001

99.81 ± 0.001

99.93 ± 0.017

Table 6. OA, AA, and Kappa on the KSC dataset with 10% of the samples used for training

6. 在KSC数据集上使用10%样本作为训练集所获得的OA、AA和Kappa值

Class

ContextNet [20]

MS-3DNet [23]

ENL-FCN [21]

DPyResNet [22]

SSRN [41]

A2S2K-ResNet [24]

CAM-HSNet

1

99.78 ± 0.001

96.42 ± 0.009

99.71 ± 0.000

99.06 ± 0.010

99.95 ± 0.001

99.95 ± 0.001

100.00 ± 0.000

2

98.79 ± 0.014

95.88 ± 0.012

100.00 ± 0.000

89.72 ± 0.026

100.00 ± 0.00

98.68 ± 0.019

97.02 ± 3.866

3

82.83 ± 0.047

80.12 ± 0.168

100.00 ± 0.000

81.84 ± 0.074

99.66 ± 0.005

98.72 ± 0.012

98.54 ± 1.345

4

78.41 ± 0.165

90.06 ± 0.012

98.67 ± 0.000

89.83 ± 0.040

91.22 ± 0.047

94.27 ± 0.042

99.59 ± 0.604

5

74.22 ± 0.097

85.86 ± 0.034

98.61 ± 0.000

88.34 ± 0.095

100.00 ± 0.00

94.46 ± 0.050

95.37 ± 2.924

6

92.64 ± 0.050

85.61 ± 0.030

100.00 ± 0.000

88.54 ± 0.138

98.45 ± 0.022

99.82 ± 0.003

98.64 ± 1.666

7

94.40 ± 0.037

90.75 ± 0.088

100.00 ± 0.000

100.00 ± 0.00

95.42 ± 0.050

99.61 ± 0.005

99.75 ± 0.494

8

97.49 ± 0.009

98.99 ± 0.008

100.00 ± 0.000

94.81 ± 0.037

99.80 ± 0.003

100.00 ± 0.000

100.00 ± 0.000

9

99.92 ± 0.001

97.44 ± 0.028

100.00 ± 0.000

99.06 ± 0.002

100.00 ± 0.000

100.00 ± 0.000

100.00 ± 0.000

10

100.00 ± 0.000

98.78 ± 0.013

100.00 ± 0.000

99.46 ± 0.004

100.00 ± 0.000

100.00 ± 0.000

100.00 ± 0.000

11

99.90 ± 0.001

98.67 ± 0.013

100.00 ± 0.000

99.90 ± 0.001

100.00 ± 0.000

100.00 ± 0.000

100.00 ± 0.000

12

99.17 ± 0.006

99.06 ± 0.005

100.00 ± 0.000

94.42 ± 0.056

100.00 ± 0.000

100.00 ± 0.000

100.00 ± 0.000

13

99.96 ± 0.001

100.00 ± 0.000

100.00 ± 0.000

99.96 ± 0.001

100.00 ± 0.000

100.00 ± 0.000

100.00 ± 0.000

OA

96.34 ± 0.014

95.61 ± 0.019

99.25 ± 0.020

95.61 ± 0.019

99.29 ± 0.004

99.34 ± 0.0008

99.56 ± 0.184

AA

93.65 ± 0.026

93.66 ± 0.023

98.77 ± 0.021

94.22 ± 0.024

98.80 ± 0.008

98.88 ± 0.0018

99.15 ± 0.345

Kappa

0.9593 ± 0.016

0.9511 ± 0.021

0.9913 ± 0.018

0.9511 ± 0.021

0.9921 ± 0.004

0.9927 ± 0.001

99.51 ± 0.205

Figure 4. Classification results on the IP dataset. (a) False-color composite image; (b) Ground-truth labels; (c)~(i) Maps generated by ContextNet, MS-3DNet, DPyResNet, ENL-FCN, SSRN, A2S2K-ResNet and CAM-HSNet approach; (j) Color reference

4. IP数据集分类图。(a) 假彩色合成图像,(b) 真实标记图,(c)~(i) 分别由ContextNet、MS-3DNet、DPyResNet、ENL-FCN、SSRN、A2S2K-ResNet以及CAM-HSNet的生成的分类图,(j) 颜色标签

Figure 5. Classification results on the UP dataset. (a) False-color composite image; (b) Ground-truth labels; (c)~(i) Maps generated by ContextNet, MS-3DNet, DPyResNet, ENL-FCN, SSRN, A2S2K-ResNet and CAM-HSNet; (j) Color reference

5. UP数据集分类图。(a) 假彩色合成图像,(b) 真实标记图,(c)~(i) 分别由ContextNet、MS-3DNet、DPyResNet、ENL-FCN、SSRN、A2S2K-ResNet以及CAM-HSNet的生成的分类图,(j) 颜色标签

Figure 6. Classification results on the KSC dataset. (a) False-color composite image; (b) Ground-truth labels; (c)~(i) Maps generated by ContextNet, MS-3DNet, DPyResNet, ENL-FCN, SSRN, A2S2K-ResNet and CAM-HSNet; (j) Color reference

6. KSC数据集分类图。(a) 假彩色合成图像,(b) 真实标记图,(c)~(i) 分别由ContextNet、MS-3DNet、DPyResNet、ENL-FCN、SSRN、A2S2K-ResNet以及CAM-HSNet的生成的分类图,(j) 颜色标签

4.3. 消融实验

为系统评估所提出方法中各组件的作用,我们在UP数据集上进行了消融实验,并构建三种不同的模型配置。相应结果汇总于表7。具体而言:

1) Setting 1:仅采用Conv + BN 模块。该配置移除CMM与LAM模块,用以作为最简基线;2) Setting 2:在Setting 1的基础上引入CMM,以分析其在光谱维度特征建模及类别判别能力提升方面的贡献;3) Setting 3:在Setting 2的基础上进一步加入LAM模块,以探究其在类别判别能力提升方面的贡献。

实验结果显示,所提出模型的OA、AA与Kappa系数均有提升。这一现象表明,模型在整体精度提高的同时,各类别的判别能力和分类一致性也得到增强,说明特征提取模块能够有效提升模型对不同类别的区分能力。此外,Setting 1的结果表明,在样本有限的情况下,仅依赖单个Conv + BN模块,模型就能够实现分类精度的提升,同时降低参数量和计算开销。这一现象说明,在小样本条件下,模型参数多并不必然带来性能提升。然而,这并不意味着基础模型中更多的参数在大样本条件下无效。实际上,这表明模型设计应能够实现特征的渐进式学习:在小样本下优先学习简单模式,在大样本下进一步捕获复杂模式,从而保证模型在不同样本规模下均能保持良好的特征表征能力和分类性能。

综上,消融实验验证了各模块设计的合理性与互补性,进一步证明了所提出方法在特征表达与分类性能上的有效性。

Table 7. Ablation experiments of the proposed CAM-HSNet on the UP dataset

7. 所提出CAM-HSNet在UP数据集上的模块消融实验

CASE

metrics

OA (%)

AA (%)

Kappa (%)

1

99.886 ± 0.130

99.822 ± 0.180

99.849 ± 0.171

2

99.904 ± 0.099

99.857 ± 0.114

99.872 ± 0.132

3

99.951 ± 0.013

99.904 ± 0.032

99.935 ± 0.017

4.4. 计算成本和内存使用分析

我们进一步分析了所提出方法的时间复杂度和空间复杂度。以IP数据集为例,表8列出了CAM-HSNet与SSRN、A2S2K-ResNet在OA、Kappa、参数数量、浮点运算量(FLOPs)以及推理时间等方面的比较结果。实验结果表明,本文基于A2S2K-ResNet的改进模型,通过优化局部到全局特征映射,在降低参数量的同时,实现了更优的分类性能。进一步观察可知,在光谱特征提取的后期阶段,轻量化结构的计算优势尚未完全显现,其主要贡献在于提供更大的感受野以建模长距离依赖,从而提升了模型的OA和Kappa。同时,模型在GPU上的显存占用较基础模型略有下降,为后续在计算效率与资源优化方面的研究提供了潜在的方向。

Table 8. Comparison of complexity and performance of different methods on the IP dataset

8. 不同方法在IP数据集上的复杂度与性能比较

Model

SSRN

A2S2K-ResNet

CAM-HSNet (ours)

Params

364.1K

370.7K

257.2K

GPU Memory (MB)

11.34

14.98

14.58

OA (%)

98.38 ± 0.004

98.66 ± 0.004

98.98 ± 0.241

Kappa

0.9815 ± 0.005

0.9848 ± 0.005

98.83 ± 0.275

Flops (MFLOPs)

311.59

335.93

471.08

Inferrence Time

0.89s

1.19s

1.87s

5. 结论

本文通过对光谱局部特征的进一步建模,并结合改进的调制结构及具有较大感受野的轻量化模块,实现了光谱局部特征与长距离依赖的联合建模,同时提升了参数利用效率,从而提高了分类精度。实验结果表明,本方法在减少模型参数的情况下仍保持优异的分类性能,并相比其他先进方法显著增强了高光谱特征的判别性,从而提高了模型对各类别的识别能力。

致 谢

本研究感谢山西坤泰环保科技集团有限公司在技术与资金上的支持,感谢数学地质四川省重点实验室在研究过程中提供的技术支持,并特别致谢四川旅游学院人工智能学院罗晓东教授在研究过程中提供的指导与帮助。

参考文献

[1] Peyghambari, S. and Zhang, Y. (2021) Hyperspectral Remote Sensing in Lithological Mapping, Mineral Exploration, and Environmental Geology: An Updated Review. Journal of Applied Remote Sensing, 15, Article ID: 031501. [Google Scholar] [CrossRef
[2] Zhang, X., Sun, Y., Shang, K., Zhang, L. and Wang, S. (2016) Crop Classification Based on Feature Band Set Construction and Object-Oriented Approach Using Hyperspectral Images. IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing, 9, 4117-4128. [Google Scholar] [CrossRef
[3] Karalas, K., Tsagkatakis, G., Zervakis, M. and Tsakalides, P. (2016) Land Classification Using Remotely Sensed Data: Going Multilabel. IEEE Transactions on Geoscience and Remote Sensing, 54, 3548-3563. [Google Scholar] [CrossRef
[4] Melgani, F. and Bruzzone, L. (2004) Classification of Hyperspectral Remote Sensing Images with Support Vector Machines. IEEE Transactions on Geoscience and Remote Sensing, 42, 1778-1790. [Google Scholar] [CrossRef
[5] Gislason, P.O., Benediktsson, J.A. and Sveinsson, J.R. (2006) Random Forests for Land Cover Classification. Pattern Recognition Letters, 27, 294-300. [Google Scholar] [CrossRef
[6] Qiao, T., Yang, Z., Ren, J., Yuen, P., Zhao, H., Sun, G., et al. (2018) Joint Bilateral Filtering and Spectral Similarity-Based Sparse Representation: A Generic Framework for Effective Feature Extraction and Data Classification in Hyperspectral Imaging. Pattern Recognition, 77, 316-328. [Google Scholar] [CrossRef
[7] Hughes, G. (1968) On the Mean Accuracy of Statistical Pattern Recognizers. IEEE Transactions on Information Theory, 14, 55-63. [Google Scholar] [CrossRef
[8] Ben Hamida, A., Benoit, A., Lambert, P. and Ben Amar, C. (2018) 3-D Deep Learning Approach for Remote Sensing Image Classification. IEEE Transactions on Geoscience and Remote Sensing, 56, 4420-4434. [Google Scholar] [CrossRef
[9] Hang, R., Liu, Q., Hong, D. and Ghamisi, P. (2019) Cascaded Recurrent Neural Networks for Hyperspectral Image Classification. IEEE Transactions on Geoscience and Remote Sensing, 57, 5384-5394. [Google Scholar] [CrossRef
[10] Zou, Y., Fu, Y., Zheng, Y. and Li, W. (2020) CSR-Net: Camera Spectral Response Network for Dimensionality Reduction and Classification in Hyperspectral Imagery. Remote Sensing, 12, Article 3294. [Google Scholar] [CrossRef
[11] Ahmad, M., Shabbir, S., Roy, S.K., Hong, D., Wu, X., Yao, J., et al. (2022) Hyperspectral Image Classification—Traditional to Deep Models: A Survey for Future Prospects. IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing, 15, 968-999. [Google Scholar] [CrossRef
[12] Farrell, M.D. and Mersereau, R.M. (2005) On the Impact of PCA Dimension Reduction for Hyperspectral Detection of Difficult Targets. IEEE Geoscience and Remote Sensing Letters, 2, 192-195. [Google Scholar] [CrossRef
[13] Moussaoui, S., Hauksdóttir, H., Schmidt, F., Jutten, C., Chanussot, J., Brie, D., et al. (2008) On the Decomposition of Mars Hyperspectral Data by ICA and Bayesian Positive Source Separation. Neurocomputing, 71, 2194-2208. [Google Scholar] [CrossRef
[14] Hou, B., Wang, K., Yao, M., et al. (2017) Semi-Supervised Spatial-Spectral Discriminant Analysis for Hyperspectral Image Classification. Acta Geodaetica et Cartographica Sinica, 46, 1098-1106.
[15] Jia, S., Zhao, Q., Zhuang, J., Tang, D., Long, Y., Xu, M., et al. (2021) Flexible Gabor-Based Superpixel-Level Unsupervised LDA for Hyperspectral Image Classification. IEEE Transactions on Geoscience and Remote Sensing, 59, 10394-10409. [Google Scholar] [CrossRef
[16] Fabiyi, S.D., Murray, P., Zabalza, J. and Ren, J. (2021) Folded LDA: Extending the Linear Discriminant Analysis Algorithm for Feature Extraction and Data Reduction in Hyperspectral Remote Sensing. IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing, 14, 12312-12331. [Google Scholar] [CrossRef
[17] Maggiori, E., Tarabalka, Y., Charpiat, G. and Alliez, P. (2017) Convolutional Neural Networks for Large-Scale Remote-Sensing Image Classification. IEEE Transactions on Geoscience and Remote Sensing, 55, 645-657. [Google Scholar] [CrossRef
[18] Zhu, X.X., Tuia, D., Mou, L., Xia, G., Zhang, L., Xu, F., et al. (2017) Deep Learning in Remote Sensing: A Comprehensive Review and List of Resources. IEEE Geoscience and Remote Sensing Magazine, 5, 8-36. [Google Scholar] [CrossRef
[19] Hu, W., Huang, Y., Wei, L., Zhang, F. and Li, H. (2015) Deep Convolutional Neural Networks for Hyperspectral Image Classification. Journal of Sensors, 2015, Article ID: 258619. [Google Scholar] [CrossRef
[20] Lee, H. and Kwon, H. (2017) Going Deeper with Contextual CNN for Hyperspectral Image Classification. IEEE Transactions on Image Processing, 26, 4843-4855. [Google Scholar] [CrossRef] [PubMed]
[21] Shen, Y. (2020) Efficient Deep Learning of Nonlocal Features for Hyperspectral Image Classification. IEEE Transactions on Geoscience and Remote Sensing, 59, 6029-6043.
[22] Paoletti, M.E., Haut, J.M., Fernandez-Beltran, R., Plaza, J., Plaza, A.J. and Pla, F. (2019) Deep Pyramidal Residual Networks for Spectral-Spatial Hyperspectral Image Classification. IEEE Transactions on Geoscience and Remote Sensing, 57, 740-754. [Google Scholar] [CrossRef
[23] He, M., Li, B. and Chen, H. (2017) Multi-Scale 3D Deep Convolutional Neural Network for Hyperspectral Image Classification. 2017 IEEE International Conference on Image Processing (ICIP), Beijing, 17-20 September 2017, 3904-3908. [Google Scholar] [CrossRef
[24] Roy, S.K., Manna, S., Song, T. and Bruzzone, L. (2021) Attention-Based Adaptive Spectral-Spatial Kernel Resnet for Hyperspectral Image Classification. IEEE Transactions on Geoscience and Remote Sensing, 59, 7831-7843. [Google Scholar] [CrossRef
[25] Luo, W., Li, Y., Urtasun, R., et al. (2016) Understanding the Effective Receptive Field in Deep Convolutional Neural Networks. arXiv: 1701.04128.
[26] Li, X., Wang, W., Hu, X. and Yang, J. (2019) Selective Kernel Networks. 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Long Beach, 15-20 June 2019, 510-519. [Google Scholar] [CrossRef
[27] Vaswani, A. (2017) Attention Is All You Need. arXiv: 1706.03762.
[28] Hong, D., Han, Z., Yao, J., Gao, L., Zhang, B., Plaza, A., et al. (2022) SpectralFormer: Rethinking Hyperspectral Image Classification with Transformers. IEEE Transactions on Geoscience and Remote Sensing, 60, 1-15. [Google Scholar] [CrossRef
[29] Sun, L., Zhao, G., Zheng, Y. and Wu, Z. (2022) Spectral-Spatial Feature Tokenization Transformer for Hyperspectral Image Classification. IEEE Transactions on Geoscience and Remote Sensing, 60, 1-14. [Google Scholar] [CrossRef
[30] Liu, Z., Mao, H., Wu, C., Feichtenhofer, C., Darrell, T. and Xie, S. (2022) A Convnet for the 2020s. 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), New Orleans, 18-24 June 2022, 11966-11976. [Google Scholar] [CrossRef
[31] Vasu, P.K.A., Gabriel, J., Zhu, J., et al. (2023) FastViT: A Fast Hybrid Vision Transformer using Structural Reparameterization. arXiv: 2303.14189.
[32] Guo, M.H., Lu, C.Z., Liu, Z.N., et al. (2022) Visual Attention Network. arXiv: 2202.09741.
[33] Hou, Q., Lu, C.Z., Cheng, M.M., et al. (2022) Conv2Former: A Simple Transformer-Style ConvNet for Visual Recognition. arXiv: 2211.11943.
[34] Yang, J., Li, C., Dai, X., et al. (2022) Focal Modulation Networks. arXiv: 2203.11926
[35] Li, S., Song, W., Fang, L., Chen, Y., Ghamisi, P. and Benediktsson, J.A. (2019) Deep Learning for Hyperspectral Image Classification: An Overview. IEEE Transactions on Geoscience and Remote Sensing, 57, 6690-6709. [Google Scholar] [CrossRef
[36] Gong, Z., Zhong, P., Yu, Y., Hu, W. and Li, S. (2019) A CNN with Multiscale Convolution and Diversified Metric for Hyperspectral Image Classification. IEEE Transactions on Geoscience and Remote Sensing, 57, 3599-3618. [Google Scholar] [CrossRef
[37] Zhao, W. and Du, S. (2016) Spectral–spatial Feature Extraction for Hyperspectral Image Classification: A Dimension Reduction and Deep Learning Approach. IEEE Transactions on Geoscience and Remote Sensing, 54, 4544-4554. [Google Scholar] [CrossRef
[38] Zhang, H., Li, Y., Zhang, Y. and Shen, Q. (2017) Spectral-Spatial Classification of Hyperspectral Imagery Using a Dual-Channel Convolutional Neural Network. Remote Sensing Letters, 8, 438-447. [Google Scholar] [CrossRef
[39] Chen, Y., Jiang, H., Li, C., Jia, X. and Ghamisi, P. (2016) Deep Feature Extraction and Classification of Hyperspectral Images Based on Convolutional Neural Networks. IEEE Transactions on Geoscience and Remote Sensing, 54, 6232-6251. [Google Scholar] [CrossRef
[40] Li, Y., Zhang, H. and Shen, Q. (2017) Spectral-Spatial Classification of Hyperspectral Imagery with 3D Convolutional Neural Network. Remote Sensing, 9, Article 67. [Google Scholar] [CrossRef
[41] Zhong, Z., Li, J., Luo, Z. and Chapman, M. (2018) Spectral-Spatial Residual Network for Hyperspectral Image Classification: A 3-D Deep Learning Framework. IEEE Transactions on Geoscience and Remote Sensing, 56, 847-858. [Google Scholar] [CrossRef
[42] Wang, Q., Wu, B., Zhu, P., Li, P., Zuo, W. and Hu, Q. (2020) ECA-Net: Efficient Channel Attention for Deep Convolutional Neural Networks. 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Seattle, 13-19 June 2020, 11531-11539. [Google Scholar] [CrossRef
[43] Foody, G.M. (2002) Status of Land Cover Classification Accuracy Assessment. Remote Sensing of Environment, 80, 185-201. [Google Scholar] [CrossRef
[44] Kingma, D.P. and Ba, J.L. (2015) Adam: A Method for Stochastic Optimization. arXiv: 1412.6980.
[45] Smith, L.N. (2018) A Disciplined Approach to Neural Network Hyper-Parameters: Part 1—Learning Rate, Batch Size, Mo-mentum, and Weight Decay. arXiv: 1803.09820.