File size: 4,637 Bytes
1f3db91 5f3dbfb 1f3db91 5f3dbfb | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | ---
license: mit
library_name: pytorch
pipeline_tag: image-feature-extraction
tags:
- earth-observation
- remote-sensing
- sentinel-2
- multi-spectral
- foundation-model
- vision-language
- neurips-2026
datasets:
- embed2scale/SSL4EO-S12-v1.1
- ibm-esa-geospatial/Llama3-SSL4EO-S12-v1.1-captions
---
# SPEXT: A Decoupled Multi-Spectral Foundation Model for Earth Observation and Vision-Language Grounding
SPEXT is a ViT-B/8 foundation model for 10-band Sentinel-2 imagery (NeurIPS 2026). One forward pass produces two
outputs:
* **Patch tokens** (256 x 768) for dense prediction and as visual input to a vision-language model.
* An **alignment token**, projected into the frozen
[Qwen3-Embedding-0.6B](https://huggingface.co/Qwen/Qwen3-Embedding-0.6B) text space, for zero-shot text-to-image
retrieval.
Pixel reconstruction and latent masked text prediction act on the patch tokens. The image-text alignment loss acts
only on the alignment token, so it does not compress the dense spectral features. The patch embedding is
parameterised by the physical band wavelengths.

**Code:** [github.com/Sannaraek/SPEXT](https://github.com/Sannaraek/SPEXT)
## Files
| File | Size | Contents | Use |
|---|---|---|---|
| `spext_vitb8_s2.safetensors` | 353 MB | Encoder (87.5 M parameters) and alignment projection | Feature extraction, fine-tuning, retrieval, VLM tokens |
| `spext_vitb8_s2_pretrain.safetensors` | 565 MB | Encoder, MAE pixel decoder and MTP decoder | Spectral-fidelity evaluation, continued pre-training |
| `ssl4eos12_anchor_metadata.tar.gz` | 41 MB | Geographic anchor metadata for SSL4EO-S12 | Re-creating the pre-training data |
| `SHA256SUMS` | | Checksums of the three files | `sha256sum -c SHA256SUMS` |
## Usage
```bash
pip install "spext[hub] @ git+https://github.com/Sannaraek/SPEXT"
```
```python
import torch
from spext import S2_MEAN, S2_STD, load_spext
model = load_spext("spext_vitb8_s2", device="cuda") # downloads the weights from this repository
# x: Sentinel-2 L2A digital numbers incl. the +1000 offset, bands [B2, B3, B4, B5, B6, B7, B8, B8A, B11, B12], 128 x 128 px
x = 1000 + torch.rand(1, 10, 128, 128) * 4000
x = (x - torch.tensor(S2_MEAN).view(1, -1, 1, 1)) / torch.tensor(S2_STD).view(1, -1, 1, 1)
with torch.no_grad():
out = model(x.cuda())
out["patch_tokens"] # (1, 256, 768) dense features
out["alignment_embedding"] # (1, 1024) text-aligned embedding for retrieval
```
If your data has the +1000 L2A offset removed (`DN = 10000 * reflectance`), add `spext.S2_L2A_OFFSET` before
normalising.
See the [GitHub README](https://github.com/Sannaraek/SPEXT#quickstart) for input conventions, text retrieval and the
evaluation code.
## Results reported in the paper
**PANGAEA** (test mIoU, full training data): average **60.11** over HLS Burn Scars, MADOS, PASTIS, Sen1Floods11,
xView2, CropTypeMapping, SpaceNet7 and AI4SmallFarms, the best average of the 15 encoders compared.
**Zero-shot text-to-image retrieval** (mAP@100, average over EuroSAT, BigEarthNet and METER-ML): SPEXT 48.38,
Llama3-MS-CLIP 42.79, OpenCLIP L/14 38.16, Llama3-RGB-CLIP 35.72, RemoteCLIP 27.01.
**VLM grounding on RSVQAxBEN** (overall accuracy, frozen Qwen3-VL-8B-Instruct with a small adapter): SPEXT 81.09,
Llama3-MS-CLIP 77.03, RGB through Qwen3-VL's own vision tower 75.81.
## Training data
Stage I: [fMoW-Sentinel](https://purl.stanford.edu/vg497cb6002). Stage II:
[SSL4EO-S12 v1.1](https://huggingface.co/datasets/embed2scale/SSL4EO-S12-v1.1) Sentinel-2 L2A with the
[Llama3-SSL4EO-S12 captions](https://huggingface.co/datasets/ibm-esa-geospatial/Llama3-SSL4EO-S12-v1.1-captions).
About 1.7 M Sentinel-2 tiles in total, trained on 4 NVIDIA GH200 GPUs.
## Limitations
The model expects 10-band Sentinel-2 L2A input at 10 m resolution, 128 x 128 px. Other optical sensors need their
band wavelengths and fine-tuning (the paper shows this for Landsat). It sees single dates, not time series.
## Citation
```bibtex
@inproceedings{ek2026spext,
title = {{SPEXT}: A Decoupled Multi-Spectral Foundation Model for Earth Observation and Vision-Language Grounding},
author = {Ek, Sannara and Tang, Chong and Koch, Dirk and Weddell, Alex and Chauhan, Jagmohan and Mullins, Robert},
booktitle = {Advances in Neural Information Processing Systems},
year = {2026}
}
```
## Acknowledgements
Supported by the Engineering and Physical Sciences Research Council (EPSRC), project Perfect Recollection for Clearer
Insight (grant EP/Y036077/1). Computed on the Isambard-AI National AI Research Resource (AIRR).
|