Skip to content
/ cnn_hsi Public

Convolutional neural network for hyperspectral images classification

License

Notifications You must be signed in to change notification settings

eugnsp/cnn_hsi

Repository files navigation

Convolutional neural network for hyperspectral images classification

Synopsis

This is a simple deep convolutional neural network for hyperspectral images classification. Main aim was to understand how such networks are implemented, so third-party DNN libraries are not used in the code.

The network consists of 4 layers [1]:

  • Convolutional layer (tanh, ~10 filters, kernel size ~20)
  • Pooling layer (max, pooling size ~5)
  • Fully connected layer (tanh, ~100 nodes)
  • Output layer (softmax, ~10 nodes)

The total number of trainable parameters is ~35,000. The gradient descent method with rate ~.1 is used for learning.

The standard thread support library is used to parallelize the code.

Results

Hyperspectral data from [2] was used to test the network. The image below shows the classification results after the specified number of training iterations.

Classification

(Large image)

Loss function

How to build

Set MKLROOT environment variable to point to the MKL installation directory, and be sure that your CMake version is >= 3.13. Then:

git clone --recursive https://github.com/eugnsp/cnn_hsi.git
cd cnn_hsi
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=RELEASE .. && make

C++17 compiler is required. Tested with GCC 8.3.0.

How to run

[to be written]

To do

[to be written]

External dependencies

References

  1. Wei Hu et al. Deep convolutional neural networks for hyperspectral image classification.
    J. Sensors 2015, article ID 258619 (2015).
  2. Hyperspectral remote sensing scenes.

License

This code is distributed under GNU General Public License v3.0.