Code Monkey home page Code Monkey logo

dcn-t's Introduction

DCN-T: Dual Context Network with Transformer for Hyperspectral Image Classification (TIP 2023)

Di Wang, Jing Zhang, Bo Du, Liangpei Zhang and Dacheng Tao

Pytorch implementation of our paper for ImageNet Pretraining and Transformer-based image-level hyperspectral image classification.


Fig.1 - The proposed DCN-T.

Fig.2 - The DCM.

Usage

  1. Install Pytorch 1.9 with Python 3.8.
  2. Clone this repo.
git clone https://github.com/DotWang/DCN-T.git
  1. Prepare the tri-spectral dataset with the notebook
  2. Download ImageNet pretrained model
  3. For implementing the clusttering, install the SSN
cd utils/gensp/src
python setup.py install

Or you can taste the pytorch version realized in the network_local_global.py

  1. Training and Testing

For example, training on the WHU-Hi-LongKou scene with soft voting

CUDA_VISIBLE_DEVICES=0 python -m torch.distributed.launch --nproc_per_node=1 --nnodes 1 \
    --node_rank=0 --master_port=1901 --use_env train_memory.py \
    --dataset 'WHUHi_LongKou_15_100' \
    --backbone 'vgg16' \
    --epochs 30 --lr 1e-3 --groups 128 --eval_interval 1 \
    --batch_size 4 --test_batch_size 1 --workers 2 \
    --ra_head_num 4 --ga_head_num 4 --mode 'soft'
CUDA_VISIBLE_DEVICES=0 python test_gpu.py \
    --dataset 'WHUHi_LongKou_15_100' \
    --backbone 'vgg16' --ra_head_num 4 --ga_head_num 4 \
    --scales 1  --groups 128 \
    --model_path './run/WHUHi_LongKou_15_100/vgg16_128/experiment_0/model_last.pth.tar' \
    --save_folder './run/WHUHi_LongKou_15_100/vgg16_128/experiment_0/'

Citation

@ARTICLE{wang_2023_dcnt,
  author={Wang, Di and Zhang, Jing and Du, Bo and Zhang, Liangpei and Tao, Dacheng},
  journal={IEEE Transactions on Image Processing}, 
  title={DCN-T: Dual Context Network With Transformer for Hyperspectral Image Classification}, 
  year={2023},
  volume={32},
  number={},
  pages={2536-2551},
  doi={10.1109/TIP.2023.3270104}}

Thanks

SSN-PytorchSpixelFCNBIT

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] Image-level/Patch-free Hyperspectral Image Classification
    Fully Contextual Network for Hyperspectral Scene Parsing, IEEE TGRS, 2021 | Paper | Github
    Di Wang, Bo Du, and Liangpei Zhang

[3] 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

[4] 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

dcn-t's People

Contributors

dotwang avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.