A Step-by-Step Guide to Geospatial AI Agents & AI Models: Introducing Prithvi

A Step-by-Step Guide to Geospatial AI Agents & AI Models: Introducing Prithvi

Okay, using a ski analogy, we will stick on the blue (intermediate) runs in this post but push things a little. Note, this article continues from our previous: ???????????????????? ???? ???????????? & ???? ????????????: ?? ???????????? ?????????????? .. and is the first in a 2 part series.

Keep in mind, at a basic level, this is how our AI system works

Step 1: You ask a question?in plain English.

Step 2: The agent translates it?into technical steps.

Step 3: Models collaborate?(geocoding + risk prediction).

Step 4: You get an actionable answer?with visuals.

To maintain continuity, let's extend our restaurant analogy from our first post. Imagine returning to our futuristic restaurant, but this time, the waiter (your AI agent) collaborates with a?Michelin-starred chef?who’s trained in?every cuisine on Earth. This chef isn’t just making dishes - they’re predicting food trends, spotting rotten ingredients from miles away, and designing menus for Mars. Meet?Prithvi, the geospatial AI equivalent of this superstar chef. Let’s break down what this means in simple terms.

Please note, Prithvi is a traditional machine learning model it is not (as we have been discussing) a generative AI model. Learn the difference by reading this article: What is the Difference between Geospatial Generative AI and Traditional (Non-Generative) Machine Learning Models?

What is Prithvi?

Prithvi is a?geospatial foundation model; think of it as a?master chef?trained by NASA and IBM to analyze satellite imagery. Unlike our earlier "chefs" (simple distance calculators), Prithvi:

a) Sees the Earth in layers: It processes optical, infrared, and radar data from satellites like Sentinel-2.

b) Learned from petabytes of data: Trained on 30+ years of global satellite imagery to recognize floods, wildfires, crops, and more.

c) Adapts to new tasks: Just as a master chef can tweak recipes for dietary needs, Prithvi can be fine-tuned for custom jobs (e.g., tracking deforestation in the Amazon).

How Does Prithvi Fit Our Restaurant Analogy?

Let’s revisit our analogy with a new example:

User Request: “Is there flood risk near the Mississippi River this week?”

The Workflow:

a) Waiter (Agent): Takes your question, identifies key needs (location: Mississippi River, task: flood risk).

b) Head Chef (Prithvi):

  • Pulls the latest satellite imagery (like a chef sourcing fresh ingredients).
  • Analyzes water levels, soil moisture, and historical flood patterns.
  • Predicts risk areas (like a chef spotting spoiled ingredients before they’re used).

c) Sous-Chefs (Helper Models):

  • A language model translates Prithvi’s technical output into plain English.
  • A mapping model highlights risk zones on an interactive map.

The Advantages of Prithvi

Prithvi delivers unparalleled speed, analyzing 10,000 square kilometers in seconds—work that would take humans weeks. Its precision uncovers subtle changes, like shifts in soil moisture, that are invisible to the naked eye. Best of all, it democratizes access to NASA-grade analysis, empowering smaller organizations to harness cutting-edge insights without the need for costly experts.

The Current Disadvantages of Prithvi

Prithvi relies on up-to-date satellite imagery, much like a chef depends on fresh ingredients to create a perfect dish. It also requires robust compute power, such as GPUs or cloud resources - in each of our examples we are using Google Colab.

Time to Talk Code (not scary!)

Our end goal is to use Prithvi with real satellite data to answer geospatial questions. But we are still on the easier blue runs (not black quite yet), so we will ease in gently by building a simulation. Think of a simulated workflow as you might a cooking show demo - the steps are real, but we’re using store-bought dough instead of baking from scratch. Let's first build the scaffolding.

Using our analogy (apologies if this is becoming a little tiring) ... Building this code is like assembling a professional kitchen with Michelin-star equipment. Even if we’re currently using store-bought ingredients (simulated data), the?infrastructure?is restaurant-grade!

Translated; that means we are following the?exact workflow?used in production systems; no conceptual leaps needed when we switch to real data.

Here is our code (note, to use this code .. right-click on image .. save as .. and save the image locally .. next drop this into ChatGPT and use this prompt: Can you pull the python from this image and give me that code):

And the output - Flood Risk 68% (simulated):


What is happening under the hood?

Since you asked ...

Authentic Tools, Real Workflows

  • TerraTorch Library: This is a?real, maintained PyTorch library?for geospatial AI, developed to standardize workflows for models like Prithvi. It’s not a toy example—it’s the same toolchain used by NASA/IBM researchers.
  • Model Registry: The?BACKBONE_REGISTRY?system is how professionals manage geospatial models in production. We’re using the?exact same registry?that would load a fully trained Prithvi.

Prithvi's Architecture is Loaded

When we run:

model = BACKBONE_REGISTRY.build("prithvi_eo_v2_300", ...)        

We’re loading:

  • The?actual neural network architecture?(layers, attention mechanisms) used by Prithvi.
  • The?input/output specs?(e.g., expecting 6 spectral bands from Sentinel-2 satellites).

This isn’t a mock-up. It is the same code that would run inference with Prithvi’s 300 million parameters. The?only?missing piece is the real data (which require authorization), not the model itself.

What's Next?

So there you have it. We have set the stage and built the foundation for moving onto those black runs.

An important note to add here, as you prepare to jump into our last article in the series. We have in this post laid out how you might use the Privthi model. The flow of the code applies to other geospatial AI models, beyond Privthi . Be warned Privthi is complex.

Since our goal has been to minimize complexity in this article series. I wanted to introduce Privthi. But, in our next article, we use the core code flow shared above, but with a different, simpler AI model. Onwards - Geospatial AI Agents & Models for Flood Prediction.

Matt Sheehan?is a Geospatial 2.0 expert. He publishes a weekly Spatial-Next Newsletter which dives deeper into advances in the geospatial world, providing important news, opinions, new research and spotlights innovators. Subscribe to the newsletter?here.

Nihar R Sahoo, PhD

GenAI | Earth Observation Analytics | Data Science | Applied Statistics | Geospatial Technology | Enterprise Architecture

5 天前

Love this Matt Sheehan

要查看或添加评论,请登录

Matt Sheehan的更多文章