An implementation of HSI Classification using GANs There are two kinds of GAN implemented, 1D GAN uses only spectral features, and 3D GAN uses both spatial and spectral features. To run the code locally, install the required dependencies (Keras, scikit-learn, patchify, numpy, pandas),
python3 1dgan_train.py
python3 1dgan_test.py
python3 3dgan_train.py
python3 3dgan_test.py
The code uses the pretrained models to predict by default, you should be able to change the model used in the test script.
- Download and import the ipynb file in Colab
- Add the indianpines-hyperspectral.zip dataset zip file to the drive root.
- Also, add the pretrained models to
models/
folder in your drive.