feat: SAR-based flood detection#86
Open
Goldokpa wants to merge 8 commits into
Open
Conversation
…tests Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…assification - flood_classification: separate flood from permanent water via reference (JRC GSW occurrence) or pre/post change detection; refuses to guess when neither is available - ensemble: detect() now returns a 3-class classified_mask when a reference or pre-event scene is supplied - flooding_sar: FloodingSARAnalysis (Sentinel-1 VV/VH) behind the standard analysis contract, registered and discoverable - gee_downloader: Sentinel-1 GRD + JRC Global Surface Water fetch (synthetic fallback, explicitly tagged) - inference/flood_pipeline: bbox -> S1 + JRC -> ensemble -> 3-class result - api: /api/predict dispatches flooding_sar to the SAR pipeline; type listed in analysis-types/health; config + [flood] extra added - scripts: eval_flood.py (real IoU/F1/precision/recall on Sen1Floods11) and download_sen1floods11.py - tests: classification + SAR analysis + registry/API exposure Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…regional bboxes test_valid_bbox uses a 15x10=150 sq-degree regional box that was wrongly rejected by the previous default of 100. The DoS test (test_too_large_area) passes max_area explicitly so it is unaffected.
NGO/gov actionability: surface affected_road_km (OSM, degrades honestly when osmnx absent) and a quality block stating is_synthetic, whether permanent vs flood was distinguished, the reference source, and that the detector is not yet validated against a labeled benchmark. No fabricated impact or accuracy. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The code (gee_downloader, inference/pipeline) reads GEE_SERVICE_ACCOUNT_KEY, but .env.example told users to set GEE_PRIVATE_KEY_FILE, which nothing reads -- GEE auth silently fell back to synthetic. Align the example with the code. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
require_api_key now validates keys against the organizations table (active keys only) with a 5-min cache, replacing the stub that accepted nothing but cv_dev. The cv_dev bypass is disabled unless CLIMATEVISION_ALLOW_DEV_KEY is set, so production rejects it by default. Adds auth tests (real key, unknown key, deactivated org, dev-key gate, e2e predict). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Flood detection U-Net, SAR preprocessing, ensemble, OSM road-impact module, and tests.
🤖 Generated with Claude Code