You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,18 @@
1
1
# Changelog
2
2
3
+
## [0.5.0] - Jun 3, 2026
4
+
5
+
### Changed
6
+
-**Breaking:** No-data is now written as a GDAL dataset mask via `dst.write_mask()` instead of as a second data band, so GIS software (e.g. QGIS) treats no-data pixels as transparent. The mask is embedded inside the GeoTIFF (`GDAL_TIFF_INTERNAL_MASK`) rather than written as a `.tif.msk` sidecar. Standard output GeoTIFFs now have a single `Water predictions` band; read the mask with `src.read_masks(1)`. Debug output is unchanged.
7
+
- Versioning now derives from git tags via `setuptools-scm` (generates `omniwatermask/_version.py` at build time); the hardcoded `omniwatermask/__version__.py` was removed.
8
+
- End-to-end tests are now excluded from the default test run (`addopts = "-m 'not e2e'"`); run them explicitly with `pytest -m e2e`.
9
+
10
+
### Added
11
+
-`py.typed` marker and full type hints — the package now ships type information (PEP 561) and is checked with `mypy --strict`.
12
+
- Pre-commit hooks (ruff lint/format, mypy, fast tests) and GitHub Actions CI.
13
+
- PyPI trove classifiers and project URLs (Repository, Issues, Changelog) in `pyproject.toml`.
14
+
- Cloudy Sentinel-2 example notebook demonstrating cloud masking with OmniCloudMask before inference, plus a "Cloudy imagery" guidance section in the README.
OmniWaterMask is a Python library for high accuracy water segmentation in high to moderate resolution satellite imagery, supporting a wide range of resolutions, sensors, and processing levels.
10
13
11
-
[The OmniWaterMask paper is now published 🎉](https://www.sciencedirect.com/science/article/pii/S0924271625002692)
14
+
[Check out the paper here](https://www.sciencedirect.com/science/article/pii/S0924271625002692)
- When working with scenes containing no-data regions, explicitly set the 'no_data_value' parameter to ensure proper handling of these areas.
97
100
101
+
### Cloudy imagery
102
+
103
+
If you are working with cloudy imagery, either:
104
+
105
+
- use a **temporal mosaic** that is already cloud and cloud-shadow free (e.g. via [s2mosaic](https://github.com/DPIRD-DMA/s2mosaic) for Sentinel-2), or
106
+
- apply a **high quality cloud and cloud shadow mask** and set those pixels to `0` (the `no_data_value`) before running OWM.
107
+
108
+
This matters because OWM optimises its detection thresholds both **locally** (per region/patch) and **globally** (across the whole scene). Cloud and cloud-shadow pixels are out-of-distribution and can skew those optimisations, so bad data in one part of a scene can degrade the water prediction in other, otherwise-clean parts. Masking those pixels to no-data removes them from the optimisation entirely.
109
+
110
+
[OmniCloudMask](https://github.com/DPIRD-DMA/OmniCloudMask) is a good choice for the masking step. See the [cloudy Sentinel-2 example](https://github.com/DPIRD-DMA/OmniWaterMask/blob/main/examples/Sentinel-2%20example.ipynb) for an end-to-end mask-then-infer workflow.
111
+
98
112
99
113
## Parameters
100
114
@@ -145,6 +159,7 @@ Example notebooks are available in the [examples/](https://github.com/DPIRD-DMA/
145
159
146
160
-[NAIP example](https://github.com/DPIRD-DMA/OmniWaterMask/blob/main/examples/NAIP%20example.ipynb) — Water segmentation on NAIP aerial imagery from HuggingFace
147
161
-[Sentinel-2 example](https://github.com/DPIRD-DMA/OmniWaterMask/blob/main/examples/Sentinel%202%20example.ipynb) — Water segmentation on a Sentinel-2 mosaic using [s2mosaic](https://github.com/DPIRD-DMA/s2mosaic)
162
+
-[Cloudy Sentinel-2 example](https://github.com/DPIRD-DMA/OmniWaterMask/blob/main/examples/Sentinel-2%20example.ipynb) — Masking clouds with [OmniCloudMask](https://github.com/DPIRD-DMA/OmniCloudMask) before running OWM on a cloudy AWS scene
148
163
149
164
## Changelog
150
165
@@ -154,6 +169,48 @@ See [CHANGELOG.md](https://github.com/DPIRD-DMA/OmniWaterMask/blob/main/CHANGELO
154
169
155
170
Contributions are welcome! Please submit a pull request or open an issue to discuss any changes.
156
171
172
+
### Development setup
173
+
174
+
Clone the repository and install the dependencies (including the dev group) with [uv](https://docs.astral.sh/uv/):
175
+
176
+
```bash
177
+
uv sync --all-extras --dev
178
+
```
179
+
180
+
Optionally install the git hooks (ruff lint/format on commit, mypy + the fast tests on push):
181
+
182
+
```bash
183
+
uv run pre-commit install
184
+
uv run pre-commit install --hook-type pre-push
185
+
```
186
+
187
+
### Running the tests
188
+
189
+
Tests use `pytest`. The fast suite (unit tests + model-mocked pipeline tests) runs in a few seconds and is what CI runs by default:
190
+
191
+
```bash
192
+
uv run pytest # full fast suite
193
+
uv run pytest tests/test_orchestration.py # one file
194
+
uv run pytest -k make_water_mask # match by name
195
+
```
196
+
197
+
End-to-end tests that download the real model weights and run inference on real imagery are marked `e2e` and excluded by default (see `addopts` in `pyproject.toml`). To run them explicitly:
198
+
199
+
```bash
200
+
uv run pytest -m e2e # only the e2e/inference tests
201
+
uv run pytest -m ""# everything, including e2e
202
+
```
203
+
204
+
Lint, format and type-check:
205
+
206
+
```bash
207
+
uv run ruff check .
208
+
uv run ruff format .
209
+
uv run mypy omniwatermask/
210
+
```
211
+
212
+
For maintainers: pushing a version tag (e.g. `git tag v0.4.4 && git push --tags`) builds the package and publishes it to PyPI via GitHub Actions trusted publishing — no tokens required.
0 commit comments