Using artificial intelligence for satellite image classification

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

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.


  1. That’s very interesting. In this way you can apply your model in your area in each image you want because the training phase is done only once, is it right? Does it become more accurate every time you run it (I mean Do it learn?) or is more “static”?


  2. Congratulations very good your article, I follow your blog at a time, interactive material and easy to understand.


  3. I’m a new member to following your works and I’m interested in *exactly* what you’ve been researching.
    Do you have source code for these CNN, random forest, and other AI/ML workflows that we could access to learn from?


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s