Flood super-resolution CLI and library using ONNX Runtime.
Project description
floodsr
Super-Resolution for flood hazard rasters. Ingests lores water grid and hires DEM and infers a hires water grid using the specified model.
Documentation: https://floodsr.readthedocs.io/en/latest/
Implemented models (see floodsr/models.json):
- ResUNet_16x_DEM: 16x DEM-conditioned ResUNet
- CostGrow (future)
Implemented backend:
- ONNX Runtime
Installation
# recommended core install: isolated CLI install for users
python -m pip install --user pipx
pipx ensurepath
pipx install floodsr
TestPyPI install:
pipx install --index-url https://test.pypi.org/simple/ --pip-args="--extra-index-url https://pypi.org/simple" floodsr
Extended install for GDAL/VRT-dependent workflows:
sudo apt-get update
sudo apt-get install -y gdal-bin libgdal-dev
python -m pip install "gdal==$(gdal-config --version)"
python -m pip install "floodsr[extended]"
The default floodsr package is the core install. It does not require
osgeo.gdal, and the HRDEM fetcher falls back to the non-windowed path when
GDAL bindings are missing.
Developer work should use the devcontainer image in
.devcontainer/main/devcontainer.json.
Use
Current CLI surface includes model registry, tohr raster execution, and runtime diagnostics.
List available model versions:
# source checkout shortcut for the CLI
alias floodsr='python -m floodsr.cli'
floodsr models list
Fetch a model by version into the default cache:
floodsr models fetch ResUNet_16x_DEM --force
tohr using HRDEM as DEM
floodsr tohr -f --in tests/data/2407_FHIMP_tile/lowres032.tif
Run one ToHR pass from raster inputs:
# simple tile
floodsr tohr \
--in tests/data/2407_FHIMP_tile/lowres032.tif \
--dem tests/data/2407_FHIMP_tile/hires002_dem.tif
# larger raster w/ windowing and tiling and rescaling
floodsr tohr \
--in tests/data/rss_mersch_A/lowres030.tif \
--dem tests/data/rss_mersch_A/hires002_dem.tif \
--out pred_sr.tif
Run ToHR with explicit local model path:
floodsr tohr \
--in tests/data/2407_FHIMP_tile/lowres032.tif \
--dem tests/data/2407_FHIMP_tile/hires002_dem.tif \
--out ./tmp/pred_sr.tif \
--model-path _inputs/ResUNet_16x_DEM/model_infer.onnx
Doctor diagnostics:
floodsr doctor
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file floodsr-0.0.3.tar.gz.
File metadata
- Download URL: floodsr-0.0.3.tar.gz
- Upload date:
- Size: 18.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49854c2ab4ff7f3c099fd13c87132276ebf2c9f3ae88fef20f4f8cf823bbe9d8
|
|
| MD5 |
e06899711b42a09b9da21d0db5482de4
|
|
| BLAKE2b-256 |
4be8102dad9903e5c267167432a22921ea406b325eae42a483a58d8e18b0f3d6
|
Provenance
The following attestation bundles were made for floodsr-0.0.3.tar.gz:
Publisher:
release.yml on cefect/floodsr
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
floodsr-0.0.3.tar.gz -
Subject digest:
49854c2ab4ff7f3c099fd13c87132276ebf2c9f3ae88fef20f4f8cf823bbe9d8 - Sigstore transparency entry: 1111960796
- Sigstore integration time:
-
Permalink:
cefect/floodsr@8cf8092dac7257e6e91e9ffc5d60733543b2f4c3 -
Branch / Tag:
refs/tags/v0.0.3 - Owner: https://github.com/cefect
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8cf8092dac7257e6e91e9ffc5d60733543b2f4c3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file floodsr-0.0.3-py3-none-any.whl.
File metadata
- Download URL: floodsr-0.0.3-py3-none-any.whl
- Upload date:
- Size: 51.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9819363bf2b791874a7350bcee7cf9f5536d01f86f0373bb5d64039edb33fdb8
|
|
| MD5 |
b79c428fe6c8234b5ced001d018f27f2
|
|
| BLAKE2b-256 |
7119bdf9fc1fb5c094022446b6ce7397e60da0e77cdc819f9f173e865b4adb16
|
Provenance
The following attestation bundles were made for floodsr-0.0.3-py3-none-any.whl:
Publisher:
release.yml on cefect/floodsr
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
floodsr-0.0.3-py3-none-any.whl -
Subject digest:
9819363bf2b791874a7350bcee7cf9f5536d01f86f0373bb5d64039edb33fdb8 - Sigstore transparency entry: 1111960821
- Sigstore integration time:
-
Permalink:
cefect/floodsr@8cf8092dac7257e6e91e9ffc5d60733543b2f4c3 -
Branch / Tag:
refs/tags/v0.0.3 - Owner: https://github.com/cefect
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8cf8092dac7257e6e91e9ffc5d60733543b2f4c3 -
Trigger Event:
push
-
Statement type: