MDL4OW Few-shot Hyperspectral Image Classification With Unknown Classes Using Multitask Deep Learning.

Open-Set Hyperspectral Image Classification.

Source code and annotations for:

Shengjie Liu, Qian Shi, and Liangpei Zhang. Few-shot Hyperspectral Image Classification With Unknown Classes Using Multitask Deep Learning. IEEE TGRS, 2020. doi:10.1109/TGRS.2020.3018879

Contact: skrisliu AT gmail.com

Code and annotations are released here, or check out https://github.com/skrisliu/MDL4OW


Overview

Ordinary: misclassify road, house, helicopter, and truck

Below is a normal/closed classification. If you are familiar with hyperspectral data, you will notice some of the materials are not represented in the training samples. For example, for the upper image (Salinas Valley), the road and the houses between farmlands cannot be classified into any of the known classes. But still, a deep learning model has to assign one of the labels, because it is never taught to identify an unknown instance.

ordinary classification

What we do: mask out the unknown in black

What we do here is, by using multitask deep learning, empowering the deep learning model with the ability to identify the unknown: those masked with black color.
For the upper image (Salinas Valley), the roads and houses between farmlands are successfully identified.
For the lower image (University of Pavia Campus), helicopters and trucks are successfully identified.

MDL4OW result


Key packages

    tensorflow-gpu==1.9
    keras==2.1.6
    libmr
    

Tested on Python 3.6, Windows 10

Recommend Anaconda, Spyder


How to use

Hyperspectral satellite images

The input image is with size of imx*imy*channel.

The satellite images are standard data, downloaded here: http://www.ehu.eus/ccwintco/index.php/Hyperspectral_Remote_Sensing_Scenes

The above data is in matlab format, the numpy format can be found here (recommended):
https://drive.google.com/file/d/1cEpTuP-trfRuphKWqKHjAaJhek5sqI3C/view?usp=sharing

Quick usage

python demo_salinas.py

Arguments

Command-line Arguments:


Evaluation code updated on 18 May 2021

When using the evaluation code "z20210518a_readoa.py", you should change the parameter "mode" for different settings. The inputs are output files from the training script.

Mode

Mode Selection: