TerraCodec: Compressing Optical Earth Observation Data

The paper introduces TerraCodec, a family of publicly available, pretrained neural codecs for Earth observation data that utilizes a Temporal Transformer and a novel Latent Repacking method to achieve significantly higher compression rates than classical codecs while enabling zero-shot cloud inpainting.

Julen Costa-Watanabe, Isabelle Wittmann, Benedikt Blumenstiel, Konrad Schindler

Published 2026-03-06
📖 5 min read🧠 Deep dive

Imagine the Earth is a giant, living library, and satellites are the librarians taking millions of photos every day. These aren't just regular photos; they are multispectral time-lapses. They capture the planet in 12 different "colors" (including invisible ones like infrared) and take pictures of the same spot every few days to watch seasons change, crops grow, or floods rise.

The problem? This library is getting too heavy to carry. The data is so massive that storing it and sending it back to Earth is like trying to mail a library's worth of books in a single envelope.

Enter TerraCodec, a new team of "digital movers" designed to shrink these massive files without losing the important details. Here is how they do it, explained simply:

1. The Problem: Why Old Movers Fail

Traditional compression tools (like JPEG or MP4) are like old-school movers who only know how to pack a single room. They treat every photo as a separate, static object.

  • The Issue: Earth observation isn't static. A forest in July looks different than in December, but the trees are still there. Old tools throw away the "memory" of the previous photo, forcing them to re-pack the same tree trunks and river banks over and over again. This wastes space.
  • The Result: To get a clear picture, you have to send a huge file.

2. The Solution: TerraCodec's "Smart Packing"

TerraCodec is a family of AI tools trained specifically on Earth data (using images from the Sentinel-2 satellite). It uses three main tricks:

A. The "Contextual Memory" (TEC-TT)

Imagine you are watching a movie. If you see a frame where a character is walking, you don't need to be told exactly where their feet are in the next frame; you can guess they moved forward.

  • How it works: TerraCodec's "Temporal Transformer" (TEC-TT) is like a super-smart movie editor. It looks at the last few photos and learns the patterns of the Earth. It knows that clouds move slowly, rivers don't jump, and crops grow gradually.
  • The Magic: Instead of sending the whole new photo, it only sends the changes. "The cloud moved left," "The water level rose." This is why it can shrink files by 3 to 10 times compared to old methods while keeping the picture just as sharp.

B. The "Smart Suitcase" (Latent Repacking)

Usually, AI compression tools are like suitcases that only fit one specific size of clothes. If you want a smaller suitcase (lower quality/smaller file), you have to buy a whole new suitcase and repack everything from scratch.

  • The Innovation: TerraCodec introduces Latent Repacking. Imagine a suitcase with a magical zipper.
    • The "Essentials" (Early Tokens): The first few items you pack are the most important: the shape of the land, the big rivers, the general layout.
    • The "Details" (Later Tokens): The later items are the fine details: the texture of the leaves, the ripples in the water.
  • The Benefit: You can unzip the suitcase halfway and still have a perfect map of the terrain. You don't need a new suitcase; you just decide how many "zippers" (tokens) you want to open based on how much space you have. This allows one single model to handle any file size you need.

C. The "Weather Predictor" (Zero-Shot Cloud Inpainting)

Satellite photos are often ruined by clouds. Usually, you need a special AI trained just to remove clouds.

  • The Trick: Because TerraCodec is so good at understanding how the Earth should look over time, it can act like a weather forecaster. If it sees a photo with a cloud, it looks at the previous photos, guesses what the ground looks like underneath, and "paints" the cloud away.
  • The Result: It can fix cloudy photos without ever being taught how to do it specifically. It just uses its general knowledge of the Earth. It beats all other current methods at this task.

3. Why Does This Matter?

  • For Scientists: They can store years of data on a single hard drive instead of a warehouse.
  • For Disaster Response: When a flood hits, they can send high-quality maps back to Earth instantly, even with slow internet connections.
  • For the Planet: Less data transmission means less energy used by satellites and data centers.

The Bottom Line

TerraCodec is like upgrading from a clumsy, manual mover to a robotic, predictive packing system. It doesn't just squish the data; it understands the story of the Earth. By remembering the past and predicting the future, it throws away the unnecessary repetition, leaving us with a tiny file that still tells the whole story.

The best part? The creators have opened the doors and shared the blueprints (code and models) with the world, so anyone can use this technology to help monitor our planet.