Source Code


A Landsat 8 Neural Network Lava Classifier


Glen E Gardner Jr.


The information provided here is presented in the hope that others may find it interesting and useful. While great care has been taken to assure correctness, completeness, and accuracy, the provided information is presented as experimental with no guarantee of suitability for any purpose.


A very special thank you goes to NASA's Direct Readout Laboratory for their support. Without their help, this project would not have been possible.

What is this?

The software described here is a simple package of scripts and programs for Linux/Unix operating systems, which can be used to identify volcanic lava in Landsat 8 data sets. The software can also be used to create large, 256 M pixel (Yes, MEGA pixel) color browse images from the data.

This software is released under the GNU Public License

How do I get the Software?

You can download it HERE.

Where do I get the Landsat 8 data sets?

You need to get the data from the US Geological Survey. You probably want to get an account on their EarthExplorer site (it is free). The data that you need is Landsat 8 collection 1, level 1 TIRS/OLI data in tar.gz GEOTIFF format.

How do I install it ?

To install the software, create a directory where you wish to install the software. Then place the file "nn_classifier_04_28_2018.tar.gz" in that directory and extract the contents using the following command: tar -xzf nn_classifier_04_28_2018.tar.gz

The top level directory is "landsat". Change to that directory and complete the steps outlined in README.TXT there. Note that you will be directed to complete steps in other directories in a sequential fashion. Just follow the instructions and everything simply works.


The neural network classifier is a pixel-by-pixel multispectral classifier intended to be used for identifying lava emissions.

This classifier uses nine of the 11 data bands provided in the Landsat 8 L1 OLI/TIRS GEOTIFF data products offered by the USGS.

The neural network was trained on selected Landsat 8 data containing clear examples of basaltic lava emissions. The neural network is a feed forward type, with a hidden layer, and alternating feed forward/back propagation applied iteratively during training. Supervised training was employed. Training proved to be a lengthy cut-and-try process that took place over several months. A trained set of weights that exhibited consistent behavior, good sensitivity, and high accuracy across many Landsat 8 scenes was eventually developed.

Two, two-year collections for specific scenes were evaluated as a test of the capabilities of the neural network. One study was a scene in Guatemala having three more-or-less continuously active volcanoes, and another for the large lava lakes at the large Shield Volcano, Erta Ale in Ethiopia. Scenes were examined for fire detection as well as lava emissions.

A summary of the study of a scene in Guatemala is viewable online at:

Additionally, many scenes of various active volcanos were classified, with good results.

In all, the behavior of the neural network was predictable, consistent, and accurate across time, and across varying locations and conditions.

While the neural network was trained on basaltic lava emissions, it also does a decent job of detecting fires. This is unavoidable because fire and molten lava are overlapping statistical classes within the data set used.

The software was written in the C programming language, and a high degree of parallelism was achieved using asynchronous posix threads.

Exotic, platform-specific, proprietary and third party programming libraries were avoided in order to arrive at a reasonably portable solution.

The intent was to produce a neural network based lava detection program which could be run on a large variety of computers having relatively modest resources as compared to the "Big Iron" machines often used for remote sensing processing tasks. With this in mind, performance was a big factor in many of the choices made during the development of the neural network software.

The degree of parallelism in the software was made to be adjustable so that performance could be tuned for the hardware in use. As the software is now, it is tuned to provide good performance on the NVIDIA TX2, and the INTEL NUC. Tests on multiple core opteron machines showed that a different tuning would be closer to optimal for "Big Iron".