/TrmGLU-Net

TrmNLU-Net: Transformer-augmented Non-local U-Net for Hyperspectral Image Classification with Limited Training Samples

Primary LanguagePython

TrmGLU-Net

TrmGLU-Net: Transformer-augmented Global-local U-Net for Hyperspectral Image Classification with Limited Training Samples If the code is helpful to you, please give a star or fork and cite the paper. Thanks!

Requirements

torch>=1.6.0 math numpy OS scipy sklearn time datetime functools einops

Usage

We provide a full data demo of the Pavia University hyperspectral data by run the file of PU_train_TrmGLU-Net_analysis.py. In the file of PU_train_TrmGLU-Net_analysis.py, the PCA demo of other data is also involved. If you want to run the code in your own data, you can accordingly change the input and tune the parameters. Please refer to the paper for more details.

License

Copyright (C) 2022 Yifan Sun

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3 of the License.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program.