This is a code demo for the paper "Y. Zhu, K. Yuan, W. Zhong and L. Xu, "Spatial-Spectral ConvNeXt for Hyperspectral Image Classification," in IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing, doi: 10.1109/JSTARS.2023.3282975.". More specifically, it is detailed as follow.
python = 3.9
pytorch = 1.10.2
cuda = 11.3
Indian Pine and pavia university can be downloded at https://www.ehu.eus/ccwintco/index.php/Hyperspectral_Remote_Sensing_Scenes
WHU-Hi-HanChuan and WHU-Hi-HongHu can be downloded at http://rsidea.whu.edu.cn/resource_WHUHi_sharing.htm
You should put the HSI data and the corresponding target under the directory "./HSIdata"
An example dataset folder has the following structure:
HSI_data
└───IN
│ │——Indian_pines_corrected.mat
│ │——Indian_pines_gt.mat
└───PU
| │——PaviaU.mat
| │——PaviaU_gt.mat
└───WHHC
| │——WHU_Hi_HanChuan.mat
| │——WHU_Hi_HanChuan_gt.mat
└───WHHH
| │——WHU_Hi_HongHu.mat
| │——WHU_Hi_HongHu_gt.mat
Take SS-ConvNeXt method on the IN dataset as an example:
- Download the required data set and move to folder ./HSIdata.
- Modify the file config.josn. If you choose In dataset, you should set patch size = 9, batch size = 16.
- create training, validation and test mask. Modify the corresponding paramater in the config.josn(i.e. mask_para)
- run main.py
- the result will be saved under the directory ./Indian pines_result_Fixed


