cybergis/rs-embed

One line code to get any remote sensing foundation model embeddings for any place and any time

Python

159

597 commits

updated Sep 27, 2026

See the code

README

icon rs-embed

One line code to get Any Remote Sensing Foundation Model (RSFM) embeddings for Any Place and Any Time

arXiv Docs Python PyTorch 2.7

Visitors Last Commit License PyPI Downloads

Docs · StartNow · Releases · Changelog · UseCase · Paper

Get Start on I-GUIDE Today!

TL;DR

emb = get_embedding("prithvi", spatial=..., temporal=..., output=...)

Install

# base install (always use the latest version for best experience)
pip install --upgrade rs-embed

# add [terratorch] only if you use terramind
pip install --upgrade "rs-embed[terratorch]"

For local development:

git clone https://github.com/cybergis/rs-embed.git
cd rs-embed
pip install -e .  # use -e ".[terratorch]" if you need terramind

If this is your first time using Google Earth Engine, authenticate once:

earthengine authenticate

Quick Example

from rs_embed import PointBuffer, TemporalSpec, OutputSpec, get_embedding

spatial = PointBuffer(lon=121.5, lat=31.2, buffer_m=2048)
temporal = TemporalSpec.range(
    "2022-06-01",
    "2022-09-01",
)

emb = get_embedding(
    "prithvi",
    spatial=spatial,
    temporal=temporal,
    output=OutputSpec.pooled(),
)

Tip: Default settings are designed as a trade-off between compute cost and embedding quality. If you have sufficient compute resources, check Choosing Settings and individual model pages to get the best results.

See the visualization helper and end-to-end notebook in the repository:

Bring Your Own Data

🆕 New: you can now compute embeddings from imagery you already have (your own patches, GeoTIFFs, training cubes), with no Google Earth Engine fetch and no provider auth.

Register the pixels once as UserData (raw provider values plus collection, band names, and optionally where/when they were acquired), then embed with just a model name:

from rs_embed import UserData, get_embedding_from_data, list_models_for_data

data = UserData(patch, collection="s2")  # patch: [12, H, W] Sentinel-2 L2A, raw DN
# or read pixels + CRS + transform straight from a GeoTIFF:
# data = UserData.from_raster("scene.tif", collection="s2")

list_models_for_data(data)                    # which models can use this data, and why not
emb = get_embedding_from_data("galileo", data)

Bands are matched to each model automatically (a 12-band cube serves RGB, 6-band, and 10-band models alike), and a model your data cannot satisfy is refused with the exact missing band instead of producing silently wrong embeddings. See the User-Provided Data guide and examples/bring_your_own_data.ipynb.

Main API

For new users, start with these primary APIs:

  • get_embedding(...): one ROI -> one embedding
  • get_embeddings_batch(...): many ROIs, same model
  • export_batch(...): export datasets / experiments (single or multiple ROIs)
  • inspect_provider_patch(...): inspect raw provider patches before inference
  • get_embedding_from_data(...) / get_embeddings_batch_from_data(...): embed your own imagery (see Bring Your Own Data)

Supported Models

This is a convenience index with basic model info only (for quick scanning / links). For detailed I/O behavior and preprocessing notes, see Supported Models.

Precomputed Embeddings

Model IDResolutionTime CoveragePublication
tessera10m2017-2025CVPR 2026
gse (Alpha Earth)10 m2017-2024arXiv 2025
copernicus0.25°2021ICCV 2025

On-the-fly Foundation Models

Model IDPrimary InputResolution(Default)PublicationLink
olmoearthS2 L2A 12-band / S1 VV-VH10mCVPR 2026link
agrifmS2 time series (10-band)10mRSE 2026link
thorS2 10-band10marXiv 2026link
terrafmS2 12-band / S1 VV-VH10mICLR 2026link
terramindS2 12-band10mICCV 2025link
galileoS2 time series (10-band)10mICML 2025link
wildsatS2 RGB10mICCV 2025link
anysatS2 time series (10-band)10mCVPR 2025link
fomoS2 12-band10mAAAI 2025link
prithviS2 6-band30marXiv 2024link
satvisionTOA 14-channel1000marXiv 2024link
dofaMulti-band + wavelengths10marXiv 2024link
clayS2 L2A 10-band (+ latlon/time/gsd/wavelengths)10mmodel release v1.5, 2024link
satmaeppS2 RGB (modality=rgb, default) or S2 SR 10-band (modality=s2_10b)10mCVPR 2024link
remoteclipS2 RGB10mTGRS 2024link
scalemaeS2 RGB (+ scale)10mICCV 2023link
satmaeS2 RGB10mNeurIPS 2022link

Resolution here means the default provider/source fetch resolution used by the adapter, not the final resized tensor shape seen by the model.

Learn More

📚 Full documentation

🪄 Get Started: Try rs-embed Now

🪀 Use case: Maize yield mapping Illinois

🗂️ Bring your own data: embed your own imagery

📢 Disscusion

🧾 Release policy and versioning

📌 Project changelog

Extending & Contributing

We welcome issues for new model integrations, extension ideas, bugs, and documentation gaps. If you have your own work, or a model or paper that you think would be valuable to include in rs-embed, please open an Issue and share the relevant links, context, and examples.

We also warmly welcome community contributions, including new model support, bug fixes, documentation improvements, and example notebooks. If you would like to contribute directly, please start with the extending guide and the contributing guide.

🎖 Acknowledgements

We would like to thank the following organizations and projects that make rs-embed possible: Google Earth Engine, TorchGeo, GeoTessera, TerraTorch, rshf, and the Copernicus-Embed.

This library also builds upon the incredible work of the Remote Sensing community!(Full list and citations available in our Documentation)

Citation

@article{ye2026modelplacetimeremote,
      title={Any Model, Any Place, Any Time: Get Remote Sensing Foundation Model Embeddings On Demand},
      author={Dingqi Ye and Daniel Kiv and Wei Hu and Jimeng Shi and Shaowen Wang},
      year={2026},
      eprint={2602.23678},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2602.23678},
}

License

This project is released under the Apache-2.0

Contributors

earth-observation
embeddings
geospatial
geospatial-foundation-model
remote-sensing
remote-sensing-foundation-model
representation-learning

cybergis/rs-embed

One line code to get any remote sensing foundation model embeddings for any place and any time

Python

159

597 commits

updated Sep 27, 2026

See the code

README

icon rs-embed

One line code to get Any Remote Sensing Foundation Model (RSFM) embeddings for Any Place and Any Time

arXiv Docs Python PyTorch 2.7

Visitors Last Commit License PyPI Downloads

Docs · StartNow · Releases · Changelog · UseCase · Paper

Get Start on I-GUIDE Today!

TL;DR

emb = get_embedding("prithvi", spatial=..., temporal=..., output=...)

Install

# base install (always use the latest version for best experience)
pip install --upgrade rs-embed

# add [terratorch] only if you use terramind
pip install --upgrade "rs-embed[terratorch]"

For local development:

git clone https://github.com/cybergis/rs-embed.git
cd rs-embed
pip install -e .  # use -e ".[terratorch]" if you need terramind

If this is your first time using Google Earth Engine, authenticate once:

earthengine authenticate

Quick Example

from rs_embed import PointBuffer, TemporalSpec, OutputSpec, get_embedding

spatial = PointBuffer(lon=121.5, lat=31.2, buffer_m=2048)
temporal = TemporalSpec.range(
    "2022-06-01",
    "2022-09-01",
)

emb = get_embedding(
    "prithvi",
    spatial=spatial,
    temporal=temporal,
    output=OutputSpec.pooled(),
)

Tip: Default settings are designed as a trade-off between compute cost and embedding quality. If you have sufficient compute resources, check Choosing Settings and individual model pages to get the best results.

See the visualization helper and end-to-end notebook in the repository:

Bring Your Own Data

🆕 New: you can now compute embeddings from imagery you already have (your own patches, GeoTIFFs, training cubes), with no Google Earth Engine fetch and no provider auth.

Register the pixels once as UserData (raw provider values plus collection, band names, and optionally where/when they were acquired), then embed with just a model name:

from rs_embed import UserData, get_embedding_from_data, list_models_for_data

data = UserData(patch, collection="s2")  # patch: [12, H, W] Sentinel-2 L2A, raw DN
# or read pixels + CRS + transform straight from a GeoTIFF:
# data = UserData.from_raster("scene.tif", collection="s2")

list_models_for_data(data)                    # which models can use this data, and why not
emb = get_embedding_from_data("galileo", data)

Bands are matched to each model automatically (a 12-band cube serves RGB, 6-band, and 10-band models alike), and a model your data cannot satisfy is refused with the exact missing band instead of producing silently wrong embeddings. See the User-Provided Data guide and examples/bring_your_own_data.ipynb.

Main API

For new users, start with these primary APIs:

  • get_embedding(...): one ROI -> one embedding
  • get_embeddings_batch(...): many ROIs, same model
  • export_batch(...): export datasets / experiments (single or multiple ROIs)
  • inspect_provider_patch(...): inspect raw provider patches before inference
  • get_embedding_from_data(...) / get_embeddings_batch_from_data(...): embed your own imagery (see Bring Your Own Data)

Supported Models

This is a convenience index with basic model info only (for quick scanning / links). For detailed I/O behavior and preprocessing notes, see Supported Models.

Precomputed Embeddings

Model IDResolutionTime CoveragePublication
tessera10m2017-2025CVPR 2026
gse (Alpha Earth)10 m2017-2024arXiv 2025
copernicus0.25°2021ICCV 2025

On-the-fly Foundation Models

Model IDPrimary InputResolution(Default)PublicationLink
olmoearthS2 L2A 12-band / S1 VV-VH10mCVPR 2026link
agrifmS2 time series (10-band)10mRSE 2026link
thorS2 10-band10marXiv 2026link
terrafmS2 12-band / S1 VV-VH10mICLR 2026link
terramindS2 12-band10mICCV 2025link
galileoS2 time series (10-band)10mICML 2025link
wildsatS2 RGB10mICCV 2025link
anysatS2 time series (10-band)10mCVPR 2025link
fomoS2 12-band10mAAAI 2025link
prithviS2 6-band30marXiv 2024link
satvisionTOA 14-channel1000marXiv 2024link
dofaMulti-band + wavelengths10marXiv 2024link
clayS2 L2A 10-band (+ latlon/time/gsd/wavelengths)10mmodel release v1.5, 2024link
satmaeppS2 RGB (modality=rgb, default) or S2 SR 10-band (modality=s2_10b)10mCVPR 2024link
remoteclipS2 RGB10mTGRS 2024link
scalemaeS2 RGB (+ scale)10mICCV 2023link
satmaeS2 RGB10mNeurIPS 2022link

Resolution here means the default provider/source fetch resolution used by the adapter, not the final resized tensor shape seen by the model.

Learn More

📚 Full documentation

🪄 Get Started: Try rs-embed Now

🪀 Use case: Maize yield mapping Illinois

🗂️ Bring your own data: embed your own imagery

📢 Disscusion

🧾 Release policy and versioning

📌 Project changelog

Extending & Contributing

We welcome issues for new model integrations, extension ideas, bugs, and documentation gaps. If you have your own work, or a model or paper that you think would be valuable to include in rs-embed, please open an Issue and share the relevant links, context, and examples.

We also warmly welcome community contributions, including new model support, bug fixes, documentation improvements, and example notebooks. If you would like to contribute directly, please start with the extending guide and the contributing guide.

🎖 Acknowledgements

We would like to thank the following organizations and projects that make rs-embed possible: Google Earth Engine, TorchGeo, GeoTessera, TerraTorch, rshf, and the Copernicus-Embed.

This library also builds upon the incredible work of the Remote Sensing community!(Full list and citations available in our Documentation)

Citation

@article{ye2026modelplacetimeremote,
      title={Any Model, Any Place, Any Time: Get Remote Sensing Foundation Model Embeddings On Demand},
      author={Dingqi Ye and Daniel Kiv and Wei Hu and Jimeng Shi and Shaowen Wang},
      year={2026},
      eprint={2602.23678},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2602.23678},
}

License

This project is released under the Apache-2.0

Contributors

earth-observation
embeddings
geospatial
geospatial-foundation-model
remote-sensing
remote-sensing-foundation-model
representation-learning

Languages

Python

100.0%