Accepted in GRSL Article DOI: 10.1109/LGRS.2021.3052346. This repository implementates 7 frameworks for hyperspectral image classification based on Keras and PyTorch.
Some of our code references the projects
- Spectral-spatial residualnetwork for hyperspectral image classification: A 3-D deep learning framework
- A Fast Dense Spectral-Spatial Convolution Network Framework for Hyperspectral Images Classification
CUDA = 9.0
python>=3.5
PyTorch >= 1.3.1
sklearn >= 0.20.4
tensorflow-gpu = 1.8.0
keras>=2.2.0
numpy>=1.16.0
You can download the hyperspectral datasets in mat format at: http://www.ehu.eus/ccwintco/index.php/Hyperspectral_Remote_Sensing_Scenes, and move the files to ./datasets
folder.
Dataset download: Link: https://pan.baidu.com/s/1bSWcqwIDDCl4bSbLBWrFtQ Extract code: 906N
Take KSC dataset as an example:
- Download the required dataset and add the corresponding path in the file
./KSC_data.py
- Taking the MAFN framework as an example, run
./KSC_data.py
.
- Two-CNN
- BAM-CM
- SSAN
- SSRN
- DFFN
- DBDA
- [MAFN] Fig1. The structure of the MAFN network. MAFN consists of three main components: spectral feature extraction, spatial feature extraction and joint spectral-spatial feature extraction. MAFN employs Band Attention Module (BAM) and Spatial Attention Module (SAM) respectively to alleviate the influence of redundant bands and interfering pixels. MAFN realizes feature reuse and obtains complementary information from different levels by combining multi-attention and multi-level fusion mechanisms, which can extract more representative features.