This is a code sample for the paper "Deep Metric Learning-Based Feature Embedding for Hyperspectral Image Classification"
Python 2.x/3.x
Pytorch 0.4.1
GPU
Please set your parameters in train.py or test.py before runing them.
Training, run: python train.py
Test, run: python test.py
The datasets is available in http://www.ehu.eus/ccwintco/index.php?title=Hyperspectral_Remote_Sensing_Scenes
The saving trainTestSplit and checkpoints of our experiments can be download in https://pan.baidu.com/s/1cXrVnLf662wtCW6xX3LWhg
This is the code for the same-scene HSI classification; The code for cross-scene HSI classification is in https://github.com/szubing/ED-DMM-UDA