论文笔记:DARecNet-BS: Unsupervised Dual-Attention Reconstruction Network for Hypersp

384 阅读2分钟

0. 基本信息

  • 引用信息

S. K. Roy, S. Das, T. Song and B. Chanda, "DARecNet-BS: Unsupervised Dual-Attention Reconstruction Network for Hyperspectral Band Selection," in IEEE Geoscience and Remote Sensing Letters, doi: 10.1109/LGRS.2020.3013235.

  • bibtex
@article{Roy2020DARECNETBS,
  author  = {S. K. {Roy} and S. {Das} and T. {Song} and B. {Chanda}},
  journal = {IEEE Geoscience and Remote Sensing Letters},
  title   = {DARecNet-BS: Unsupervised Dual-Attention Reconstruction Network for Hyperspectral Band Selection},
  year    = {2020},
  volume  = {},
  number  = {},
  pages   = {1-5},
  doi     = {10.1109/LGRS.2020.3013235}
}

1. 基本思想

同样将波段选择问题视为光谱重建问题,本文的创新在于不仅应用了波段注意力机制(channel attention module),还增加了位置注意力机制(position attention module),所以叫做Dual-Attention, 因此能够重建三位高光谱图像数据立方体。

总体流程图

2. 具体实现

2.1 位置注意力模块(PAM)

首先将输入的Patch通过卷积网络生成三个Feature map A1,A2,A3A_1, A_2, A_3,使用A1,A2A_1, A_2计算Patch中两两位置间的Attention map:

qjip=exp(A1,ip,A2,jp)i,j=1Vexp(A1,ip,A2,jp)q_{ji}^p = \frac{\exp (A_{1, i}^p, A_{2, j}^p)}{\sum_{i,j=1}^V \exp (A_{1, i}^p, A_{2, j}^p)}

其中V表示一个patch中的像素数量。

而后将该Attention map利用下面公式应用到像素j上:

EPAM,j=αpi=1V(qjipA3,ip)+XjE_{PAM,j} = \alpha^p \sum_{i=1}^V (q_{ji}^p A_{3,i}^p) + X_j

2.2 波段注意力模块(CAM)

采用和PAM机制相似的计算方法,只不过是在生成两两波段间的Attention Map:

qjic=exp(A1,ic,A2,jc)i,j=1Bexp(A1,ic,A2,jc)q_{ji}^c = \frac{\exp (A_{1, i}^c, A_{2, j}^c)}{\sum_{i,j=1}^B \exp (A_{1, i}^c, A_{2, j}^c)}

其中B表示波段数量。

Attention map应用到像素同样调整为:

ECAM,j=αci=1B(qjicA3,ic)+XjE_{CAM,j} = \alpha^c \sum_{i=1}^B (q_{ji}^c A_{3,i}^c) + X_j

2.3 损失函数

损失函数直接计算重建后的图像与原始图像的L1距离:

L1(θb,θe)=12Ntri=1Ntrxix^i1\mathcal{L}_1(\theta_b, \theta_e) = \frac{1}{2N_{tr}}\sum_{i=1}^{N_{tr}}||x_i - \hat{x}_i||_1

2.4 实现细节

重建网络使用AutoEncoder结构,使用3D卷积,激活函数使用PReLU。

输入Patch大小为7×7×B7 \times 7 \times B,使用cosing annealing调整learning rate,使用diffGrad方法作为optimizer。

最终进行波段选择时,计算重建后output的entropy

H(bi)=p(h)log(p(h)),s.t.hp(h)=1\mathcal{H}(b_i) = - \sum p(h) log(p(h)), s.t. \sum_h p(h)=1

其中h是一个S×SS \times S中Patch中波段直方图的Bin数量, p(h)=(n(h)/(S×S))p(h) = (n(h) / (S \times S))是h出现的概率。最终选择top-k个entropy最大的波段作为最终选择的波段,因此熵越大通常说明波段所含信息越多。

3. 代码

作者开源了相关代码:github.com/ucalyptus/D…