Code Monkey home page Code Monkey logo

hfsl's Introduction

Heterogeneous Few-shot Learning for Hyperspectral Image Classification

This is a code demo for the paper "Heterogeneous Few-shot Learning for Hyperspectral Image Classification" Yan Wang, Ming Liu, Zhaokui Li, Qian Du, Yushi Chen, Fei Li, and Haibo Yang, Heterogeneous Few-shot Learning for Hyperspectral Image Classification, IEEE Geoscience and Remote Sensing Letters, in press.

Requirements

CUDA = 10.2 Python = 3.7 Pytorch = 1.5 sklearn = 0.24.0 numpy = 1.19.2

dataset

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. You can also download the hyperspectral datasets from the following link. Link: https://pan.baidu.com/s/1k8by5CiyabXRJdD_MVOL1w Extract code: wjvv

The mini-ImageNet data sets can be downloaded from the following link: Link: https://pan.baidu.com/s/1Mn1en9EhfFvE-i62YnbwhQ Extract code: 54DO

An example dataset folder has the following structure:

datasets
├── IP
│   ├── indian_pines_corrected.mat
│   ├── indian_pines_gt.mat
└── paviaU
│   ├── paviaU_gt.mat
│   ├── paviaU.mat
└──Houston
│   ├── mask_train.mat
│   ├── mask_train.mat
│   ├── data.mat
└──miniImagenet
│   ├── 
│   ├── 

## Usage:
Take HFSL method on the PU dataset as an example: 
1. Download the required data set and move to folder`./datasets`.
2. To run the file, you need to download the VGG pre-training weights file (vgg16_bn-6c64b313.pth).
   The VGG pre-training weight file can be downloadfrom the following link:
   Link: https://pan.baidu.com/s/1af--So40MKjhWdFuIcVyKg 
   Extract code:0tdu
3. Taking 5 labeled samples per class as an example, run `mini2hsi-SS-5-PU.py --nlabel 5 `. 

 * `--nlabel` denotes the number of labeled samples per class for the HSI data set.

hfsl's People

Contributors

li-zk 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.