Skip to main content

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 -> output_2026-11-08_Phnom_Penh.tif
opensr.inferutils.run((104.9160, 11.5564), "2026-11-08", location="Phnom Penh")

# many locations x many dates (every combination is processed),
# one name per point -> output_2026-10-14_Site_A.tif, ...
results = opensr.inferutils.run(
    [(105.392986, 14.121299), (104.9160, 11.5564)],
    ["2026-10-14", "2026-10-29", "2026-11-08"],
    location=["Site A", "Phnom Penh"],
    out_dir="/content/s2dr3_out",
)

# CSV text or a CSV file path also work (lon first, lat second, header optional)
opensr.inferutils.run("points.csv", ["2026-11-08"])

File names are output_<date>_<location>.tif, using the requested date. When the same name repeats for one date, later files get (1), (2), ... (output_2026-11-08_Phnom_Penh(1).tif). Without location the files are output_<date>_run_1.tif, output_<date>_run_2.tif, ... The scene actually used can be a few days from the requested date; its ID (which includes its acquisition time) is stored in each GeoTIFF's source tag.

run returns one Result per (location, date) with path (GeoTIFF), 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.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for opensr-sr1m 0.1.0
File Size Uploaded Provenance Actions
opensr_sr1m-0.1.0.tar.gz 10.6 kB With provenance Details for opensr_sr1m-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for opensr-sr1m 0.1.0
File Interpreter ABI Platform Actions
opensr_sr1m-0.1.0-py3-none-any.whl Python 3 none any Details for opensr_sr1m-0.1.0-py3-none-any.whl

Total release size: 20.5 kB

Release files / opensr_sr1m-0.1.0.tar.gz

Download URL opensr_sr1m-0.1.0.tar.gz
Size 10.6 kB
Tags Source
SHA-256 checksum
How to use checksums
c2206f12abff976b22acacc2bac87b1890091096d0ce844bf6242cceee84a71c
BLAKE2b-256 checksum
How to use checksums
9800b8ce948ad703f8142a8c5695ae99e2a060bba3354a8d572239a7906a817e
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 Nov 18, 2026.

Transparency log

Release files / opensr_sr1m-0.1.0-py3-none-any.whl

Download URL opensr_sr1m-0.1.0-py3-none-any.whl
Size 9.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2e35c6f29507fbce5d70f1484527f5c3c2c3f1a99adc6c14fdd6a51036f34d49
BLAKE2b-256 checksum
How to use checksums
e2c16466dd6cebabe43b02cbdce64ab04efea686e527d26e631b53a50b710507
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 Nov 18, 2026.

Transparency log

Security for opensr-sr1m 0.1.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.

Select from 2 files

Attestation for opensr_sr1m-0.1.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 Nov 18, 2026.

Transparency log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page