Skip to content

Unsupervised Spatial-Spectral Feature Learning by 3-Dimensional Convolutional Autoencoder for Hyperspectral Classification

Notifications You must be signed in to change notification settings

MeiShaohui/3DCAE-hyperspectral-classification

Repository files navigation

Unsupervised Spatial-Spectral Feature Learning by 3-Dimensional Convolutional Autoencoder for Hyperspectral Classification

By Shaohui Mei, Jingyu Ji, Yunhao Geng, Zhi Zhang, Xu Li, Qian Du.

Proposed Framework
Proposed Framework


Introduction

Feature learning technologies using deep neural networks (DNN) have shown superior performance over traditional hand-crafted feature extraction algorithms. However, a large amount of training samples are generally required for DNN to learn effective features, which is difficult to be obtained in hyperspectral images. Therefore, in this paper, an unsupervised spatial-spectral feature learning strategy is proposed for hyperpectral images using 3-Dimensional Convolutional AutoEncoder (3D-CAE). The proposed 3D-CAE consists of 3D or elementwise operations only, such as 3D convolution, 3D pooling, and 3D batch normalization, to maximally explore spatial-spectral structure information for feature extraction. A companion 3D convolutional Decoder network is also designed for reconstruction the input patterns, by which all the parameters involved in the network can be trained without labeled training samples. Experimental results on several benchmark hyperspectral datasets have demonstrated that our proposed 3D-CAE are very effective in extracting spatial-spectral features and outperform not only traditional unsupervised feature extraction algorithms, but also many supervised feature extraction algorithms in classification application.


Citing our work

Please cite our work in your publications if it helps your research:

later it will be released.

Installation

  1. Please follow keras instruction to install all necessary packages and build it.
pip install keras
 - Note: We currently only support Python 3.
  1. Install other python packages.
pip install h5py sklearn

Preprocess

In our paper, amount of spatial information about hyperspectral image was explored. In our code, 5x5 spatial size was used to compare.

run script as follow :

cd preprocess
python3 ./preprocess/pre_process_by_yield.py

Then you can find the file named "./hyperspectral_datas/indian_pines/data/indian_5d_patch_5.h5".


Traineval

  • To train or evaluate CNN using the train script simply specify the parameters listed in train.py as a flag or manually change them.
python train.py
  • Training Parameter Options:
parser = argparse.ArgumentParser(description="train 3DCAE net",
                                formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument('--mode', type=str, default='train',
                    help='train, test.')
parser.add_argument('--epoch', type=int, default=200,
                    help='1000 is ok')
args = parser.parse_args()

About

Unsupervised Spatial-Spectral Feature Learning by 3-Dimensional Convolutional Autoencoder for Hyperspectral Classification

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages