3D-RCNet:Learning from Transformer to Build a 3D Relational ConvNet for Hyperspectral Image Classification
Haizhao Jing, Liuwei Wan, Xizhe Xue, Haokui Zhang, Ying Li,
Fig1. The 3D-RCNet framework proposed by us, and the framework uses four stages of blocks for feature extraction at different depths on HSI data
**Fig2. Comparison of the three methods, the total MACs required by each method with the same input. (a) is 3D-ConvBlock,(b) is Self-attention, and (c) is our proposed 3D-RCBlock. **
./ # current (project) directory
│
├── assets # figures and tables
│
├── data/ # Files to be processed in the dataset
│ └── HSI_datasets/
│ ├── data_h5/
│ └── samples/
├── data_preprocess/
│ ├── data_list/ # The preprocessed data is placed in the data_list folder.
├──Indian_pines_split.txt
│ ├── functions_for_samples_extraction.py
│ ├── mat_2_h5.py # Dataset format conversion
│ └── preprocess.py # Preprocessing the dataset
└── training/
├── models/
├── functions_for_evaluating.py
├── functions_for_training.py
├── get_cls_map.py # Generating pseudocolored synthesized images
└── main_cv_paper.py
🔥🔥🔥Note: The Indian_pines.txt
, Indian_pines_test.txt
, and Indian_pines_train.txt
files generated in the data_list
directory are created by executing mat_2_h5.py
and preprocessing.py
in sequence.🔥🔥🔥
The data
folder contains the datasets to be processed
data_preprocess
folder:
The data_list
folder contains preprocessed data.
mat_2_h5.py
: Dataset format conversionpreprocess.py
: Data preprocessingfunctions_for_samples_extraction.py
training
folder:
The models
folder contains our proposed 3D-RCNet.
get_cls_map.py
: Generate pseudo-color composite imagesmain_cv_paper.py
: Training script- functions_for_training.py
- functions_for_evaluating.py
python: 3.11
NOTE: Latest PyTorch requires Python 3.8 or later.