Spatial-Spectral BERT for Hyperspectral Image Classification
<p>(<b>a</b>) The proposed D<sup>2</sup>BERT model. (<b>b</b>) Encoder (En) layer.</p> "> Figure 2
<p>Classification maps achieved by D<sup>2</sup>BERT in three different configurations and the ground-truth for IP and PU.</p> "> Figure 3
<p>Classification maps of IP achieved by different methods (<b>a</b>) classes, (<b>b</b>) ground truth, (<b>c</b>) CNN, (<b>d</b>) CNN-PPF, (<b>e</b>) CDCNN, (<b>f</b>) DRCNN, (<b>g</b>) Spa-Spe-TR, (<b>h</b>) SSRN, (<b>i</b>) HybridSN, (<b>j</b>) SST, (<b>k</b>) HFFSNet, (<b>l</b>) GSPFormer, (<b>m</b>) HSI-BERT, (<b>n</b>) D<sup>2</sup>BERT.</p> "> Figure 4
<p>Classification accuracy varying the number of training samples: (<b>a</b>) PU, (<b>b</b>) IP.</p> ">
Abstract
:1. Introduction
- To make full use of spatial dependencies among neighboring pixels and spectral dependencies among spectral bands, a dual-dimension (i.e., spatial-spectral) BERT is proposed for HSIC, overcoming the limitations of merely considering the spatial dependency as in HSI-BERT.
- To exploit long-range spectral dependence among spectral bands for HSIC, a spectral BERT branch is introduced, where a band position embedding is integrated to build a band-order-aware network.
- To improve the learning efficiency of the proposed BERT model, a multi-supervision strategy is presented for training, which allows features from each layer to be directly supervised through the proposed loss function.
2. Proposed D2BERT Model
2.1. Deep Spatial Feature Learning in Spatial BERT
2.2. Deep Spectral Feature Learning in Spectral BERT
2.3. D2BERT Model Training
3. Experimental Analysis
3.1. Experimental Setting
3.2. Evaluation Metrics
3.3. Ablation Study
3.4. Comparison with Benchmark
4. Conclusions
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Yu, C.; Huang, J.; Song, M.; Wang, Y.; Chang, C.I. Edge-inferring graph neural network with dynamic task-guided self-diagnosis for few-shot hyperspectral image classification. IEEE Trans. Geosci. Remote Sens. 2022, 60, 1–13. [Google Scholar] [CrossRef]
- Wang, Y.; Chen, X.; Zhao, E.; Song, M. Self-supervised Spectral-level Contrastive Learning for Hyperspectral Target Detection. IEEE Trans. Geosci. Remote Sens. 2023, 61, 1–15. [Google Scholar] [CrossRef]
- Guha, A. Mineral exploration using hyperspectral data. In Hyperspectral Remote Sensing; Elsevier: Amsterdam, The Netherlands, 2020; pp. 293–318. [Google Scholar]
- Aspinall, R.J.; Marcus, W.A.; Boardman, J.W. Considerations in collecting, processing, and analysing high spatial resolution hyperspectral data for environmental investigations. J. Geogr. Syst. 2002, 4, 15–29. [Google Scholar] [CrossRef]
- Caballero, D.; Calvini, R.; Amigo, J.M. Hyperspectral imaging in crop fields: Precision agriculture. In Data Handling in Science and Technology; Elsevier: Amsterdam, The Netherlands, 2019; Volume 32, pp. 453–473. [Google Scholar]
- Benediktsson, J.A.; Palmason, J.A.; Sveinsson, J.R. Classification of hyperspectral data from urban areas based on extended morphological profiles. IEEE Trans. Geosci. Remote Sens. 2005, 43, 480–491. [Google Scholar] [CrossRef]
- Zhao, F.; Zhang, J.; Meng, Z.; Liu, H. Densely connected pyramidal dilated convolutional network for hyperspectral image classification. Remote Sens. 2021, 13, 3396. [Google Scholar] [CrossRef]
- 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. 2021, 60, 1–15. [Google Scholar] [CrossRef]
- Scheibenreif, L.; Mommert, M.; Borth, D. Masked Vision Transformers for Hyperspectral Image Classification. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Vancouver, BC, Canada, 17–24 June 2023; pp. 2165–2175. [Google Scholar]
- Fang, L.; Li, S.; Duan, W.; Ren, J.; Benediktsson, J.A. Classification of hyperspectral images by exploiting spectral-spatial information of superpixel via multiple kernels. IEEE Trans. Geosci. Remote Sens. 2015, 53, 6663–6674. [Google Scholar] [CrossRef]
- Majdar, R.S.; Ghassemian, H. Improved Locality Preserving Projection for Hyperspectral Image Classification in Probabilistic Framework. Int. J. Pattern Recognit. Artif. Intell. 2021, 35, 2150042. [Google Scholar] [CrossRef]
- Marconcini, M.; Camps-Valls, G.; Bruzzone, L. A composite semisupervised SVM for classification of hyperspectral images. IEEE Geosci. Remote Sens. Lett. 2009, 6, 234–238. [Google Scholar] [CrossRef]
- Ye, Q.; Zhao, H.; Li, Z.; Yang, X.; Gao, S.; Yin, T.; Ye, N. L1-Norm distance minimization-based fast robust twin support vector k-plane clustering. IEEE Trans. Neural Netw. Learn. Syst. 2017, 29, 4494–4503. [Google Scholar] [CrossRef]
- Pal, M. Multinomial logistic regression-based feature selection for hyperspectral data. Int. J. Appl. Earth Obs. Geoinf. 2012, 14, 214–220. [Google Scholar] [CrossRef]
- Yang, J.M.; Yu, P.T.; Kuo, B.C. A nonparametric feature extraction and its application to nearest neighbor classification for hyperspectral image data. IEEE Trans. Geosci. Remote Sens. 2009, 48, 1279–1293. [Google Scholar] [CrossRef]
- Samaniego, L.; Bárdossy, A.; Schulz, K. Supervised classification of remotely sensed imagery using a modified k-NN technique. IEEE Trans. Geosci. Remote Sens. 2008, 46, 2112–2125. [Google Scholar] [CrossRef]
- Li, W.; Du, Q.; Zhang, F.; Hu, W. Collaborative-representation-based nearest neighbor classifier for hyperspectral imagery. IEEE Geosci. Remote Sens. Lett. 2014, 12, 389–393. [Google Scholar] [CrossRef]
- Sun, L.; Wu, Z.; Liu, J.; Xiao, L.; Wei, Z. Supervised spectral–spatial hyperspectral image classification with weighted Markov random fields. IEEE Trans. Geosci. Remote Sens. 2014, 53, 1490–1503. [Google Scholar] [CrossRef]
- Tarabalka, Y.; Fauvel, M.; Chanussot, J.; Benediktsson, J.A. SVM-and MRF-based method for accurate classification of hyperspectral images. IEEE Geosci. Remote Sens. Lett. 2010, 7, 736–740. [Google Scholar] [CrossRef]
- Rodarmel, C.; Shan, J. Principal component analysis for hyperspectral image classification. Surv. Land Inf. Sci. 2002, 62, 115–122. [Google Scholar]
- Cheng, G.; Li, Z.; Han, J.; Yao, X.; Guo, L. Exploring hierarchical convolutional features for hyperspectral image classification. IEEE Trans. Geosci. Remote Sens. 2018, 56, 6712–6722. [Google Scholar] [CrossRef]
- Lee, H.; Kwon, H. Contextual deep CNN based hyperspectral classification. In Proceedings of the 2016 IEEE International Geoscience and Remote Sensing Symposium (IGARSS), Beijing, China, 10–15 July 2016; IEEE: Piscataway, NJ, USA, 2016; pp. 3322–3325. [Google Scholar]
- Xu, X.; Li, W.; Ran, Q.; Du, Q.; Gao, L.; Zhang, B. Multisource remote sensing data classification based on convolutional neural network. IEEE Trans. Geosci. Remote Sens. 2017, 56, 937–949. [Google Scholar] [CrossRef]
- Cao, X.; Yao, J.; Xu, Z.; Meng, D. Hyperspectral image classification with convolutional neural network and active learning. IEEE Trans. Geosci. Remote Sens. 2020, 58, 4604–4616. [Google Scholar] [CrossRef]
- Mou, L.; Ghamisi, P.; Zhu, X.X. Deep recurrent neural networks for hyperspectral image classification. IEEE Trans. Geosci. Remote Sens. 2017, 55, 3639–3655. [Google Scholar] [CrossRef]
- He, J.; Zhao, L.; Yang, H.; Zhang, M.; Li, W. HSI-BERT: Hyperspectral image classification using the bidirectional encoder representation from transformers. IEEE Trans. Geosci. Remote Sens. 2019, 58, 165–178. [Google Scholar] [CrossRef]
- Devlin, J.; Chang, M.W.; Lee, K.; Toutanova, K. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv 2018, arXiv:1810.04805. [Google Scholar]
- Dehghani, M.; Gouws, S.; Vinyals, O.; Uszkoreit, J.; Kaiser, Ł. Universal transformers. arXiv 2018, arXiv:1807.03819. [Google Scholar]
- Windrim, L.; Melkumyan, A.; Murphy, R.J.; Chlingaryan, A.; Ramakrishnan, R. Pretraining for hyperspectral convolutional neural network classification. IEEE Trans. Geosci. Remote Sens. 2018, 56, 2798–2810. [Google Scholar] [CrossRef]
- Li, W.; Wu, G.; Zhang, F.; Du, Q. Hyperspectral image classification using deep pixel-pair features. IEEE Trans. Geosci. Remote Sens. 2016, 55, 844–853. [Google Scholar] [CrossRef]
- 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]
- He, X.; Chen, Y.; Li, Q. Two-Branch Pure Transformer for Hyperspectral Image Classification. IEEE Geosci. Remote Sens. Lett. 2022, 19, 1–5. [Google Scholar] [CrossRef]
- 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. 2017, 56, 847–858. [Google Scholar] [CrossRef]
- Roy, S.K.; Krishna, G.; Dubey, S.R.; Chaudhuri, B.B. HybridSN: Exploring 3-D–2-D CNN feature hierarchy for hyperspectral image classification. IEEE Geosci. Remote Sens. Lett. 2019, 17, 277–281. [Google Scholar] [CrossRef]
- Feng, Z.; Liu, X.; Yang, S.; Zhang, K.; Jiao, L. Hierarchical Feature Fusion and Selection for Hyperspectral Image Classification. IEEE Geosci. Remote Sens. Lett. 2023, 20, 1–5. [Google Scholar] [CrossRef]
- Chen, D.; Zhang, J.; Guo, Q.; Wang, L. Hyperspectral Image Classification based on Global Spectral Projection and Space Aggregation. IEEE Geosci. Remote Sens. Lett. 2023, 20, 1–5. [Google Scholar] [CrossRef]
Class | D2BERT w/o Spectral Branch | D2BERT w/o Multi-Supervision | D2BERT |
---|---|---|---|
1 | 95.83 | 100 | 100 |
2 | 95.82 | 98.21 | 99.54 |
3 | 96.21 | 96.07 | 99.60 |
4 | 97.10 | 99.00 | 100 |
5 | 97.73 | 95.52 | 98.32 |
6 | 98.94 | 99.69 | 100 |
7 | 86.96 | 86.96 | 100 |
8 | 1.00 | 100 | 100 |
9 | 1.00 | 82.35 | 100 |
OA (%) | 98.88 ± 0.10 | 99.04 ± 0.11 | 99.79 ± 0.06 |
AA (%) | 98.36 ± 0.18 | 98.42 ± 0.14 | 99.68 ± 0.09 |
Class | D2BERT w/o Spectral Branch | D2BERT w/o Multi-Supervision | D2BERT |
---|---|---|---|
1 | 98.89 | 98.75 | 99.93 |
2 | 99.78 | 99.85 | 99.98 |
3 | 96.26 | 97.98 | 98.85 |
4 | 97.44 | 98.01 | 99.41 |
5 | 100 | 100 | 100 |
6 | 99.44 | 99.98 | 100 |
7 | 98.71 | 96.81 | 99.91 |
8 | 95.74 | 95.66 | 99.02 |
9 | 98.86 | 98.62 | 100 |
10 | 94.40 | 97.85 | 99.83 |
11 | 97.30 | 97.87 | 99.86 |
12 | 94.48 | 98.09 | 100 |
13 | 99.47 | 98.90 | 100 |
14 | 99.56 | 100 | 100 |
15 | 99.70 | 96.60 | 100 |
16 | 1.00 | 92.68 | 98.25 |
OA (%) | 99.04 ± 0.11 | 98.05 ± 0.27 | 99.76 ± 0.03 |
AA (%) | 97.09 ± 1.26 | 96.22 ± 0.70 | 99.71 ± 0.05 |
Dataset # Samples | PU | IP | ||||||
---|---|---|---|---|---|---|---|---|
50 | 100 | 150 | 200 | 50 | 100 | 150 | 200 | |
CNN | 86.39 | 88.5 | 90.89 | 91.41 | 80.43 | 84.32 | 85.30 | 86.81 |
CNN-PPF | 88.14 | 93.35 | 95.5 | 96.48 | 88.34 | 91.72 | 93.14 | 93.90 |
CDCNN | 92.19 | 93.55 | 95.5 | 96.73 | 84.43 | 88.27 | 92.25 | 94.24 |
DRCNN | 96.91 | 98.67 | 99.21 | 99.56 | 88.74 | 94.94 | 97.49 | 98.54 |
HSI-BERT | 97.43 | 98.78 | 99.38 | 99.75 | 91.31 | 96.86 | 98.03 | 99.56 |
D2BERT | 98.58 | 99.35 | 99.73 | 99.79 | 93.09 | 98.26 | 99.14 | 99.76 |
Dataset Methods | Pavia University | Indian Pines | ||
---|---|---|---|---|
OA% | AA% | OA% | AA% | |
CNN | 91.41 | 81.03 | 86.81 | 63.30 |
CNN-PPF | 96.48 | 97.03 | 93.60 | 96.38 |
CDCNN | 96.73 | 95.77 | 94.24 | 95.75 |
DRCNN | 99.56 | 98.22 | 98.54 | 99.29 |
Spa-Spe-TR | 93.72 | 91.00 | 89.13 | 75.23 |
SSRN | 91.72 | 87.56 | 83.21 | 68.88 |
HybridSN | 92.18 | 85.16 | 83.77 | 63.18 |
SST | 92.50 | 85.16 | 88.51 | 66.64 |
HFFSNet | 98.27 | 97.20 | 86.21 | 83.53 |
GSPFormer | 99.56 | 99.25 | 96.29 | 92.60 |
HSI-BERT | 99.75 | 99.86 | 99.56 | 99.72 |
D2BERT | 99.79 | 99.68 | 99.76 | 99.71 |
Training Time (Hours) | |||||
---|---|---|---|---|---|
Pavia University | Indian Pines | # Parameters | |||
Methods | Train (H) | Test (S) | Train (H) | Test (S) | in (M) |
CNN | 0.31 | 0.37 | 0.39 | 0.21 | 0.13 |
CNN-PPF | 1.00 | 16.92 | 6.00 | 4.76 | 0.05 |
CDCNN | 0.13 | 12.35 | 0.14 | 11.21 | 1.12 |
DRCNN | 0.43 | 105 | 0.74 | 39 | 0.05 |
Spa-Spe-TR | 0.16 | 49.2 | 0.14 | 19.80 | 27.65 |
SSRN | 1.28 | 0.34 | 2.21 | 0.06 | 0.23 |
HybridSN | 0.02 | 20.4 | 0.03 | 3.6 | 14.85 |
SST | 16.69 | 0.78 | 21.43 | 0.19 | 29 |
HFFSNet | 0.02 | 2.51 | 0.02 | 3.45 | 32.74 |
GSPFormer | 0.47 | 53 | 0.18 | 12 | 0.68 |
HSI-BERT | 0.07 | 9.28 | 0.12 | 3.52 | 1.21 |
D2BERT | 0.19 | 16.41 | 0.26 | 9.11 | 2.45 |
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. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Ashraf, M.; Zhou, X.; Vivone, G.; Chen, L.; Chen, R.; Majdard, R.S. Spatial-Spectral BERT for Hyperspectral Image Classification. Remote Sens. 2024, 16, 539. https://doi.org/10.3390/rs16030539
Ashraf M, Zhou X, Vivone G, Chen L, Chen R, Majdard RS. Spatial-Spectral BERT for Hyperspectral Image Classification. Remote Sensing. 2024; 16(3):539. https://doi.org/10.3390/rs16030539
Chicago/Turabian StyleAshraf, Mahmood, Xichuan Zhou, Gemine Vivone, Lihui Chen, Rong Chen, and Reza Seifi Majdard. 2024. "Spatial-Spectral BERT for Hyperspectral Image Classification" Remote Sensing 16, no. 3: 539. https://doi.org/10.3390/rs16030539
APA StyleAshraf, M., Zhou, X., Vivone, G., Chen, L., Chen, R., & Majdard, R. S. (2024). Spatial-Spectral BERT for Hyperspectral Image Classification. Remote Sensing, 16(3), 539. https://doi.org/10.3390/rs16030539