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

# many locations x many dates (every combination is processed)
# -> /content/s2dr3_out/output_2026-10-14_to_2026-11-08_Cambodia/
results = opensr.inferutils.run(
    [(105.392986, 14.121299), (104.9160, 11.5564)],
    ["2026-10-14", "2026-10-29", "2026-11-08"],
    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-08"])

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-08_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), 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.1

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.1
File Size Uploaded Provenance Actions
opensr_sr1m-0.1.1.tar.gz 9.7 kB With provenance Details for opensr_sr1m-0.1.1.tar.gz

Built distribution (wheel)

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

Total release size: 19.5 kB

Release files / opensr_sr1m-0.1.1.tar.gz

Download URL opensr_sr1m-0.1.1.tar.gz
Size 9.7 kB
Tags Source
SHA-256 checksum
How to use checksums
9f71e4c54816f18b8b25285401dbd42097810476c66a0667e7562561d896724d
BLAKE2b-256 checksum
How to use checksums
08552a5cb232247fa1703c0aa98ca87b167016d7b5a6b87c2e9534e5fdd7b3b8
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.1-py3-none-any.whl

Download URL opensr_sr1m-0.1.1-py3-none-any.whl
Size 9.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2a14ced6196757c68f7b7b1a1fb538a5bf658b3003d86fb4f1b7cd386035a880
BLAKE2b-256 checksum
How to use checksums
1e66b78d13a629db8e4e6e41b31ac28a5e81f77394d82ff7520dc694731a3a4c
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.1

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