Using Tensorflow in the Google Earth Engine
I’m starting a series on the Tensorflow intergration with Google Earth Engine for land cover classification purposes.
The integration enables the incorporation of spectral & spatial features into a regular deep learning classification schemes.
The methodology is very similar to more traditional machine learning algorithms such as Random Forest. The image below shows a schematic overview of how machine learning and AI is generally done
Inputs are 1. satellite imagery and 2. Reference data.
The earth engine is very powerful in respect to satellite imagery processing as all data is stored and processed in the cloud. It is recommended to add a large number of variables or covariates to the model. Examples are conventional indices like NDVI and EVI. But also layers on distance to coast, distance to road etc can be included.
Reference data on land cover type can be obtained from the field but can also be acquired using high resolution satellite imagery from tools such as collect.earth.
A table with training data is generated by sampling the satellite imagery. A training table can be as simple as the one below with information on the features in the rows and information on the colors and other covariates in the columns. It is important to have one class with information on the land cover class.
The training data is then used to train a neural network. There is a variety of approaches which we will test in the next weeks. The trained neural network is then used for inference to create the land cover map.
Building neural networks using the Google Earth Engine is more complicated than running machine learning algorithms. The workflow is shown in the image below.
Sampling is done in the earth engine. The output is stored as TF records in the google gloud.
A python script using the tensorflow library can read the tfrecords and use them to build the model. When the model is finished, we push it to the cloud and make it readable for the the earth engine. This model can then be imported to the earth engine and used for inference.
more will come.