TerraCodec (TEC) is a family of pretrained neural compression codecs for multispectral Sentinel-2 satellite imagery. The models compress optical Earth observation data using learned latent representations and entropy coding.
Compared to classical codecs such as JPEG2000 or WebP, TerraCodec achieves 3–10× higher compression at comparable reconstruction quality on multispectral satellite imagery. Temporal models further improve compression by exploiting redundancy across seasonal image sequences of satellite imagery.
This repository contains the TEC-ELIC variants of TerraCodec.
assets/TEC_ELIC_architecture.png
TEC-ELIC is a convolutional encoder–decoder neural compression model based on the Efficient Learned Image Compression (ELIC) architecture. The model predicts the mean and scale of latent variables using spatial and channel context together with a hyperprior.
This richer entropy model improves rate–distortion performance compared to the factorized prior model, at the cost of higher computational complexity. TEC-ELIC is optimized for 12-band Sentinel-2 imagery.
See the paper for additional architectural and training details.
Input Format
Codec type
Expected shape
Example
Image codecs
[B, C, H, W]
[1, 12, 256, 256]
Temporal codecs
[B, T, C, H, W]
[1, 4, 12, 256, 256]
Inputs use 12 Sentinel‑2 L2A spectral bands.
Recommended spatial size: 256×256.
Temporal codecs were pretrained on four seasonal frames, but can process any number of timesteps during inference (higher T increases compute).