Giter VIP home page Giter VIP logo

dstc's Introduction

Dual-stage Hyperspectral Image Classification Model with Spectral Supertoken [ECCV 2024]

by Peifu Liu, Tingfa Xu, Jie Wang, Huan Chen, Huiyan Bai, and Jianan Li.

arXiv Google Drive

Requirements

In this repository, we provide a requirements.txt file that lists all the dependencies. Additionally, the installation .whl file for GDAL can be found at Google Drive and can be installed directly using pip:

pip install -r requirements.txt
pip install GDAL-3.4.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl

Getting Started

Preparation

Please download WHU-OHS dataset in data, which should be organized as follows:

|--data
    |--tr
        |--image
            |--O1_0001.tif
            |--O1_0002.tif
            |--...
        |--label
            |--O1_0001.tif
            |--O1_0002.tif
            |--...
    |--ts
        |--image
            |--O1_0003.tif
            |--O1_0004.tif
            |--...
        |--label
            |--O1_0003.tif
            |--O1_0004.tif
            |--...
    |--val
        |--image
            |--O1_0015.tif
            |--O1_0042.tif
            |--...
        |--label
            |--O1_0015.tif
            |--O1_0042.tif
            |--...

Our DSTC utilizes pre-trained weights. The pre-trained weights for ResNet and Swin will be downloaded automatically, while those for PVT can be downloaded from Google Drive. Please place them in the /models/pre-trained folder.

Testing

If you wish to validate our method, our pre-trained weights are available on Google Drive. Please download them to the /models/checkpoints folder. Then run:

sh test.sh

Training

To train our model, execute the train_and_test.sh script. Model checkpoints will be stored in the DataStorage/ directory. After training, the script will proceed to test the model and save the visualization results.

sh train_and_test.sh

Acknowledgement

We refer to the following repositories:

Thanks for their great work!

License

This project is licensed under the LICENSE.md.

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.