opensr
Sentinel-2 L2A (Planetary Computer) 10 m to 1 m RGB super-resolution for any set of locations and dates. The SEN2-SR model takes 10 m to 2.5 m; bicubic resampling plus sharpening then puts it on a 1 m grid. Detail finer than ~2.5 m is not recovered, so treat 1 m as a pixel size, not true resolution.
Each (location, date) pair becomes a 5.12 km GeoTIFF (5120 x 5120 px at 1 m); a run folder and a zip of it are written per call.
Install
pip install opensr-sr1m
# or, from a local checkout
pip install -e .
Use
import opensr.inferutils
# one location, one date -> opensr_out/output_2026-11-22_Phnom_Penh/ (+ .zip)
opensr.inferutils.run((104.9160, 11.5564), "2026-11-22", location="Phnom Penh")
# many locations x many dates (every combination is processed)
# -> /content/s2dr3_out/output_2026-10-16_to_2026-11-22_Cambodia/
results = opensr.inferutils.run(
[(105.392986, 14.121299), (104.9160, 11.5564)],
["2026-10-16", "2026-11-05", "2026-11-22"],
out_dir="/content/s2dr3_out",
location="Cambodia",
)
# CSV text or a CSV file path also work (lon first, lat second, header optional)
opensr.inferutils.run("points.csv", ["2026-11-22"])
Dates work like S2DR3 (Gamma Earth's
Sentinel-2 super-resolution): if Sentinel-2 passed over the point that day
(UTC date, as in the product name) that scene is used, cloudy or not;
otherwise (no pass, or the point falls in the black swath edge) the nearest
pass within +/- 10 days. A fallback is never silent: it prints
NOTE ... no usable pass on <date>, used <date>, the final line counts them,
and Result.scene_date holds the date actually used. That date is also in the
file name and the GeoTIFF scene_date tag; folder names and the date tag
keep the requested date.
Each call writes one folder (and a zip of it) named output_<date>_<location>.
If that name is already taken, the next run gets (1), (2), ...
(output_2026-11-22_Phnom_Penh(1)). Without location the folders are
output_<date>_run_1, output_<date>_run_2, ... Several dates in one call
give output_<first>_to_<last>_<location>.
run returns one Result per (location, date) with path (GeoTIFF),
scene_date (acquisition date used),
preview (PIL image: 10 m input | 1 m output, centre 1 km) and error
(set when that job failed). In Jupyter or Colab, run also draws every
preview inline under the progress output; in a plain script it only returns
the results.
The model weights download once to ~/.cache/opensr/ on the first call.
A GPU is used when available; CPU works but is slow.
Metadata
Release files for opensr-sr1m 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| opensr_sr1m-0.2.0.tar.gz | 11.3 kB | With provenance | Details for opensr_sr1m-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| opensr_sr1m-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for opensr_sr1m-0.2.0-py3-none-any.whl |
Total release size: 21.8 kB
Release files / opensr_sr1m-0.2.0.tar.gz
| Download URL | opensr_sr1m-0.2.0.tar.gz |
|---|---|
| Size | 11.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fe8aa6e1774476387196069bcf8f83b2cf269ea2d355937b4066f51ed1d57d9e
|
|
BLAKE2b-256 checksum How to use checksums |
4c91659280f96992ff2cbb1fb3c897fc74b60d868e477ce43e5bd325d63e7abb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.
Transparency logRelease files / opensr_sr1m-0.2.0-py3-none-any.whl
| Download URL | opensr_sr1m-0.2.0-py3-none-any.whl |
|---|---|
| Size | 10.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7215ef6bcd57fbe9c3746d21e516f399502e625af072e8703419bb8648ad9398
|
|
BLAKE2b-256 checksum How to use checksums |
e6b64a187bb92b44f6cee8a13fe783b15ab296710d90a27ba626f5de1af336f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.
Transparency logSecurity for opensr-sr1m 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for opensr_sr1m-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.