[MUSIC PLAYING]
NICHOLAS CLINTON: Hello, everybody.
My name's Nick Clinton--
Earth Engine developer relations.
And we're going to talk to you today,
about a project to map global land cover at higher
resolution than ever before.
And specifically, what I mean by that
is mapping the land cover in each 30 meter patch
of the Earth back to 2013.
So this is a very ambitious project.
And this kind of a global land cover time series has never
been done before.
So Earth Engine teamed up with Cloud to make it happen,
and we're going to tell you how.
But first, you might be wondering--
what is land cover?
And the analogy that I like to use is what's on the shelf?
And so organizations all over the world--
governments, NGOs, nonprofits, researchers, businesses--
want to understand the literal landscape in which they're
doing business.
So here is a more formal definition of land
cover-- it's the observed physical cover of the Earth's
surface, which describes the distribution
of vegetation types, water bodies,
and human-built environments, and other land cover types.
That distribution is a map.
And so here's a map of the imagery
that I showed you a couple slides ago--
or rather, the pixels are turned into a map.
And we'd like to do this at scale.
And do it not only for the whole surface of the world,
but for a time series.
And when you have a time series of maps like that,
you can start to understand processes, like,
the change in crop land, urbanization, deforestation,
the change in water resources in your area of interest.
And these are not just buzz words.
Land cover is, in fact, codified into the UN Sustainable
Development Goals.
So Google is interested in helping to achieve these goals.
And one of the key ingredients to making that happen
is just monitoring and understanding
where you are at a given time.
And so that's why we need maps like this.
In order to get a lot of these at global scale
and a time series of them, we need to use a lot of imagery.
And we need to use a lot of imagery
to turn all those pixels into land cover labels--
like you see in this map.
So fortunately, we have Earth Engine to help you
with that kind of thing.
And what is Earth Engine?
Earth Engine is Google's Cloud platform
for geospatial processing.
And it's got a whole bunch of good stuff--
primarily raster data.
So lots of satellite imagery, but other geospatial data sets,
as well.
And here's an example.
This is the same image that you saw before.
This is Landsat 8, which is the latest and greatest Landsat.
Landsat 9 is coming.
But we want to turn all these pixels--
and we are right up there, somewhere--
we want to turn all these pixels into labels.
So we have not only images like that Landsat image,
but we've got lots of other raster
and other geospatial data sets that
are useful for making those kind of maps.
So we have all of Landsat, all of Sentinel from the European
Space Agency, lots of Modus data,
land cover data terrain data, climate and weather
data, so on and so forth.
50 plus petabytes of data in the Earth Engine
catalog and growing daily, as more scenes come in.
All that data is not useful without a computation platform.
So the data archive is co-located with Google scale
resources to do computation.
And that's what you need in order
to tackle big machine learning problems
like making time series of those maps all over the world.
And to tell you more about the machine learning
part of this project is Chris.
Take it away, Chris.
CHRISTOPHER BROWN: Thank you, Nick.
Hi, my name is Chris Brown, and I'm
an engineer on Earth Engine.
So you're going to hear a lot about this today.
And I'm not going to be the first person
to talk about machine learning tools at Google.
But we do need to talk about them here, specifically.
Because to produce this map, it's
a more complicated process than just adding and subtracting
some pixels.
We actually have to have a little bit of intelligence
to do this.
So a brief word on some of the tools we have to build up
something like this.
We could start with Collab and TensorFlow--
you all know TensorFlow.
Collab, being an IPython notebook environment
that's free, provided by Google that
has things like TensorFlow and GPU back ends.
So we could train our model this way,
we could build a model this way.
We can then start to scale our predictions using things
like ML Engine, Kubernetes.
There's an extreme end, we won't talk about today.
But if you're an app developer and you
don't need to create your own model-- like we did-- you do
have things like speech translate and other APIs
built-in.
But what we're going to talk about
is how we used things like TensorFlow, Collab, and then
AI platform to make this land cover map happen.
So to build a good model-- in our case,
we want to model land cover--
we need a couple of things.
We need big data.
And Nick was talking about this 50 petabytes
and growing of data in Earth Engine.
We need good models--
this is something that's brought to bear by TensorFlow.
And then we need a ton of computation--
some of which is on Earth Engine.
But we can't do it all in Earth Engine,
and we'll get to that in a little bit.
So we understand this is a machine learning problem.
We understand this is a big data problem.
But we need to talk about why.
So if we think for a second, about land cover--
we can also get a little more specific
and talk about land use.
So if we think about land cover being
what stuff is made of on the surface of the Earth--
we could use the example of a parking lot and a road.
They're both made of asphalt, presumably.
And if all you knew was that this is made of asphalt--
the way we do it is with reflectance,
but bear with me here-- we know material,
could you tell the difference?
You can't, right?
It doesn't just matter what something is made of,
it's the arrangement of what it's made of in space.
And so this transforms our problem
of identifying land cover from looking at a single pixel,
looking at reflectance saying, oh, I
know what this is to looking at many, many pixels, and saying,
we know what this is.
Because we don't just need to know the reflectances-- a.k.a.
the material at one point-- we need
to know how that's arranged in space.
So this turns this machine learning problem
into a much heavier problem.
Our input stopped being something like red,
green, blue-- or in our case, because they're
satellites-- red, green, blue, ultraviolet, infrared,
and a bunch of other stuff.
To red, green, blue, ultraviolet,
infrared for 64 by 64 or greater patches of pixels--
that's a ton of input data.
And the question is, do we have the tools to work with this?
And the answer is we do.
Earth Engine today-- if you didn't already know--
does have interoperability with TensorFlow.
So you can start to take these images that
have spatial context or temporal contexts
and make predictions about them.
Or run inference over these images.
And this works great, and well, why don't we stop here?
We're done, that should be it.
The problem is you can do this over a small region.
You can run TensorFlow on your machine over these images
and make predictions.
But things get tricky when you want to scale it.
This is an image where--
as Nick was describing--
30 meters per pixel.
This is of the United States.
And is actually 500 megapixels or so-- something like that.
And yes, sure, these aren't just 500 megapixels.
These are 500 megapixels over which,
a fully convolutional neural net--
if you know what that is--
was applied at scale.
And it was done in about two hours--
which is amazing.
Because-- bringing this back to land cover maps--
these are things that historically take five years
to build for one year.
And once we talk about scaling up our ability
to apply inference--
it's a big data problem.
This isn't just an Earth Engine large catalog problem,
this is an Earth Engine with a big catalog,
with a big computation problem.
And to actually scale these types
of predictions over the world, we
have to get a little bit smarter.
And David is going to tell us how we got smarter
using Cloud Platform.
DAVID CAVAZOS: So now that we had a trained model,
we need to do predictions at scale.
So the Earth is big, it's really big.
And we have Landsat 8 satellite images for the entire world,
for every 16 days since 2013 at that 30 meter resolution--
that's a lot of data.
So how do we do these predictions
at scale with so much data?
First, we have to subdivide the world into smaller regions.
Now, the cool thing is that every individual region
is independent from each other so they
can be running parallel.
So, let's say, we want to classify this location.
The first step will be identifying which
region contains this location.
And then, we can run the classification only
on that region.
So let's look into more detail at how we do this.
First, we have an App Engine server into which,
we submit that location.
And then it computes the bounds of the region that
contains that location, which is then
submitted into Earth Engine.
Earth Engine now extracts this region,
and it gets stored in the Cloud Storage.
So this is how the Landsat 8 image looks like, or at least,
that's what our eyes can see.
This is the RGB representation of it.
And it's kind of hard to tell what is what.
Everything looks kind of greenish so we don't
know if it's exactly, like, grassland, or forest, or even
water.
Fortunately, Landsat 8 comes with very sophisticated sensors
that can see a broader range of the electromagnetic spectrum
that our eyes cannot see, such as infrared and even thermal
information.
And all of these gives a signature
to each of material that makes it easier for our model
to identify what kind of material is within each pixel.
So as we can see now in these other bands of the non-visible
spectrum--
things like water and concrete stand out a lot more
than in the previous image.
So as these Landsat images are extracted, parts of them
are written into Cloud Storage.
As these files are written, they trigger a Cloud Function
that does a request to a Kubernetes cluster running
our TensorFlow model to do the predictions.
And these predictions are at a file level.
And once there are classified, they
are now stored, once again, into Cloud Storage.
This is what the prediction for that area looks like.
And as we can see, every single pixel
has a value for one out of 10 possible classes.
As these land cover files are written into Cloud Storage,
those trigger another Cloud Function
that tells our server to upload that image back
into Earth Engine.
Where it gets stored into an image collection,
which contains the land cover maps
for the entire world for all the years that we've extracted.
Now, these land cover maps are very useful for decision makers
and other organizations to make more informed decisions
about what resources are in the Earth.
And every pixel tells a story, especially when
we see the change.
Now, one of the very cool things about Earth Engine
is that once the data is in Earth Engine,
it's not only visible within Earth Engine.
But it's also accessible to other external applications,
which made it possible for us to build a custom web
application using AngularJS and Maps
API to request both the land cover images and the landscape
images.
And then, render them into our application.
So let's take a look at some locations.
Here, we are in Cambodia.
What we can see here--
as the dark green-- that's forest.
And all that amber-yellowish thing-- that's farmland.
And if you pay attention to the central region of that forest--
if we turn on the animation from 2013 to 2018,
we can see how the farmland is slowly eating
through this protected land.
Land cover makes it easier to quantify.
But we choose the Landsat images,
then we can clearly see how this is affecting some very
important habitats in Cambodia.
Now we can go into the Amazon.
This is Peru.
And we see this thing that looks kind of like a river that
is going down.
And if we turn the animation on, then we'll
see a very interesting thing-- that this
is growing and flowing, as if a new river was being created.
Well, this is not actually a river.
This is toxic waste and heavy metal residues
coming from a mine nearby.
Fortunately, some researchers in Peru
are looking at trees and plant species that
can grown in these hazardous environments
to help clean up the area.
And now if we go all the way in Iran--
this is Lake Urmia, the largest lake in Iran.
And we can see how the water levels is decreasing.
And this is due to the construction of dams
and the effects of global warming.
In fact, that little green patch that we see nearby the water--
that used to be an island surrounded by water.
So as we can see, these land cover maps tell us a story.
And have a lot of very insightful information
about the regions that help us quantify
what's happening in there.
But they take a lot of time and effort to create these.
In fact, to create a map of the entire USA,
it takes at least five years to create one of these.
So we tried generating the maps for the entire United States,
and we managed to get the maps from 2013 to 2018,
in under 24 hours.
So let me show you a quote from Mahatma Gandhi.
"What we are doing to the forests in the world
is but a mirror reflection of what
we are doing to ourselves and to one another."
But it's not all bad news.
There is also, a bunch of very cool efforts
that are happening around the world.
Well, something's not working--
there we go.
So for example, this is the Great Green Wall project
that is happening in Africa.
this is in conjunction with a bunch of different countries
and communities working together,
to plant a lot of trees and edible plants.
To create a division between the now growing Sahara Desert,
and protect the forests in Africa.
And there are also some reforestation efforts
in the Amazon, where people are gathering seeds
from the forests around them and then mixing them with soil
and planting in affected areas.
Here, we can see how these plants
look like after three to six months of growing.
And then these trees--
after five to seven years of growing.
We all share the same planet.
And every little action-- like, using less plastic or growing
your own food--
will have an impact.
If you like this project or would
like to see how it was created, you can follow this link.
And it'll take you to our GitHub repo.
Or you're can share this story in Medium.
Thank you.
[APPLAUSE]
[MUSIC PLAYING]