Skip to content

[TGRS 2021] The official repo for the paper "Fully Contextual Network for Hyperspectral Scene Parsing".

Notifications You must be signed in to change notification settings

DotWang/FullyContNet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fully Contextual Network for Hyperspectral Scene Parsing (TGRS 2021)

Di Wang, Bo Du, and Liangpei Zhang

Update 2023.04: FullyContNet won the Highly Cited Paper.

Pytorch implementation of our paper for image-level hyperspectral image classification.

Fig.1 - The proposed FullyContNet.

Fig.2 - The FCMs.

Fig.3 - Different schemes of the FCM.

Usage

  1. Install Pytorch 1.x (>1.0) with Python 3.5.
  2. Clone this repo.
git clone https://github.com/DotWang/FullyContNet.git
  1. Training, evaluation and prediction with trainval.py :

For example, if the users use Pyramid-FCM with P-C-S scheme and training on Indian Pines dataset

CUDA_VISIBLE_DEVICES=0 python -u trainval.py \
    --dataset 'indian' --network 'FContNet' \
    --norm 'std' \
    --input_mode 'whole' \
    --experiment-num 1 --lr 1e-2 \
    --epochs 1000 --batch-size 1 \
    --val-batch-size 1 \
    --head 'psp' --mode 'p_c_s' \
    --use_apex 'True'

Then the evalution accuracies, the trained models and the classification map are separately saved.

Note

  • Supporting fine-tune, where the users should specify the path of resume.
  • Supporting mixed-precision training with the help of APEX. However, if you use Salinas dataset, please set use_apex=False, or it will cause the error.
  • In our experiments, we directly adopt the whole image and training on the 16G NVIDIA Tesla V100 GPU. However, it is difficulty on the GPU that with smaller memory, especially for the Houston dataset. Thus, the sliding window training using partial image is also realized in the codes, where the users can freely configure the size of input patches and overlapping areas. However, the accuracies may be affected.

Paper and Citation

If this repo is useful for your research, please cite our paper.

@ARTICLE{2021FullyContNet,
  author={Wang, Di and Du, Bo and Zhang, Liangpei},
  journal={IEEE Transactions on Geoscience and Remote Sensing}, 
  title={Fully Contextual Network for Hyperspectral Scene Parsing}, 
  year={2022},
  volume={60},
  number={},
  pages={1-16},
  doi={10.1109/TGRS.2021.3050491}}

Thanks

PSPNetDeeplabDANetCCNetCCNet-Pure-PytorchOCNet

Relevant Projects

[1] Pixel and Patch-level Hyperspectral Image Classification
    Adaptive Spectral–Spatial Multiscale Contextual Feature Extraction for Hyperspectral Image Classification, IEEE TGRS, 2020 | Paper | Github
    Di Wang, Bo Du, Liangpei Zhang and Yonghao Xu

[2] Graph Convolution based Hyperspectral Image Classification
    Spectral-Spatial Global Graph Reasoning for Hyperspectral Image Classification, IEEE TNNLS, 2023 | Paper | Github
    Di Wang, Bo Du, and Liangpei Zhang

[3] Neural Architecture Search for Hyperspectral Image Classification
    HKNAS: Classification of Hyperspectral Imagery Based on Hyper Kernel Neural Architecture Search, IEEE TNNLS, 2023 | Paper | Github
    Di Wang, Bo Du, Liangpei Zhang, and Dacheng Tao

[4] ImageNet Pretraining and Transformer based Hyperspectral Image Classification
    DCN-T: Dual Context Network with Transformer for Hyperspectral Image Classification, IEEE TIP, 2023 | Paper | Github
    Di Wang, Jing Zhang, Bo Du, Liangpei Zhang, and Dacheng Tao

Releases

No releases published

Packages

No packages published

Languages