Parameter Optimization of a Learning Model for Hyperspectral Image Classification

By Srajan Shetty, Information Technology, VESIT


Hyperspectral Image classification

The hyperspectral image can be defined as an image that contains over 100–200 color bands that have spatial color information for all the pixels. Hyperspectral imaging is a technique to capture these images. Our project focuses on remote sensing, which scans the Earth’s surface using satellites.

This technique is used to study the land surface for various types of landscapes such as to study tree patterns in forests, which are a rather difficult task to achieve.

These are some of the satellites that are deployed for remote sensing for capturing hyperspectral images from space

Hyperspectral image classification deals with the classification of these images, which have 3 Dimensions, into different categories. We leverage the use of machine learning and deep learning to achieve this feat.


In this, we have used python as our main programming language and the following are the datasets that have been used.


Data preparation

In data preparation, we reduced the dimensionality in data by converting it into 2D from 3D so that it can be fed to the classifiers after preprocessing

Data preprocessing

In data pre-processing, some substeps are carried out which include the following

1. Data standardization: As this data contains values that sometimes range from negative to positive values, we bring it down in the range of 0 to 1.

2. One hot encoding: In except LSTM, one hot encoding has proven to provide better accuracy. One hot encoding is a process by which categorical variables are converted into a form that could be provided to ML algorithms to do a better job in prediction.

Model Building

After data pre-processing, we build the model. For this project, we tried out four different classifiers which are as follows:

  1. Support Vector Machine
  2. Long Short Term Memory
  3. Multi-Level Perceptron Classifier
  4. Convolutional Neural Network

As it became evident to us, Deep learning has many advantages over machine learning in our project, as it was giving better predictions.


We found that the Multi-Level Perceptron Classifier is working most efficiently as it is giving the most accuracy.

Following are the results:

Overall Analysis of the different classifiers before and after optimization

Visualization of the result

Indian Pines

IndianPines is a small dataset thus many machine learning and deep learning models could not perform well in such datasets. Also, while dropping the zero value of ground truth, Indian Pines lost around 48% of the data making it much smaller. MLP Classifier performed better than other classifiers for a small dataset like Indian Pines with an overall accuracy of 88.84%. The classification map of the ground truth before and after optimization of the MLP classifier is shown:

(a) Original Ground Truth (b) Ground Truth before optimizing (c) Ground Truth after optimizing

PaviaC is the largest dataset used in the project. In this dataset, only 0.18 % of the data is lost while dropping the zero-valued ground truth. Since there is enough data for the model to learn all the deep learning, as well as the machine learning model, it is performing well. For this dataset as well, the MLP is outperforming all the other models with an overall accuracy of 99.24%. The classification map of the ground truth before and after the optimization of the MLP classifier is shown:

(a) Original Ground Truth (b) Ground Truth before optimizing (c) Ground Truth after optimizing


Among all the models, the MLP classifier performed the best for all the datasets. In the future, our developed application can be used for hyperspectral image classification as we have provided options for 4 different types of models in it. Our application is not the fastest, so it does take a little bit of time to process results.


Github Link

Hyperspectral Image Classification

Leave a Reply

Your email address will not be published. Required fields are marked *