Sunday, August 18, 2019

Unsupervised remote land use detection of small Caribbean islands: a non-exhaustive exploration with Google Earth Engine

Remote land use detection is a complex problem, regardless if your approach is a type of supervised or unsupervised classification.

The intention of this article is to share my exploration with Google Earth Engine with the aim of educating you in case you are dealing with the same problem and my learnings turn out to be somewhat useful 🙂. For this short exploration, I have limited my scope to the detection of urban and suburban land use, i.e. developed land that is or was in use by humans within the Caribbean geographic region of small islands as defined by the United Nations Department of Economic and Social Affairs.

In the below widget you can preview a subset of small Caribbean islands and visualise results of time series detections of accumulating objects (the red dots) from satellite imagery. These red dots represent for the most part manmade objects. Note however that these do not necessarily represent accumulating land usage changes, but mostly represent objects that already exists and were detected in subsequent passes by that same satellite. Additionally, only a couple of small islands are included in this exploration. Further below in this article I will dive a bit deeper and elaborate as to how exactly these results were produced, what the current limitations are and possible future next steps.

Select a destination:

Anguilla land use detection timeseries

Time series of a small island in the Caribbean showing accumulation of detected structures from radar backscatter data, from June 2016 till February 2019. The percentage is the share of red pixels divided by the total number of masked pixels. Note that Google Earth Engine averages results per zoom level so pixels might appear larger than they actually are.


Why detect land use?

Remote land use detection allows for monitoring of areas to aid in both risk management due to climate change and conservation efforts due to ongoing economic developments. By having a robust system one can detect changes in land usage remotely; given there are operational sensors such as satellites in space that continuously collect electromagnetic radiation data. Assuming that we can establish a relationship with additional independent datasources it should be also possible to predict these changes within a certain degree of accuracy.

The geographic region of small islands in the Caribbean

The Caribbean is known for its beautiful beaches and is in general an appealing region to spend your vacation (I can attest to this coming from Aruba). However, Caribbean islands are surrounded by the ocean and like some urban cities have human populations near coastal areas. Depending on the elevation, coastal populations can be negatively impacted by rising sea levels and natural disasters in the near future. Additionally, this group of small islands are diverse, which poses a challenge on itself when it comes to land use detection. Think about detection of small town areas when compared to nations with large urban zones, different types of vegetation and seasonal patterns, topographies, infrastructure, etc. For these reasons, I find the Caribbean a good place to start exploring the development of a robust land use detection system.

Google Earth Engine

Google Earth Engine (GEE) has its pros and cons. While the use of Google cloud brings scalable geospatial analysis to your browser, the learning curve can be steep if you are not a programmer and the engine is also somewhat of a black box. The latter is likely a tradeoff in order to provide cloud-based speed and scalability as this is where most of the heavy lifting is carried out. From my experience it's very different than working with datasets locally in a tool such as NumPy. You'll get used to it eventually and you'll come to appreciate its speed for prototyping ideas.

Unsupervised remote land use detection

Ok, let us get a bit more into the details. As mentioned at the beginning of the article there are a couple of approaches to detect land usage. Within this context we consider detection a classification problem. Classification can be done by unsupervised, semi-supervised or by fully-supervised learning. It can have a single-class output (one score for developed land) or multi-class output (several scores for multiple land cover types, for example bare, vegetation or water). With a supervised approach you are given a vector dataset with labelled boundaries in geographical coordinates that define areas of developed land. Your satellite images are your unlabelled raster dataset. The task at hand is to then train your unlabelled dataset on your labelled dataset with the goal to predict developed land areas on new or unseen data. Supervised approaches can be time consuming and tedious when it comes to creating a large number of labels to increase accuracy. A close relative of the supervised approach is the is semi-supervised approach where both labelled and unlabelled data are trained and combined in a way that produces a higher degree of accuracy. Finally we have unsupervised training where there aren't any labels and training relies on clustering algorithms that extract features through kernel convolutions or similarity functions (e.g. SNIC).

Because this exploration is meant to be short and non-exhaustive, I've opted to solely focus on experimenting with unsupervised approaches and a single-class output. GEE provides a comprehensive catalog of public datasets to explore. I've focused on the ones that provide the best resolution for both multispectral and radar sensors. These are currently the satellites from the European Sentinel missions (10m² per pixel). Particularly, Sentinel-1.

Synthetic Aperture Radar

Each of the two satellites of the Sentinel-1 constellation, satellite 1A and 1B carries onboard a Synthetic Aperture Radar (SAR) instrument. Having experimented with Sentinel-2 data, which produces multispectral (coloured) images I tend to agree that a supervised approach would be more suited for these types of images, for example by using Deep Neural Networks as classifiers. This is because the visual patterns that represent manmade structures such as roads and buildings are complex and not easy to cluster with shallow techniques. One general difficulty when dealing with spectral data is that they collect radiation passively and in wavelengths that are obstructed by clouds. While the Caribbean is known for its abundant sun, a cloud-free image usually entails compositing an image over an entire year. This timespan can lower your change detection rate as changes over the course of a 12-month period are aggregated into a single image. In terms of training a model there is also the challenge of seasonal landscape changes (e.g. varying degrees of rainfall-induced vegetation) that has to be dealt with. I thus opted instead to focus on radar (an active sensor) that can penetrate clouds and relies on backscatter information. In case you are familiar with electromagnetic polarimetry, some satellites are able to measure up to four different types of polarisation channels, referred to as quad-polarised satellites. These allow for fancy decomposition techniques that can distinguish between things like single and double-bounce scattering. Unfortunately, Sentinel-1 is dual-polarised instead of quad-polarised and the HH-HV dual polarisation channels are only available at the poles for the monitoring of sea ice. Next to that, because of how GEE works, the Sentinel-1 data that is available is solely Ground Range Detected and thus only contains the amplitude (backscatter coefficient) of microwave signals. Finally, there weren't any VH-polarised images available in descending orbit (satellite 1B), at least from my experience with GEE while doing spot checks within the Caribbean. Satellite 1A does contain for almost all destinations both VV co-polarised and VH cross-polarised channels. Thus I was left with VV-VH dual-band cross-polarisation SAR 1A images (ascending orbits). Nonetheless, this turned out to be enough to continue prototyping ideas in new GEE territory.

Increasing the signal-to-noise ratio

The core idea behind this exploration is that SAR imagery when thresholded is similar to a point cloud. Each pass of the satellite produces a slightly different image, so as more passes are carried out the "signal" continues to accumulate over time. Due to the limitations described in the previous section, there is one parameter that has to be manually adjusted per destination, which is a minimum for thresholding. This minimum is first set after normalising the pixels followed by some histogram matching between the first and followup images. As a side note, there isn't any native function in GEE that does histogram matching at the time of writing, so I conjured up my own and have asked here if there is a better way to accomplish this on GEE servers.

Limitations and future work

Using Sentinel-1 in GEE does have its limitations for unsupervised remote land use detection but it also carries potential. I've jotted down a list of items that in my opinion merit further exploration:
  • Reduction of false-positives, for example on the islands of Bonaire and Antigua steep hills are detected as manmade structures. No radiometric terrain flattening is being applied in GEE, so maybe searching for backscatter coefficients of Sentinel-1 could be useful here. Besides misclassified dihedral angles, there is also the issue with scaleability in GEE. As the area of interest gets larger the scale of GEE Reducers gets adjusted to higher levels. While this ensures that the server request does not fail for histogram matching it does however reduce the overall accuracy as pixel values are incrementally averaged. This is the reason why for example the Bahamas group of islands is not present and why the scope of this exploration is limited to only relatively small islands.
  • Because of how electromagnetic waves bounce off of flat surfaces, roads which are manmade structures could get misclassified as water in SAR and this can lead to significant gaps in accuracy. Think for example on the exclusion of the airport landing strip of a tiny island such as Saba. Similarly, farmland is underrepresented in the results. For these two examples, either looking deeper at backscatter decomposition techniques or resorting to a semi-supervised approach could be useful.
  • The island of Barbuda, which has suffered tragic widespread damage from Hurricane Irma has to be looked at more closely, images returned have a narrow range with lots of noise.
  • Sentinel-1 was launched on October 2014 and has a designed lifespan of 7 years. In relative terms, 2014 is therefore still quite recent. Ideally one can go back in time and look 30 years back but then one would have to resort to LANDSAT collections which works at best at 30m² per pixel.
Thanks for making it this far and in case this information was helpful to you than great! If not then I'm sorry that you had to read it all through. The disclaimer here is that currently I'm not studying remote sensing but obviously do find it a very interesting field with potential to help steer decision making of our home planet for not just our own protection but the general wellbeing of home. Any feedback is highly appreciated, thanks!

Thursday, November 1, 2018

A Short Online Letter to the Board of Alphabet Inc.

Dear Chairman Hennessy,

I would like to openly share a question that kept coming back to me in the past couple of days, and that gave me courage to write a short open letter for the first time in my life.

While catching up with daily news I came across a couple of articles in the past week alone, namely on the world’s remaining wilderness areas that are under threat. That the Earth’s oceans have retained 60 percent more heat each year than we’ve previously thought, that humanity has wiped out 60% of animal populations since 1970, that China has legalised rhino horn and tiger bone usage after 25 years, to calling for urgent action to develop technologies for negative emissions because our clean energy efforts won’t be enough.

Here’s the question: is there actually a future for us, for your company, for humanity and our natural environment? What we do today will lay down the trajectory for our carrying capacity on Earth. Instead of investing in self-driving transportation and connecting every human to the Internet, maybe investments should go towards active carbon capture and removal. Or perhaps invest in other organisations that protect rainforests and natural reserves, or in no-till farming techniques.

Some of my peers believe in a future on another planet, but what is the societal cost to create a Noah’s Ark that can live sustainably on another planet, most likely after we’ve destroyed our home beyond the point of no return?

Why am I reaching out to Alphabet in this format? I grew up in a time with great optimism about the future, where the Internet was transforming our human society day by day. At one point, our generation switched from AltaVista and Yahoo to Google. That was, in my opinion, a leap forward in how a search engine could bring us together with a comprehensive information web at our fingertips. One can even argue that the Google search engine has been used at least once by every single Internet user. Imagine now, with the reach of Alphabet Inc. if you would help us remain together as a species and help maintain our planet for a Googol of future generations…

Because this is an open letter I’m not expecting an answer, and I know that there are smart folk that are actively working on some of these problems. Nevertheless, it would mean a great deal to our pale blue dot if not just Alphabet, but also other big players in the private sector would pave the way for a new generation of sustainable technologies and instil some needed optimism on us average Joey Tribbiani’s.

Sincerely,

Francis Laclé

Saturday, February 6, 2016

A scalable geometrical model for muscle and tendon units: An algorithmic solution on how to fit a template muscle on a high resolution muscle mesh

The reason for this blog post is to share a bit on a particular hard problem that I've encountered during my Master's thesis with a broader audience. I will try my best to write it in plain English, but as the problem is complex expect this to be a lengthy post with domain specific terminology.

Thursday, August 21, 2014

But Google what about mobile phones that do not support Javascript?

In the global device market, there are still between 0.2% and 5.4% of phones that do not support Javascript, at least in these set of countries according to this site.

In case your mobile website falls within this set than what do you do when you want to optimize CSS delivery by deferring the loading of some CSS but still serving the complete CSS to non-Javascript websites?

Saturday, January 11, 2014

Algorithm to sort edge list of simple polygon for 2D and 3D

Sometimes it is handy to sort an edge list. In this case I needed an algorithm to test for concavity of a simple 3D polygon with just one face. You can also apply the procedure on 2D because it just sorts an edge list that could contain either 2D or 3D vertices.

The polygons were made in Blender v.2.67, so the script had to be written in Python and executed via the Run Script button in the text editor. I didn't want to use fancy algorithms to sort edges because we're dealing with simple polygons, so I ended up writing my own. As a side note, the edge-angle checkbox in Blender, which can be used to see if a polygon is convex or concave didn't work for me, so I had no other choice but to first sort edges before I can apply angle calculations on consecutive vertices. Suggestions for improvements are welcome and hopefully it helps someone else who had to deal with the same (or similar) issues in Blender!

Saturday, May 26, 2012

Friday, December 3, 2010

Sunday, November 21, 2010

It's about time!

Just a quick update.
Recently I have changed the template and subject of my blog to fit more closely within my line of studies. A lot has changed since my last post from June 2009 (really a lot) but the idea of this blog still remains the same, namely to share useful information to others.

So, as they popular phrase goes... will keep you posted :)

Saturday, June 13, 2009

Fudgie's glTail with Chipmunk on MS Windows!

Hey folks,

It has been a while. Recently I have been busy with other stuff besides the usual, but a friend of mine suggested (and I completely agree) to be a good utilitarian and post something that will bring the greatest happiness for the greatest number of users :)

Saturday, April 4, 2009

How to get a frequency distribution table in MySQL

Sometimes when we are searching for something, we tend to look too deep and with wrong keywords. Forget about SQL procedures, the REPEAT() function and setting variables. If you want a result set with two columns, one the ID, and the other a frequency count, then use this:

SELECT id, COUNT( someValue ) AS frequency FROM tableName GROUP BY someValue;

Your welcome!