Giter Club home page Giter Club logo

dcfsl-2021's Introduction

Deep Cross-domain Few-shot Learning for Hyperspectral Image Classification

This is a code demo for the paper "Deep Cross-domain Few-shot Learning for Hyperspectral Image Classification"

Some of our code references the projects

Requirements

CUDA = 10.0

Python = 3.7

Pytorch = 1.5

sklearn = 0.23.2

numpy = 1.19.2

dataset

  1. target domain data set:

You can download the hyperspectral datasets in mat format at: http://www.ehu.eus/ccwintco/index.php/Hyperspectral_Remote_Sensing_Scenes, and move the files to ./datasets folder.

  1. source domain data set:

The source domain hyperspectral datasets (Chikusei) in mat format is available in:http://park.itc.utokyo.ac.jp/sal/hyperdata. You can download the preprocessed source domain data set (Chikusei_imdb_128.pickle) directly in pickle format, which is available in "link:https://pan.baidu.com/s/1JrCWJLmPFccfOrSh3P5QEA password:rnjv " , and move the files to ./datasets folder.

An example dataset folder has the following structure:

datasets
├── Chikusei_imdb_128.pickle
├── IP
│   ├── indian_pines_corrected.mat
│   ├── indian_pines_gt.mat
├── salinas
│   ├── salinas_corrected.mat
│   └── salinas_gt.mat
├── pavia
│   ├── pavia.mat
│   └── pavia_gt.mat
└── paviaU
    ├── paviaU_gt.mat
    └── paviaU.mat

Usage:

Take DCFSL method on the UP dataset as an example:

  1. Download the required data set and move to folder./datasets.
  2. If you down the source domain data set (Chikusei) in mat format,you need to run the script Chikusei_imdb_128.py to generate preprocessed source domain data.
  3. Taking 5 labeled samples per class as an example, run DAFSC-UP.py --test_lsample_num_per_class 5 --tar_input_dim 103.
  • --test_lsample_num_per_class denotes the number of labeled samples per class for the target domain data set.
  • --tar_input_dim denotes the number of bands for the target domain data set.

dcfsl-2021's People

Contributors

li-zk avatar

Watchers

 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.