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.
Hyperspectral data from [2] was used to test the network. The image below shows the classification results after the specified number of training iterations.
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.
[to be written]
[to be written]
- Wei Hu et al. Deep convolutional neural networks for hyperspectral
image classification.
J. Sensors 2015, article ID 258619 (2015). - Hyperspectral remote sensing scenes.
This code is distributed under GNU General Public License v3.0.