SPEXT weights, anchor metadata and model card
Browse files- .gitattributes +1 -0
- README.md +107 -0
- SHA256SUMS +3 -0
- architecture.png +3 -0
- spext_vitb8_s2.safetensors +3 -0
- spext_vitb8_s2_pretrain.safetensors +3 -0
- ssl4eos12_anchor_metadata.tar.gz +3 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
architecture.png filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
|
@@ -1,3 +1,110 @@
|
|
| 1 |
---
|
| 2 |
license: mit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: mit
|
| 3 |
+
library_name: pytorch
|
| 4 |
+
pipeline_tag: image-feature-extraction
|
| 5 |
+
tags:
|
| 6 |
+
- earth-observation
|
| 7 |
+
- remote-sensing
|
| 8 |
+
- sentinel-2
|
| 9 |
+
- multi-spectral
|
| 10 |
+
- foundation-model
|
| 11 |
+
- vision-language
|
| 12 |
+
- neurips-2026
|
| 13 |
+
datasets:
|
| 14 |
+
- embed2scale/SSL4EO-S12-v1.1
|
| 15 |
+
- ibm-esa-geospatial/Llama3-SSL4EO-S12-v1.1-captions
|
| 16 |
---
|
| 17 |
+
|
| 18 |
+
# SPEXT: A Decoupled Multi-Spectral Foundation Model for Earth Observation and Vision-Language Grounding
|
| 19 |
+
|
| 20 |
+
SPEXT is a ViT-B/8 foundation model for 10-band Sentinel-2 imagery (NeurIPS 2026). One forward pass produces two
|
| 21 |
+
outputs:
|
| 22 |
+
|
| 23 |
+
* **Patch tokens** (256 x 768) for dense prediction and as visual input to a vision-language model.
|
| 24 |
+
* An **alignment token**, projected into the frozen
|
| 25 |
+
[Qwen3-Embedding-0.6B](https://huggingface.co/Qwen/Qwen3-Embedding-0.6B) text space, for zero-shot text-to-image
|
| 26 |
+
retrieval.
|
| 27 |
+
|
| 28 |
+
Pixel reconstruction and latent masked text prediction act on the patch tokens. The image-text alignment loss acts
|
| 29 |
+
only on the alignment token, so it does not compress the dense spectral features. The patch embedding is
|
| 30 |
+
parameterised by the physical band wavelengths.
|
| 31 |
+
|
| 32 |
+

|
| 33 |
+
|
| 34 |
+
**Code:** [github.com/Sannaraek/SPEXT](https://github.com/Sannaraek/SPEXT)
|
| 35 |
+
|
| 36 |
+
## Files
|
| 37 |
+
|
| 38 |
+
| File | Size | Contents | Use |
|
| 39 |
+
|---|---|---|---|
|
| 40 |
+
| `spext_vitb8_s2.safetensors` | 353 MB | Encoder (87.5 M parameters) and alignment projection | Feature extraction, fine-tuning, retrieval, VLM tokens |
|
| 41 |
+
| `spext_vitb8_s2_pretrain.safetensors` | 565 MB | Encoder, MAE pixel decoder and MTP decoder | Spectral-fidelity evaluation, continued pre-training |
|
| 42 |
+
| `ssl4eos12_anchor_metadata.tar.gz` | 41 MB | Geographic anchor metadata for SSL4EO-S12 | Re-creating the pre-training data |
|
| 43 |
+
| `SHA256SUMS` | | Checksums of the three files | `sha256sum -c SHA256SUMS` |
|
| 44 |
+
|
| 45 |
+
## Usage
|
| 46 |
+
|
| 47 |
+
```bash
|
| 48 |
+
pip install "spext[hub] @ git+https://github.com/Sannaraek/SPEXT"
|
| 49 |
+
```
|
| 50 |
+
|
| 51 |
+
```python
|
| 52 |
+
import torch
|
| 53 |
+
from spext import S2_MEAN, S2_STD, load_spext
|
| 54 |
+
|
| 55 |
+
model = load_spext("spext_vitb8_s2", device="cuda") # downloads the weights from this repository
|
| 56 |
+
|
| 57 |
+
# 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
|
| 58 |
+
x = 1000 + torch.rand(1, 10, 128, 128) * 4000
|
| 59 |
+
x = (x - torch.tensor(S2_MEAN).view(1, -1, 1, 1)) / torch.tensor(S2_STD).view(1, -1, 1, 1)
|
| 60 |
+
|
| 61 |
+
with torch.no_grad():
|
| 62 |
+
out = model(x.cuda())
|
| 63 |
+
out["patch_tokens"] # (1, 256, 768) dense features
|
| 64 |
+
out["alignment_embedding"] # (1, 1024) text-aligned embedding for retrieval
|
| 65 |
+
```
|
| 66 |
+
|
| 67 |
+
If your data has the +1000 L2A offset removed (`DN = 10000 * reflectance`), add `spext.S2_L2A_OFFSET` before
|
| 68 |
+
normalising.
|
| 69 |
+
|
| 70 |
+
See the [GitHub README](https://github.com/Sannaraek/SPEXT#quickstart) for input conventions, text retrieval and the
|
| 71 |
+
evaluation code.
|
| 72 |
+
|
| 73 |
+
## Results reported in the paper
|
| 74 |
+
|
| 75 |
+
**PANGAEA** (test mIoU, full training data): average **60.11** over HLS Burn Scars, MADOS, PASTIS, Sen1Floods11,
|
| 76 |
+
xView2, CropTypeMapping, SpaceNet7 and AI4SmallFarms, the best average of the 15 encoders compared.
|
| 77 |
+
|
| 78 |
+
**Zero-shot text-to-image retrieval** (mAP@100, average over EuroSAT, BigEarthNet and METER-ML): SPEXT 48.38,
|
| 79 |
+
Llama3-MS-CLIP 42.79, OpenCLIP L/14 38.16, Llama3-RGB-CLIP 35.72, RemoteCLIP 27.01.
|
| 80 |
+
|
| 81 |
+
**VLM grounding on RSVQAxBEN** (overall accuracy, frozen Qwen3-VL-8B-Instruct with a small adapter): SPEXT 81.09,
|
| 82 |
+
Llama3-MS-CLIP 77.03, RGB through Qwen3-VL's own vision tower 75.81.
|
| 83 |
+
|
| 84 |
+
## Training data
|
| 85 |
+
|
| 86 |
+
Stage I: [fMoW-Sentinel](https://purl.stanford.edu/vg497cb6002). Stage II:
|
| 87 |
+
[SSL4EO-S12 v1.1](https://huggingface.co/datasets/embed2scale/SSL4EO-S12-v1.1) Sentinel-2 L2A with the
|
| 88 |
+
[Llama3-SSL4EO-S12 captions](https://huggingface.co/datasets/ibm-esa-geospatial/Llama3-SSL4EO-S12-v1.1-captions).
|
| 89 |
+
About 1.7 M Sentinel-2 tiles in total, trained on 4 NVIDIA GH200 GPUs.
|
| 90 |
+
|
| 91 |
+
## Limitations
|
| 92 |
+
|
| 93 |
+
The model expects 10-band Sentinel-2 L2A input at 10 m resolution, 128 x 128 px. Other optical sensors need their
|
| 94 |
+
band wavelengths and fine-tuning (the paper shows this for Landsat). It sees single dates, not time series.
|
| 95 |
+
|
| 96 |
+
## Citation
|
| 97 |
+
|
| 98 |
+
```bibtex
|
| 99 |
+
@inproceedings{ek2026spext,
|
| 100 |
+
title = {{SPEXT}: A Decoupled Multi-Spectral Foundation Model for Earth Observation and Vision-Language Grounding},
|
| 101 |
+
author = {Ek, Sannara and Tang, Chong and Koch, Dirk and Weddell, Alex and Chauhan, Jagmohan and Mullins, Robert},
|
| 102 |
+
booktitle = {Advances in Neural Information Processing Systems},
|
| 103 |
+
year = {2026}
|
| 104 |
+
}
|
| 105 |
+
```
|
| 106 |
+
|
| 107 |
+
## Acknowledgements
|
| 108 |
+
|
| 109 |
+
Supported by the Engineering and Physical Sciences Research Council (EPSRC), project Perfect Recollection for Clearer
|
| 110 |
+
Insight (grant EP/Y036077/1). Computed on the Isambard-AI National AI Research Resource (AIRR).
|
SHA256SUMS
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
96845b0e0902dddc5421435680cecdc63f962cf7638931699b3060c3f774aeb0 spext_vitb8_s2.safetensors
|
| 2 |
+
13146c97e5280a330407be75f8f9899e59391322fb9253b97aecd044fc642964 spext_vitb8_s2_pretrain.safetensors
|
| 3 |
+
128d60c534a66cb2e51aee70f8324e95ddb940522ec69ceaa201b73004734c74 ssl4eos12_anchor_metadata.tar.gz
|
architecture.png
ADDED
|
Git LFS Details
|
spext_vitb8_s2.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:96845b0e0902dddc5421435680cecdc63f962cf7638931699b3060c3f774aeb0
|
| 3 |
+
size 353244648
|
spext_vitb8_s2_pretrain.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:13146c97e5280a330407be75f8f9899e59391322fb9253b97aecd044fc642964
|
| 3 |
+
size 564679896
|
ssl4eos12_anchor_metadata.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:128d60c534a66cb2e51aee70f8324e95ddb940522ec69ceaa201b73004734c74
|
| 3 |
+
size 40994804
|