SPEXT / README.md
sannara's picture
SPEXT weights, anchor metadata and model card
5f3dbfb verified
|
Raw History Blame Contribute Delete
4.64 kB
metadata
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 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.

SPEXT pre-training

Code: 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

pip install "spext[hub] @ git+https://github.com/Sannaraek/SPEXT"
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 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. Stage II: SSL4EO-S12 v1.1 Sentinel-2 L2A with the Llama3-SSL4EO-S12 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

@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).