By Shaohui Mei, Jingyu Ji, Yunhao Geng, Zhi Zhang, Xu Li, Qian Du.
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.
Please cite our work in your publications if it helps your research:
later it will be released.
pip install keras
- Note: We currently only support Python 3.
pip install h5py sklearn
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".
train.py
as a flag or manually change them.python train.py
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()