rs-embed 0.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- rs_embed-0.1.1/.gitignore +20 -0
- rs_embed-0.1.1/CHANGELOG.md +43 -0
- rs_embed-0.1.1/LICENSE +201 -0
- rs_embed-0.1.1/PKG-INFO +241 -0
- rs_embed-0.1.1/README.md +184 -0
- rs_embed-0.1.1/pyproject.toml +135 -0
- rs_embed-0.1.1/src/rs_embed/__init__.py +72 -0
- rs_embed-0.1.1/src/rs_embed/__main__.py +8 -0
- rs_embed-0.1.1/src/rs_embed/_version.py +1 -0
- rs_embed-0.1.1/src/rs_embed/api.py +500 -0
- rs_embed-0.1.1/src/rs_embed/cli.py +308 -0
- rs_embed-0.1.1/src/rs_embed/core/__init__.py +17 -0
- rs_embed-0.1.1/src/rs_embed/core/embedding.py +26 -0
- rs_embed-0.1.1/src/rs_embed/core/errors.py +22 -0
- rs_embed-0.1.1/src/rs_embed/core/registry.py +152 -0
- rs_embed-0.1.1/src/rs_embed/core/specs.py +518 -0
- rs_embed-0.1.1/src/rs_embed/core/types.py +362 -0
- rs_embed-0.1.1/src/rs_embed/core/validation.py +123 -0
- rs_embed-0.1.1/src/rs_embed/embedders/__init__.py +39 -0
- rs_embed-0.1.1/src/rs_embed/embedders/_vendor/LICENSE.agrifm +201 -0
- rs_embed-0.1.1/src/rs_embed/embedders/_vendor/LICENSE.dofa +21 -0
- rs_embed-0.1.1/src/rs_embed/embedders/_vendor/LICENSE.fomo +24 -0
- rs_embed-0.1.1/src/rs_embed/embedders/_vendor/LICENSE.galileo +24 -0
- rs_embed-0.1.1/src/rs_embed/embedders/_vendor/LICENSE.prithvi +12 -0
- rs_embed-0.1.1/src/rs_embed/embedders/_vendor/LICENSE.satmaepp +201 -0
- rs_embed-0.1.1/src/rs_embed/embedders/_vendor/LICENSE.terrafm +201 -0
- rs_embed-0.1.1/src/rs_embed/embedders/_vendor/LICENSE.thor +23 -0
- rs_embed-0.1.1/src/rs_embed/embedders/_vendor/LICENSE.thor_terratorch_ext +201 -0
- rs_embed-0.1.1/src/rs_embed/embedders/_vendor/LICENSE.torchgeo +21 -0
- rs_embed-0.1.1/src/rs_embed/embedders/_vendor/__init__.py +1 -0
- rs_embed-0.1.1/src/rs_embed/embedders/_vendor/agrifm_video_swin_transformer.py +1058 -0
- rs_embed-0.1.1/src/rs_embed/embedders/_vendor/anysat/LICENSE +21 -0
- rs_embed-0.1.1/src/rs_embed/embedders/_vendor/anysat/__init__.py +0 -0
- rs_embed-0.1.1/src/rs_embed/embedders/_vendor/anysat/hubconf.py +315 -0
- rs_embed-0.1.1/src/rs_embed/embedders/_vendor/anysat/src/__init__.py +0 -0
- rs_embed-0.1.1/src/rs_embed/embedders/_vendor/anysat/src/models/__init__.py +0 -0
- rs_embed-0.1.1/src/rs_embed/embedders/_vendor/anysat/src/models/networks/__init__.py +0 -0
- rs_embed-0.1.1/src/rs_embed/embedders/_vendor/anysat/src/models/networks/encoder/Any_multi.py +277 -0
- rs_embed-0.1.1/src/rs_embed/embedders/_vendor/anysat/src/models/networks/encoder/Transformer.py +427 -0
- rs_embed-0.1.1/src/rs_embed/embedders/_vendor/anysat/src/models/networks/encoder/__init__.py +0 -0
- rs_embed-0.1.1/src/rs_embed/embedders/_vendor/anysat/src/models/networks/encoder/utils/__init__.py +0 -0
- rs_embed-0.1.1/src/rs_embed/embedders/_vendor/anysat/src/models/networks/encoder/utils/irpe.py +961 -0
- rs_embed-0.1.1/src/rs_embed/embedders/_vendor/anysat/src/models/networks/encoder/utils/ltae.py +337 -0
- rs_embed-0.1.1/src/rs_embed/embedders/_vendor/anysat/src/models/networks/encoder/utils/patch_embeddings.py +81 -0
- rs_embed-0.1.1/src/rs_embed/embedders/_vendor/anysat/src/models/networks/encoder/utils/pos_embed.py +122 -0
- rs_embed-0.1.1/src/rs_embed/embedders/_vendor/anysat/src/models/networks/encoder/utils/utils.py +193 -0
- rs_embed-0.1.1/src/rs_embed/embedders/_vendor/anysat/src/models/networks/encoder/utils/utils_ViT.py +551 -0
- rs_embed-0.1.1/src/rs_embed/embedders/_vendor/copernicus_embed.py +339 -0
- rs_embed-0.1.1/src/rs_embed/embedders/_vendor/dofa_vit.py +132 -0
- rs_embed-0.1.1/src/rs_embed/embedders/_vendor/dofa_wave_dynamic_layer.py +165 -0
- rs_embed-0.1.1/src/rs_embed/embedders/_vendor/fomo_multimodal_mae.py +164 -0
- rs_embed-0.1.1/src/rs_embed/embedders/_vendor/galileo_single_file.py +1185 -0
- rs_embed-0.1.1/src/rs_embed/embedders/_vendor/prithvi_mae.py +766 -0
- rs_embed-0.1.1/src/rs_embed/embedders/_vendor/satmaepp_s2/__init__.py +1 -0
- rs_embed-0.1.1/src/rs_embed/embedders/_vendor/satmaepp_s2/models_mae_group_channels.py +465 -0
- rs_embed-0.1.1/src/rs_embed/embedders/_vendor/satmaepp_s2/util/__init__.py +1 -0
- rs_embed-0.1.1/src/rs_embed/embedders/_vendor/satmaepp_s2/util/pos_embed.py +117 -0
- rs_embed-0.1.1/src/rs_embed/embedders/_vendor/terrafm.py +377 -0
- rs_embed-0.1.1/src/rs_embed/embedders/_vendor/thor/__init__.py +2 -0
- rs_embed-0.1.1/src/rs_embed/embedders/_vendor/thor/core/__init__.py +2 -0
- rs_embed-0.1.1/src/rs_embed/embedders/_vendor/thor/core/model_registry.py +165 -0
- rs_embed-0.1.1/src/rs_embed/embedders/_vendor/thor/models/__init__.py +5 -0
- rs_embed-0.1.1/src/rs_embed/embedders/_vendor/thor/models/patch_timm.py +110 -0
- rs_embed-0.1.1/src/rs_embed/embedders/_vendor/thor/models/thor_vit.py +1103 -0
- rs_embed-0.1.1/src/rs_embed/embedders/_vendor/thor/utils/__init__.py +2 -0
- rs_embed-0.1.1/src/rs_embed/embedders/_vendor/thor/utils/helper.py +23 -0
- rs_embed-0.1.1/src/rs_embed/embedders/_vendor/thor/utils/patch_embed.py +1311 -0
- rs_embed-0.1.1/src/rs_embed/embedders/_vendor/thor/utils/pos_embed.py +162 -0
- rs_embed-0.1.1/src/rs_embed/embedders/_vendor/thor_vit.py +556 -0
- rs_embed-0.1.1/src/rs_embed/embedders/_vit_mae_utils.py +241 -0
- rs_embed-0.1.1/src/rs_embed/embedders/base.py +328 -0
- rs_embed-0.1.1/src/rs_embed/embedders/catalog.py +52 -0
- rs_embed-0.1.1/src/rs_embed/embedders/config_utils.py +31 -0
- rs_embed-0.1.1/src/rs_embed/embedders/meta_utils.py +137 -0
- rs_embed-0.1.1/src/rs_embed/embedders/onthefly_agrifm.py +852 -0
- rs_embed-0.1.1/src/rs_embed/embedders/onthefly_anysat.py +702 -0
- rs_embed-0.1.1/src/rs_embed/embedders/onthefly_dofa.py +1157 -0
- rs_embed-0.1.1/src/rs_embed/embedders/onthefly_fomo.py +753 -0
- rs_embed-0.1.1/src/rs_embed/embedders/onthefly_galileo.py +778 -0
- rs_embed-0.1.1/src/rs_embed/embedders/onthefly_prithvi.py +1015 -0
- rs_embed-0.1.1/src/rs_embed/embedders/onthefly_remoteclip.py +1028 -0
- rs_embed-0.1.1/src/rs_embed/embedders/onthefly_satmae.py +524 -0
- rs_embed-0.1.1/src/rs_embed/embedders/onthefly_satmaepp.py +766 -0
- rs_embed-0.1.1/src/rs_embed/embedders/onthefly_satmaepp_s2.py +1108 -0
- rs_embed-0.1.1/src/rs_embed/embedders/onthefly_satvision_toa.py +1306 -0
- rs_embed-0.1.1/src/rs_embed/embedders/onthefly_scalemae.py +798 -0
- rs_embed-0.1.1/src/rs_embed/embedders/onthefly_terrafm.py +1043 -0
- rs_embed-0.1.1/src/rs_embed/embedders/onthefly_terramind.py +998 -0
- rs_embed-0.1.1/src/rs_embed/embedders/onthefly_thor.py +871 -0
- rs_embed-0.1.1/src/rs_embed/embedders/onthefly_wildsat.py +958 -0
- rs_embed-0.1.1/src/rs_embed/embedders/precomputed_copernicus_embed.py +294 -0
- rs_embed-0.1.1/src/rs_embed/embedders/precomputed_gse_annual.py +170 -0
- rs_embed-0.1.1/src/rs_embed/embedders/precomputed_tessera.py +451 -0
- rs_embed-0.1.1/src/rs_embed/embedders/runtime_utils.py +615 -0
- rs_embed-0.1.1/src/rs_embed/export.py +56 -0
- rs_embed-0.1.1/src/rs_embed/inspect.py +104 -0
- rs_embed-0.1.1/src/rs_embed/model.py +246 -0
- rs_embed-0.1.1/src/rs_embed/pipelines/__init__.py +33 -0
- rs_embed-0.1.1/src/rs_embed/pipelines/checkpoint.py +285 -0
- rs_embed-0.1.1/src/rs_embed/pipelines/combined_flow.py +329 -0
- rs_embed-0.1.1/src/rs_embed/pipelines/exporter.py +781 -0
- rs_embed-0.1.1/src/rs_embed/pipelines/inference.py +674 -0
- rs_embed-0.1.1/src/rs_embed/pipelines/point_payload.py +320 -0
- rs_embed-0.1.1/src/rs_embed/pipelines/prefetch.py +288 -0
- rs_embed-0.1.1/src/rs_embed/pipelines/runner.py +90 -0
- rs_embed-0.1.1/src/rs_embed/providers/__init__.py +93 -0
- rs_embed-0.1.1/src/rs_embed/providers/base.py +334 -0
- rs_embed-0.1.1/src/rs_embed/providers/gee.py +620 -0
- rs_embed-0.1.1/src/rs_embed/providers/gee_utils.py +392 -0
- rs_embed-0.1.1/src/rs_embed/providers/prefetch_plan.py +157 -0
- rs_embed-0.1.1/src/rs_embed/tools/__init__.py +21 -0
- rs_embed-0.1.1/src/rs_embed/tools/checkpoint_utils.py +135 -0
- rs_embed-0.1.1/src/rs_embed/tools/export_requests.py +166 -0
- rs_embed-0.1.1/src/rs_embed/tools/inspection.py +343 -0
- rs_embed-0.1.1/src/rs_embed/tools/manifest.py +146 -0
- rs_embed-0.1.1/src/rs_embed/tools/model_defaults.py +307 -0
- rs_embed-0.1.1/src/rs_embed/tools/normalization.py +112 -0
- rs_embed-0.1.1/src/rs_embed/tools/output.py +107 -0
- rs_embed-0.1.1/src/rs_embed/tools/progress.py +56 -0
- rs_embed-0.1.1/src/rs_embed/tools/runtime.py +475 -0
- rs_embed-0.1.1/src/rs_embed/tools/serialization.py +101 -0
- rs_embed-0.1.1/src/rs_embed/tools/temporal.py +65 -0
- rs_embed-0.1.1/src/rs_embed/tools/tiling.py +683 -0
- rs_embed-0.1.1/src/rs_embed/writers.py +235 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
data/
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
.ruff_cache/
|
|
5
|
+
*.egg-info/
|
|
6
|
+
dist/
|
|
7
|
+
build/
|
|
8
|
+
.pytest_cache/
|
|
9
|
+
.mypy_cache/
|
|
10
|
+
_gee_checks/
|
|
11
|
+
exports/
|
|
12
|
+
examples/**
|
|
13
|
+
|
|
14
|
+
!examples/
|
|
15
|
+
|
|
16
|
+
!examples/playground.ipynb
|
|
17
|
+
!examples/plot_utils.py
|
|
18
|
+
!examples/quickstart.py
|
|
19
|
+
!examples/demo.ipynb
|
|
20
|
+
!examples/utils_demo.py
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `rs-embed` will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The project keeps this changelog as the canonical release record. GitHub Releases should summarize the same versioned changes rather than introducing a second source of truth.
|
|
6
|
+
|
|
7
|
+
The format is based on Keep a Changelog, and the project follows Semantic Versioning with extra care around model and embedding semantics.
|
|
8
|
+
|
|
9
|
+
## [Unreleased]
|
|
10
|
+
|
|
11
|
+
## [0.1.1] - 2026-04-01
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
- Automated pull request changelog enforcement with a `skip-changelog` escape hatch for docs, tests, CI, and other internal-only changes.
|
|
15
|
+
- Tag-driven GitHub Release publishing that uses the matching `CHANGELOG.md` section as the release notes.
|
|
16
|
+
- Trusted Publishing release automation for PyPI and TestPyPI, including a manual TestPyPI dry run and install smoke test.
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
- The contribution and release workflow now treats `CHANGELOG.md` as the canonical source for user-visible release notes.
|
|
20
|
+
- The tag-triggered release flow now validates `src/rs_embed/_version.py`, publishes to PyPI, and only then creates the GitHub Release.
|
|
21
|
+
- The tag-triggered release flow now validates the matching `CHANGELOG.md` entry before publishing to PyPI, so a missing release-notes section fails early instead of after package upload.
|
|
22
|
+
- The base package installation now includes the Copernicus GeoTIFF runtime (`tifffile` and `imagecodecs`) instead of requiring a separate extra.
|
|
23
|
+
- The public docs now default to `pip install rs-embed` for published releases while keeping editable installs documented for repository development.
|
|
24
|
+
|
|
25
|
+
### Deprecated
|
|
26
|
+
|
|
27
|
+
### Removed
|
|
28
|
+
|
|
29
|
+
### Fixed
|
|
30
|
+
- The TestPyPI smoke test now verifies package importability and the `rs-embed` CLI entry point, not just installability and version metadata.
|
|
31
|
+
|
|
32
|
+
## [0.1.0] - 2026-03-31
|
|
33
|
+
|
|
34
|
+
### Added
|
|
35
|
+
- Initial public alpha release of `rs-embed`.
|
|
36
|
+
- Unified ROI to embedding API centered on `get_embedding(...)`, `get_embeddings_batch(...)`, `export_batch(...)`, and `inspect_provider_patch(...)`.
|
|
37
|
+
- Support for precomputed embedding products including `tessera`, `gse`, and `copernicus`.
|
|
38
|
+
- Support for on-the-fly model adapters including `satmae`, `satmaepp`, `satmaepp_s2_10b`, `prithvi`, `scalemae`, `remoteclip`, `dofa`, `satvision`, `anysat`, `galileo`, `wildsat`, `fomo`, `terramind`, `terrafm`, `thor`, and `agrifm`.
|
|
39
|
+
- Documentation site covering quickstart, model behavior, API contracts, and extension guidance.
|
|
40
|
+
|
|
41
|
+
[Unreleased]: https://github.com/cybergis/rs-embed/compare/v0.1.1...HEAD
|
|
42
|
+
[0.1.1]: https://github.com/cybergis/rs-embed/releases/tag/v0.1.1
|
|
43
|
+
[0.1.0]: https://github.com/cybergis/rs-embed/releases/tag/v0.1.0
|
rs_embed-0.1.1/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [Dingqi] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
rs_embed-0.1.1/PKG-INFO
ADDED
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: rs-embed
|
|
3
|
+
Version: 0.1.1
|
|
4
|
+
Summary: Unified ROI->embedding interface for remote sensing foundation models.
|
|
5
|
+
Project-URL: Homepage, https://github.com/cybergis/rs-embed
|
|
6
|
+
Project-URL: Documentation, https://cybergis.github.io/rs-embed/
|
|
7
|
+
Project-URL: Repository, https://github.com/cybergis/rs-embed
|
|
8
|
+
Project-URL: Issues, https://github.com/cybergis/rs-embed/issues
|
|
9
|
+
Project-URL: Changelog, https://github.com/cybergis/rs-embed/blob/main/CHANGELOG.md
|
|
10
|
+
Project-URL: Releases, https://github.com/cybergis/rs-embed/releases
|
|
11
|
+
Author: Dingqi Ye
|
|
12
|
+
License-Expression: Apache-2.0
|
|
13
|
+
License-File: LICENSE
|
|
14
|
+
Keywords: earth observation,embeddings,foundation models,geospatial,remote sensing
|
|
15
|
+
Classifier: Development Status :: 3 - Alpha
|
|
16
|
+
Classifier: Intended Audience :: Science/Research
|
|
17
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
21
|
+
Classifier: Topic :: Scientific/Engineering :: GIS
|
|
22
|
+
Requires-Python: >=3.12
|
|
23
|
+
Requires-Dist: affine>=2.4
|
|
24
|
+
Requires-Dist: earthengine-api>=1.7.10
|
|
25
|
+
Requires-Dist: einops>=0.7
|
|
26
|
+
Requires-Dist: geemap>=0.36.6
|
|
27
|
+
Requires-Dist: geotessera
|
|
28
|
+
Requires-Dist: huggingface-hub>=1.3.2
|
|
29
|
+
Requires-Dist: imagecodecs>=2024.0.0
|
|
30
|
+
Requires-Dist: numpy>=2.2
|
|
31
|
+
Requires-Dist: pandas>=2.3
|
|
32
|
+
Requires-Dist: pillow>=10
|
|
33
|
+
Requires-Dist: pyproj>=3.6
|
|
34
|
+
Requires-Dist: rshf>=0.1.12
|
|
35
|
+
Requires-Dist: tifffile>=2024.0.0
|
|
36
|
+
Requires-Dist: timm<=1.0.15,>=1.0.3
|
|
37
|
+
Requires-Dist: torch>=2.2
|
|
38
|
+
Requires-Dist: torchvision>=0.17
|
|
39
|
+
Requires-Dist: xarray>=2024.06.0
|
|
40
|
+
Provides-Extra: copernicus
|
|
41
|
+
Provides-Extra: dev
|
|
42
|
+
Requires-Dist: pre-commit>=3.0; extra == 'dev'
|
|
43
|
+
Requires-Dist: pytest-cov>=4.1; extra == 'dev'
|
|
44
|
+
Requires-Dist: pytest-xdist>=3.0; extra == 'dev'
|
|
45
|
+
Requires-Dist: pytest>=7.4; extra == 'dev'
|
|
46
|
+
Requires-Dist: ruff>=0.5.0; extra == 'dev'
|
|
47
|
+
Provides-Extra: full
|
|
48
|
+
Requires-Dist: matplotlib>=3.10; extra == 'full'
|
|
49
|
+
Requires-Dist: terratorch==1.2.1; extra == 'full'
|
|
50
|
+
Provides-Extra: plot
|
|
51
|
+
Requires-Dist: matplotlib>=3.10; extra == 'plot'
|
|
52
|
+
Provides-Extra: terramind
|
|
53
|
+
Requires-Dist: terratorch==1.2.1; extra == 'terramind'
|
|
54
|
+
Provides-Extra: terratorch
|
|
55
|
+
Requires-Dist: terratorch==1.2.1; extra == 'terratorch'
|
|
56
|
+
Description-Content-Type: text/markdown
|
|
57
|
+
|
|
58
|
+
<div align="center">
|
|
59
|
+
|
|
60
|
+
# <img src="https://raw.githubusercontent.com/cybergis/rs-embed/main/docs/assets/icon.png" width="35" alt="icon" /> rs-embed
|
|
61
|
+
**One line code to get Any Remote Sensing Foundation Model (RSFM) embeddings for Any Place and Any Time**
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
[](https://arxiv.org/abs/2602.23678)
|
|
65
|
+
[](https://cybergis.github.io/rs-embed/)
|
|
66
|
+

|
|
67
|
+
[](https://pytorch.org/)
|
|
68
|
+
|
|
69
|
+

|
|
70
|
+

|
|
71
|
+

|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
[Docs](https://cybergis.github.io/rs-embed/) ยท [Releases](https://github.com/cybergis/rs-embed/releases) ยท [Changelog](https://github.com/cybergis/rs-embed/blob/main/CHANGELOG.md) ยท [StartNow](https://github.com/cybergis/rs-embed/blob/main/examples/playground.ipynb) ยท [UseCase](https://github.com/cybergis/rs-embed/blob/main/examples/demo.ipynb) ยท [Paper](https://arxiv.org/abs/2602.23678)
|
|
76
|
+
|
|
77
|
+
</div>
|
|
78
|
+
|
|
79
|
+
> Get Start on [I-GUIDE](https://platform.i-guide.io/notebooks/a013ce97-d963-4262-9f21-edd09976181a) Today!
|
|
80
|
+
|
|
81
|
+
<img src="https://raw.githubusercontent.com/cybergis/rs-embed/main/docs/assets/background.png" />
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
## TL;DR
|
|
87
|
+
|
|
88
|
+
```python
|
|
89
|
+
emb = get_embedding("prithvi", spatial=..., temporal=..., output=...)
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
## Install
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
# base install
|
|
97
|
+
pip install rs-embed
|
|
98
|
+
|
|
99
|
+
# add [terratorch] only if you use terramind
|
|
100
|
+
pip install "rs-embed[terratorch]"
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
For local development:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
git clone https://github.com/cybergis/rs-embed.git
|
|
107
|
+
cd rs-embed
|
|
108
|
+
pip install -e . # use -e ".[terratorch]" if you need terramind
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
If this is your first time using Google Earth Engine, authenticate once:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
earthengine authenticate
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
## Quick Example
|
|
120
|
+
```python
|
|
121
|
+
from rs_embed import PointBuffer, TemporalSpec, OutputSpec, get_embedding
|
|
122
|
+
|
|
123
|
+
spatial = PointBuffer(lon=121.5, lat=31.2, buffer_m=2048)
|
|
124
|
+
temporal = TemporalSpec.range(
|
|
125
|
+
"2022-06-01",
|
|
126
|
+
"2022-09-01",
|
|
127
|
+
)
|
|
128
|
+
|
|
129
|
+
emb = get_embedding(
|
|
130
|
+
"prithvi",
|
|
131
|
+
spatial=spatial,
|
|
132
|
+
temporal=temporal,
|
|
133
|
+
output=OutputSpec.pooled(),
|
|
134
|
+
)
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
See the visualization helper and end-to-end notebook in the repository:
|
|
139
|
+
|
|
140
|
+
- [`examples/plot_utils.py`](https://github.com/cybergis/rs-embed/blob/main/examples/plot_utils.py)
|
|
141
|
+
- [`examples/playground.ipynb`](https://github.com/cybergis/rs-embed/blob/main/examples/playground.ipynb)
|
|
142
|
+
|
|
143
|
+
<img src="https://raw.githubusercontent.com/cybergis/rs-embed/main/docs/assets/vis.png" width=650 />
|
|
144
|
+
|
|
145
|
+
## Main API
|
|
146
|
+
|
|
147
|
+
For new users, start with these primary APIs:
|
|
148
|
+
|
|
149
|
+
- `get_embedding(...)`: one ROI -> one embedding
|
|
150
|
+
- `get_embeddings_batch(...)`: many ROIs, same model
|
|
151
|
+
- `export_batch(...)`: export datasets / experiments (single or multiple ROIs)
|
|
152
|
+
- `inspect_provider_patch(...)`: inspect raw provider patches before inference
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
## Supported Models
|
|
156
|
+
|
|
157
|
+
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](https://cybergis.github.io/rs-embed/models/).
|
|
158
|
+
|
|
159
|
+
### Precomputed Embeddings
|
|
160
|
+
|
|
161
|
+
| Model ID | Resolution | Time Coverage | Publication |
|
|
162
|
+
|---|---|---|---|
|
|
163
|
+
|`tessera` | 10m | 2017-2025 |[CVPR 2026](https://arxiv.org/abs/2506.20380v4)|
|
|
164
|
+
|`gse` (Alpha Earth) | 10 m | 2017-2024 |[arXiv 2025](https://arxiv.org/abs/2507.22291)|
|
|
165
|
+
| `copernicus` | 0.25ยฐ | 2021 |[ICCV 2025](https://arxiv.org/abs/2503.11849)|
|
|
166
|
+
|
|
167
|
+
### On-the-fly Foundation Models
|
|
168
|
+
|
|
169
|
+
| Model ID | Primary Input | Resolution(Default) | Publication | Link |
|
|
170
|
+
|---|---|---|---|---|
|
|
171
|
+
| `satmae` | S2 RGB | 10m | [NeurIPS 2022](https://arxiv.org/abs/2207.08051) |[link](https://github.com/sustainlab-group/SatMAE)|
|
|
172
|
+
| `satmaepp` | S2 RGB | 10m | [CVPR 2024](https://arxiv.org/abs/2403.05419) | [link](https://github.com/techmn/satmae_pp) |
|
|
173
|
+
| `satmaepp_s2_10b` | S2 SR 10-band | 10m | [CVPR 2024](https://arxiv.org/abs/2403.05419) | [link](https://github.com/techmn/satmae_pp) |
|
|
174
|
+
| `prithvi` | S2 6-band | 30m | [arXiv 2023](https://arxiv.org/abs/2310.18660) | [link](https://huggingface.co/ibm-nasa-geospatial) |
|
|
175
|
+
| `scalemae` | S2 RGB (+ scale) | 10m | [ICCV 2023](https://arxiv.org/abs/2212.14532) | [link](https://github.com/bair-climate-initiative/scale-mae) |
|
|
176
|
+
| `remoteclip` | S2 RGB | 10m | [TGRS 2024](https://arxiv.org/abs/2306.11029) |[link](https://github.com/ChenDelong1999/RemoteCLIP) |
|
|
177
|
+
| `dofa` | Multi-band + wavelengths | 10m | [arXiv 2024](https://arxiv.org/abs/2403.15356) | [link](https://github.com/zhu-xlab/DOFA) |
|
|
178
|
+
| `satvision` | TOA 14-channel | 1000m | [arXiv 2024](https://arxiv.org/abs/2411.17000) | [link](https://github.com/nasa-nccs-hpda/pytorch-caney)|
|
|
179
|
+
| `anysat` | S2 time series (10-band) | 10m | [CVPR 2025](https://arxiv.org/abs/2412.14123) | [link](https://github.com/gastruc/AnySat) |
|
|
180
|
+
| `galileo` | S2 time series (10-band) | 10m | [ICML 2025](https://arxiv.org/abs/2502.09356) | [link](https://github.com/nasaharvest/galileo) |
|
|
181
|
+
| `wildsat` | S2 RGB | 10m | [ICCV 2025](https://arxiv.org/abs/2412.14428) | [link](https://github.com/mdchuc/HRSFM) |
|
|
182
|
+
| `fomo` | S2 12-band | 10m | [AAAI 2025](https://arxiv.org/abs/2312.10114) |[link](https://github.com/RolnickLab/FoMo-Bench)|
|
|
183
|
+
| `terramind` | S2 12-band | 10m | [ICCV 2025](https://arxiv.org/abs/2504.11171) | [link](https://github.com/IBM/terramind) |
|
|
184
|
+
| `terrafm` | S2 12-band / S1 VV-VH | 10m | [ICLR 2026](https://arxiv.org/abs/2506.06281) | [link](https://github.com/mbzuai-oryx/TerraFM) |
|
|
185
|
+
| `thor` | S2 10-band | 10m | [arXiv 2026](https://arxiv.org/abs/2601.16011) | [link](https://github.com/FM4CS/THOR) |
|
|
186
|
+
| `agrifm` | S2 time series (10-band) | 10m | [RSE 2026](https://www.sciencedirect.com/science/article/pii/S0034425726000040) | [link](https://github.com/flyakon/AgriFM) |
|
|
187
|
+
|
|
188
|
+
Resolution here means the default provider/source fetch resolution used by the adapter, not the final resized tensor shape seen by the model.
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
## Learn More
|
|
194
|
+
|
|
195
|
+
๐ [Full documentation](https://cybergis.github.io/rs-embed/)
|
|
196
|
+
|
|
197
|
+
๐งพ [Release policy and versioning](https://cybergis.github.io/rs-embed/releases/)
|
|
198
|
+
|
|
199
|
+
๐ [Project changelog](https://github.com/cybergis/rs-embed/blob/main/CHANGELOG.md)
|
|
200
|
+
|
|
201
|
+
๐ช [Get Started: Try `rs-embed` Now](https://github.com/cybergis/rs-embed/blob/main/examples/playground.ipynb)
|
|
202
|
+
|
|
203
|
+
๐ช [Use case: Maize yield mapping Illinois](https://github.com/cybergis/rs-embed/blob/main/examples/demo.ipynb)
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
## Extending & Contributing
|
|
207
|
+
|
|
208
|
+
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](https://github.com/cybergis/rs-embed/issues) and share the relevant links, context, and examples.
|
|
209
|
+
|
|
210
|
+
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`](https://cybergis.github.io/rs-embed/extending/) guide and the [contributing guide](https://cybergis.github.io/rs-embed/contributing/).
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
## ๐ Acknowledgements
|
|
215
|
+
We would like to thank the following organizations and projects that make rs-embed possible: [Google Earth Engine](https://earthengine.google.com), [TorchGeo](https://github.com/torchgeo/torchgeo), [GeoTessera](https://github.com/ucam-eo/geotessera), [TerraTorch](https://github.com/terrastackai/terratorch), [rshf](https://github.com/mvrl/rshf), and the [Copernicus-Embed](https://huggingface.co/datasets/torchgeo/copernicus_embed).
|
|
216
|
+
|
|
217
|
+
This library also builds upon the incredible work of the Remote Sensing community!(Full list and citations available in our Documentation)
|
|
218
|
+
|
|
219
|
+
## Citation
|
|
220
|
+
```
|
|
221
|
+
@article{ye2026modelplacetimeremote,
|
|
222
|
+
title={Any Model, Any Place, Any Time: Get Remote Sensing Foundation Model Embeddings On Demand},
|
|
223
|
+
author={Dingqi Ye and Daniel Kiv and Wei Hu and Jimeng Shi and Shaowen Wang},
|
|
224
|
+
year={2026},
|
|
225
|
+
eprint={2602.23678},
|
|
226
|
+
archivePrefix={arXiv},
|
|
227
|
+
primaryClass={cs.CV},
|
|
228
|
+
url={https://arxiv.org/abs/2602.23678},
|
|
229
|
+
}
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
## License
|
|
234
|
+
This project is released under the [Apache-2.0](https://github.com/cybergis/rs-embed/blob/main/LICENSE)
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
## Contributors
|
|
238
|
+
|
|
239
|
+
<a href="https://github.com/cybergis/rs-embed/graphs/contributors">
|
|
240
|
+
<img src="https://contrib.rocks/image?repo=cybergis/rs-embed" />
|
|
241
|
+
</a>
|