How cybergis/rs-embed works
rs-embed is a Python library and API for producing remote-sensing foundation-model embeddings from geographic/time requests or user-supplied imagery. The principal workflow is request specification → provider imagery fetch → model input preparation/inference → embedding result; batch and export workflows add orchestration and output writing. The README documents these capabilities, while sampled source/index evidence supports selected internal calls. Some API and model implementations were not fully sampled, so uncertain links are omitted.
Main entry points: api.py Public API · embedders Model adapters · fetch.py Fetch and normalize · inference.py Export inference
Components 22
Public interface
- Public API
src/rs_embed/api.py - Command line
src/rs_embed/cli.py
Request and runtime
- Request specs
src/rs_embed/core/specs.py - Input validation
src/rs_embed/core/validation.py - Embedder runtime
src/rs_embed/tools/runtime.py - Shape preparation
src/rs_embed/tools/shape.py - Tiling and stitching
src/rs_embed/tools/tiling.py
Imagery access
- Provider selection
src/rs_embed/providers/resolution.py - Provider adapters
src/rs_embed/providers - Fetch and normalize
src/rs_embed/providers/fetch.py - Patch inspection
src/rs_embed/tools/inspection.py
Model execution
- Model registry
src/rs_embed/core/registry.py - Model catalog
src/rs_embed/embedders/catalog.py - Model adapters
src/rs_embed/embedders - Model architectures
src/rs_embed/embedders/_vendor - Embedding result
src/rs_embed/core/embedding.py
Batch and export
- Export inference
src/rs_embed/pipelines/inference.py - Batch exporter
src/rs_embed/pipelines/exporter.py - Output writers
src/rs_embed/writers.py
Other components
- Python caller
- Google Earth Engine
- User imagery
Connections 25
- Python caller → Public API: requests embeddings
- Python caller → Command line: runs commands
- Public API → Request specs: accepts specs
src/rs_embed/api.py - Public API → Model registry: queries models
src/rs_embed/api.py - Public API → Fetch and normalize: requests patches
src/rs_embed/api.py - Public API → Patch inspection: inspects patches
src/rs_embed/api.py - Public API → Batch exporter: starts exports
src/rs_embed/api.py - Public API → Embedder runtime: dispatches inference
src/rs_embed/api.py - Public API → Export inference: runs batch inference
- Model registry → Model catalog: loads catalog
src/rs_embed/core/registry.py - Embedder runtime → Model registry: resolves model
src/rs_embed/tools/runtime.py - Embedder runtime → Model adapters: dispatches model
src/rs_embed/tools/runtime.py - Model adapters → Model architectures: uses architectures
src/rs_embed/embedders/onthefly_prithvi.py - Model adapters → Fetch and normalize: fetches model input
src/rs_embed/embedders/base.py - Model adapters → Shape preparation: prepares input
src/rs_embed/embedders/base.py - User imagery → Public API: supplies imagery
- Provider selection → Provider adapters: resolves backend
src/rs_embed/providers/resolution.py - Provider adapters → Google Earth Engine: fetches imagery
src/rs_embed/providers/__init__.py - Fetch and normalize → Provider adapters: calls provider
src/rs_embed/providers/fetch.py - Fetch and normalize → Patch inspection: checks patches
src/rs_embed/providers/fetch.py - Tiling and stitching → Shape preparation: uses shape helpers
src/rs_embed/tools/tiling.py - Batch exporter → Export inference: invokes inference
src/rs_embed/pipelines/exporter.py - Batch exporter → Output writers: writes outputs
src/rs_embed/pipelines/exporter.py - Export inference → Tiling and stitching: tiles inputs
src/rs_embed/pipelines/inference.py - Export inference → Embedding result: returns embeddings
src/rs_embed/pipelines/inference.py