Giter Club home page Giter Club logo

cnn-based-hyperspectral-image-classification's Introduction

CNN-Based Hyperspectral image classification

Description

This is a TensorFlow implementation of fixed size kernels network described in this paper.

Figure 1. Hyperspectral image cube


Figure 2. Our fixed size kernel network

General Guidance

Setup

  1. Python3.5+
  2. TensorFlow 1.10
  3. Dependencies listed in requirement.txt
  4. (Optional) CUDA v9.0 and cuDNN v7.0

We recommend you to create a Python Virtual environment and issue the following command in your command prompt/terminal to install dependencies.

pip install -r requirement.txt

Acquire the data and train the model

Hyperspectral dataset

Several hyperspectral datasets are available on the UPV/EHU wiki. The default dataset folder is data.

In our paper, we have used the following dataset

  • Indian Pines
  • Salinas
  • Kennedy Space Centre
  • Botswana
CPU configuration

If you choose to run the run the model on CPU, you can run this script to download and preprocess the dataset.

python preprocess.py --data Indian_pines --train_ratio 0.15 --validation_ratio 0.05
  • --data to select which dataset to process (e.g. 'Indian_pines','Salinas', 'KSC', 'Botswana'')
  • --train_ratio to configure the percentage of samples use in training.
  • --validation_ratio to configure the percentage of samples use in validation.

To train the model, run this script

python network.py --data Indian_pines --epochs 650
  • --data to select which dataset to train
  • --epochs to specify number of iterations in training
GPU Configuration

If you have CUDA or GPU configurations which TensorFlow supports. The convergence of training can be accelerated. However, the optimization requires different arrangement.

To reconfigure the dataset, set the --channel_first tag to True

Example:

python preprocess.py --channel_first True --data Indian_pines --train_ratio 0.15 --validation_ratio 0.05

and run the special script for GPU

python network_GPU.py --data Indian_pines --epochs 650

If you enjoyed our paper, you could cite it via this bibtex โค


@inproceedings{arc19liu,
  author    = {Shuanglong Liu and Ringo S.W. Chu and Xiwen Wang and Wayne Luk},
  title     = {Optimizing CNN-based Hyperspectral ImageClassification on FPGAs},
  booktitle = {{ARC}},
  year      = {2019}
}

cnn-based-hyperspectral-image-classification's People

Contributors

ringochuchudull avatar

Watchers

James Cloos avatar Wenchao QI 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.